alanft
Forum Replies Created
-
Forum: Plugins
In reply to: [Widget Logic] Logic to appear widget at current user's profile page onlyNot on the user profile you see at …wordpress/wp-admin/profile.php , as that’s in the wp-admin interface which I don’t believe can have a widget-y sidebar.
But you could do it on their post page …/author/user_name using code from this page
http://codex.wordpress.org/Function_Reference/get_currentuserinfo
which suggests that
global $current_user; get_currentuserinfo(); return is_author($current_user->user_login);
might work
Forum: Plugins
In reply to: [Widget Logic] Widgets won't expand in admin to display settingsin case there is any confusion, WIdget Logic was updated to 0.55 a week or so ago. this includes the small change suggested to fix the WP3.5 -%i% issue with jquery 1.8
Forum: Plugins
In reply to: [Widget Logic] Logic to appear widget at current user's profile page only!is_user_logged_in() — shown when a user is not logged in
comes from
http://wordpress.org/extend/plugins/widget-logic/other_notes/
you could use that without the ! at the beginning
Forum: Plugins
In reply to: [Widget Logic] !is_page or $post->post_parent !=!! Of course! Thank you. Should have spotted that!
Forum: Plugins
In reply to: [Widget Logic] !is_page or $post->post_parent !=try taking off the quotes aroung 686. i’m not saying it’s that, but there might be something going on with PHP’s weird ‘casting’ when converting the string to an integer (which post_parent is I think).
Forum: Plugins
In reply to: [Widget Logic] widget not showing up on any single postThere’s a thing about using is_page in the FAQ
Forum: Plugins
In reply to: [Widget Logic] Upgrade Error: in_array() expects parameter 2 to be arraydo you have the “global $post” at the start?
Yep, looking at 3.4 v 3.5, get_post_ancestors was re-written and now can return FALSE, so any
in_array(n, get_post_ancestors($post))
conditionals have to be written with a bit more caution testing $post first, something like
($post) && in_array(n, get_post_ancestors($post))
there’s another thread with someone having trouble with get_post_ancestors – I’ll have a look at that to see if there’s some substantial change in WP3.5
hard to say what’s up with your is_tree function (as that page doesn’t have any code with foreach in it)
i will take a look at get_post_ancestors
Forum: Plugins
In reply to: [Widget Logic] Upgrade Error: in_array() expects parameter 2 to be arraynot sure why this would have changed in WP3.5. But the first bit of get_post_ancestors has this
if ( ! $post ) return false;so something you could try is adding an initial test of $post in the condition like
return ($post) && (in_array(39,get_post_ancestors($post)));so that if $post is false it doesn’t go on to test it against the function. just a first thought – not really thought it out.
Forum: Plugins
In reply to: [Widget Logic] Error after Widget Logic upgraderight, well I’ve gone and committed 0.55 as the stable version – this restores the missing stripslashes, and adds a spanish translation.
Fingers crossed…
Forum: Plugins
In reply to: [Widget Logic] Error after Widget Logic upgrade*ahem* it appears I accidentally left it out when I rewrote the code for that new filter 🙁
Right then…
Forum: Plugins
In reply to: [Widget Logic] Error after Widget Logic upgradestill don’t understand where the quote escaping is coming from, if it vanishes going back to .52 🙁
anyone able to check if the updated .54 with stripslashes fixes the issue?
Forum: Plugins
In reply to: [Widget Logic] Seems to Break Drag-n-Drop for Widgetsyou should be able to just use the admin interface to delete and re-add it, as when you re-add it, it will be .52 again
(BTW, I just updated the .54 repository with a likely fix if anyone is up to trying it)
Forum: Plugins
In reply to: [Widget Logic] Error after Widget Logic upgradeOK. If anyone wants to try 0.54 again
http://downloads.wordpress.org/plugin/widget-logic.0.54.zip
I added a stripslashes as there’s clearly some new cleaning of options via escaping at least quotes.
(I was confused cos I found that a is_pages(‘slug-name’) code I’ve relied on forever stopped working properly too.)
If it clears things up I’ll do a .55 with another translation added in