alanft
Forum Replies Created
-
Forum: Plugins
In reply to: [Widget Logic] [Plugin: Widget Logic] Security hole?Bjørn you are not the first person to note this, and actually I’m surprised it’s not in the “Other Notes” section of the documentation – I’m going to add that to my ‘to do’ list – as I’ve discussed the possible security issue on a few posts here. The consensus being that the quid pro quo of keeping anyone but widget admins out of editing the code is a sufficient price for the power/simplicity of the main idea. it’s ‘with great power comes great responsibility’ of course
if anyone has some simple ‘function whitelist’ code they can point me at I’ll take a look.
when i first posted WL (years ago) I noted words to the effect that ‘for now’ I’m using a simple eval, but might try something more sophisticated if people have a problem with the security implications of this.
Cheers – A
Forum: Plugins
In reply to: Widget Logic / Widget Context replacing callbackI think i understand nk111’s point, but I’m still not at all clear on the original post here (‘many properties missing’?), and would love to know what I’m missing.
re nk111, what cause is there for restoring the callback property – and where are you doing it – in widget logic at the end of the widget_logic_redirected_callback function?
NB, i’ve just been looking at the (wp-includes/widgets.php) current dynamic_sidebar function and I think I see a new cleaner way to do widget logic using the dynamic_sidebar_params filter – which I’m SURE didn’t exist when I first started out!
“to only show that categories posts or archives”
although you can use the widget_content filter to change the content of a widget, what you want to do here is probably too difficult to work as a filter. What you need (and for all I know they don’t exist) are widgets that are ‘context sensitive’, only showing posts of the category you are looking at. sorry
Forum: Plugins
In reply to: [Widget Logic] [Plugin: Widget Logic] Use $widget_ID ?@squidz, you have to change your function. first off get rid of the text that outputs the TEST text every time it’s called
?><div>TEST</div><?phpand instead get it to RETURN the text you want, e.g.
return $content."ID=".$widget_id;which will instead put the widget_id at the end of the widget content. Then you can alter it to have conditional changes to what it returns.
Forum: Plugins
In reply to: Widget logic error message- what does it mean?you have some faulty widget logic in one of your widgets
Forum: Plugins
In reply to: If_Theme Query?the only theme conditional tag I know of is the ‘theme supports’ one, which may be no use to you. You might be better off using get_bloginfo()…
http://codex.wordpress.org/Function_Reference/get_bloginfo
something like
return get_bloginfo(‘template_directory’,’raw’)==’http://www.example.com/home/wp/wp-content/themes/my_mobile_theme_folder’
Forum: Plugins
In reply to: [Widget Logic] [Plugin: Widget Logic] Use $widget_ID ?it’s a filter function – air gets the HTML to output ($content) and (in this case) the widget ID. all you have to do is modify the $content and return it. a bit like the code at the end of http://wordpress.org/extend/plugins/widget-logic/other_notes/
something like
return $content.”<div>TEST</div>”;
will give you the right idea
Forum: Plugins
In reply to: [Widget Logic] [Plugin: Widget Logic] Add two conditionals Doesn't workif that’s the is_tree function as shown in snippet 4 on
http://codex.wordpress.org/Conditional_Tags
it doesn’t take an array as a parameter, which could be the source of your problem
Forum: Plugins
In reply to: [Widget Logic] [Plugin: Widget Logic] single posts within a taxonomy?i don’t think i understand taxonomies very well – it looks to me like they apply to all posts (of a particular type) or not. but when you say ‘show only on posts that are within a taxonomy’ that doesn’t seem to match up with that. sorry
Forum: Plugins
In reply to: [Widget Logic] [Plugin: Widget Logic] single posts within a taxonomy?Try:
global $post; return is_single() && is_object_in_taxonomy($post, ‘taxonomy x’);
(from wordpress/wp-includes/taxonomy.php)
i’ve not tried it, but the comments in that file imply it should work.
Forum: Plugins
In reply to: [Widget Logic] Widget Logic Fatal Errorif_home() is not a known conditional tag, nor is if_page() which is what the error indicates is the first statement it chokes on.
try is_home() and is_page()
I am 99% sure that the WL statements will not be dropped during deactivation
Forum: Plugins
In reply to: [Widget Logic] Exporting Widget & Widget Logic SettingsI don’t *think* the issue is related to widget logic. try disabling it to see if it makes any difference.
i don’t know anything about artisteer and a few minutes googling couldn’t get me any info on the clash between its themes and WL. if you can point me at some specifics I’ll look into what WL can do, if anything.
Forum: Plugins
In reply to: [Widget Logic] Widget Logic overwrites existing CSS classesI’m not trying to be argumentative (or at least not provocatively so!), but
“I then do not need to manually list each widget ID I want the styles attached to”
but you do have to install and activate a plugin and then use it to manually add special classes to each widget. A manual list of IDs in the CSS seems simpler – lower overheads, less server processing etc.