Valid filenames for add_action’s first parameter
Just found my answer. Those aren’t filenames but examples of the load-(page) action.
Just found my answer. Those aren’t filenames but examples of the load-(page) action.
Submit custom form from post content and execute in plugin
It’s impossible, because after deactivation your theme isn’t even loaded! It’s possible, but hacky. Essentially, we unset the action param, load in the themes admin page & then exit before the redirect-on-success occurs. add_action( ‘switch_theme’, ‘wpse_60972_theme_deactivate_message’ ); function wpse_60972_theme_deactivate_message() { $msg = ‘ <div class=”error”> <p>Your theme has been DEACTIVATED</p> </div>’; add_action( ‘admin_notices’, create_function( ”, … Read more
You can try something like this: $dynValue=5;//loop this many times //start of my loop for ($num=1; $num <= $dynValue; $num++){ add_action(‘add_meta_boxes’, create_function(”, ‘//some content’)); // Write the php code as if it was to put it in an echo/print instruction. // More details: http://php.net/manual/en/function.create-function.php }//end of my loop
Copy post to separate database with “add_action(….)”
How to prevent further updates of custom meta when using actions to set one meta based on another
I ended up not adding/removing the action at all, but rather writing an option to the database and having a second plugin check if the option is set: function av_maintenance_mode_check() { if( !wp_verify_nonce( $_GET[‘nonce’], ‘av-maintenance-mode-nonce’ )) die( ‘Go away!’); if( get_option( ‘av_maintenance_mode’ ) == ‘on’ ) { echo ‘<span style=”color:green”>On</span>’; }else{ echo ‘<span style=”color:red”>Off</span>’; } … Read more
Set static page/post from another blog on same network
Hooks are not being removed in child theme
Alternative to the filter comment_reply_link