Decrease RSS cache time in plugin?

Why not just use native RSS widget? Also while Chris_O is absolutely right on filter to use, it is better practice to change cache time for specific feed URL rather than globally: add_filter( ‘wp_feed_cache_transient_lifetime’, ‘speed_up_feed’, 10, 2 ); function speed_up_feed( $interval, $url ) { if( ‘http://mysite.org/feed’ == $url ) return 3600; return $interval; }

Show dialog box in TinyMCE plugin and use WordPress php functions in it

Instead of requireing admin.php you just can use WP built-in ajax functionality, even if it’s not ajax in this case. Add a hook add_action(‘wp_ajax_my_plugin_function’, ‘my_plugin_function_callback’); Create your output function (callback) function my_plugin_function_callback() { // do stuff } Call it this way instead of: file : url + ‘/box.php’, you should be able to use the … Read more

is_page() function doesnt working

The init hook is too early — WordPress hasn’t yet identified the queried object (post, category, etc.); hence the is_page() doesn’t work there: add_action(‘init’, ‘register_script’); So for conditional tags/functions like is_page(), is_single(), etc. to work (i.e. return the proper result), you should use wp or a later hook: add_action(‘wp’, ‘whatever_function’); But for registering/enqueueing scripts and … Read more

admin_notices not displaying in plugin

Try this. I cleaned up your arg array and placed everything in a function. Also, why are you using the getInstance method when your efpd_admin_notice is public? See the code below for accessing this method properly. function plugin_update(){ $plugin_update = Efpdd::efpd_admin_notice(array( ‘type’ => ‘update’, ‘message’ => ‘The plugin has just been updated.’, ‘button’ => ‘Click … Read more