How can I change the frequency of a scheduled event?

I have declared a scheduled event in a plugin like this : function shedule_email_alerts() { if ( !wp_next_scheduled( ‘send_email_alerts_hook’ ) ) { wp_schedule_event(time(), ‘hourly’, ‘send_email_alerts_hook’); } } Then i wanted to change the frequency to ‘daily’, by doing so, replacing the original function with : function shedule_email_alerts() { if ( !wp_next_scheduled( ‘send_email_alerts_hook’ ) ) { … Read more

Implementing advanced add_* function wrappers

add_action() and add_filter() are major functions. However in some scenarios add one more function and hook it somewhere approach gets bulky and inconvenient. I had determined for myself several use cases that can streamline code with wrappers on top of add_* functions. Things that are better handled with single-liner than extra function each and every … Read more

Dynamic template serving, change theme_root using add_filter from current theme

Some plugins use the ‘template’, ‘option_template’ and ‘option_stylesheet’ to dynamically serve (alternative) wordpress templates. For example, Nathan Rice’s ServeDefaultToIESix. For Example – add_filter(‘template’, ‘change_theme’); add_filter(‘option_template’, ‘change_theme’); add_filter(‘option_stylesheet’, ‘change_theme’); function change_theme() { // Alternate theme return ‘AwesomeTheme’; } Above code only works from a wordpress plugin. What i need, is to switch to alternative template, located … Read more

A tool to analyze rewrite rules? [closed]

Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for WordPress Development Stack Exchange. Closed 9 years ago. Improve this question Is there a good tool to analyze my rewrite rules? I always get confused with the regexes and the parameter replacements. … Read more

WPSE Plugin Repository: The plugins that came out of WP-

Link your WPSE-Plugins If you answered a question and made a plugin out of your code, than this is your place to share it. The Idea: An old comment from @MikeSchinkel during the beta phase where he wrote something like “I wonder how many plugins will come out of WA”. “Rules” Write a short – … Read more