Permanently activate WordPress theme

Here’s one idea: /** * Reactivate the sticky theme, if someone activates another theme. */ add_action( ‘switch_theme’, ‘wpse_permanent_theme’ ); function wpse_permanent_theme( $new_name ) { $sticky_theme_name=”twentyfifteen”; // Modify this to your needs! // Get the sticky theme info, to check if it exists (named): $sticky_theme = wp_get_theme( $sticky_theme_name ); // Reactivate the sticky theme: if( $sticky_theme->get( … Read more

How-to turn off mobile admin mode?

The solution is to edit /wp-admin/admin-header.php and search for “device-width” and change it to something like this: <meta name=”viewport” content=”width=1024″> This allows you to see the unadulterated WordPress admin interface on your tablet or phone. No more jumbo-size letters.

Enqueue and Dequeue from admin bar nodes

From what I understand from your question, your best course of action is to assign the node to a WordPress callback function using built-in AJAX. If you don’t know what I’m talking about, you should familiarize yourself with using AJAX in WordPress in the Codex. However, here is a basic overview of steps: Add a … Read more

do_action() hook into load-(page)

I have changed the do_action() for a apply_filter(). This worked as follows: // Filter save settings $settings = apply_filters( ‘gtp_theme_settings_tab_save’, $settings, $tab, $_POST ); $updated = update_option( ‘gtp_theme_settings’, $settings ); And then my add_filter in plugin file looks like: function ac_theme_settings_tab_save( $settings, $tab, $postdata ) { if( $tab == ‘adcalls’ ) { $settings[‘gtp_adcalls_domain_id’] = $postdata[‘gtp_adcalls_domain_id’]; … Read more