kriszani
Forum Replies Created
-
Forum: Plugins
In reply to: [jQuery Colorbox] Use Caption Field instead of Title and Size?Sorry to hijack your thread, but I just had the same problem. I resolved it adding a filter into my functions.php file.
if (!is_admin() && $GLOBALS["pagenow"] != "wp-login.php") { add_filter('wp_get_attachment_image_attributes', 'filter_image_title', 10, 2); } function filter_image_title($attr, $attachment = null){ $attr['title'] = $attachment->post_excerpt; return $attr; }techotronic – I’ve seen quite a lot of people asking for this, couldnt you add a setting in your plugin that does the same thing and gives users the choice of what to display? I did have a little look at your source code but it would take a lot of trial and error for me to understand the way it all ties together.
thanks for the plugin though! 🙂
Thanks for all these quick responses. Yes I agree with the cause. The result is that it is not simple to switch to this plugin from another syntax highlighter. I’m currently looking at integrating prism into my theme directly that way I know it will work for me 🙂
But I do really like the detached idea for code, keep up the good work and I’ll keep my eye on this. We need more of a community around prism to work out these bugs and contribute more stuff to the core.
Yes I found that after posting this message. I dont see it as a major problem either. But i think you should make people aware of it – its just as important to know the disadvantages of any plugin as well as its advantages. I think having your code included in your default blog searches is very useful and writing custom search code into a theme may be a bit beyond some users.
Ok so I’ve tracked this through a little bit. If i use unescaped PHP code inside PRE tags in wordpress then everything falls apart. I’ve been using the wp-syntax plugin and that allows it – which is why I thought it was ok.
wp-syntax adds filters that run before and after the_content, the_excerpt and comment_text. The before filters replace all matching code blocks with a randomly generated placeholder and save the code blocks in an array. The after filters put them back.
This seems pretty like a pretty inefficient solution to me, but your plugin has an advantage in that the code is already separate from the content. So my suggestion would be to run your plugin as a filter on the_content with a late priority rather than register is as an actual shortcode.
Any thoughts?