How to pass query string vars between admin pages?

I did some more nosing around in Stack Exchange, and found this previous question. it has no accepted answers, but a few of the replies gave specific instructions on how to pass variables to admin pages (the approach is different than doing so on front-end pages). I tried the $_GET[] method, and it worked.

Does is_admin() really provide a plugin performance improvement?

The is_admin() function is basically used to check whether the running request is routing on /wp-admin/. Calling the is_admin() conditional function, you can restrict files you only want to load when a request goes through the /wp-admin/. Note that is_admin() and is_super_admin() are not the same and both handle different conditions. Looking forward, when sending … Read more

How to add convenient buttons for new custom post statuses

There is a work tool set that works nice for this kind of add on, called CMB2. You can add all the fields and buttons you want as part of a metabox series. Metaboxes are what make up the admin section section of wordpress. https://wordpress.org/plugins/cmb2/ For example..a snippet: function custom_post_status() { register_post_status( ‘spam’, array( ‘label’ … Read more

Can not add admin notices from the edit_user_profile_update hook (notices not being displayed)?

WordPress redirects you back to the user-edit.php page upon successful user update, so while the admin_notices has yet been fired in your sulock_save_profile_fields(), the message (your custom admin notice) is never displayed because of the redirection. And one way to fix it, is by filtering the redirect URL via the wp_redirect filter: // In sulock_save_profile_fields() … Read more

Showing User’s Post Counts by Custom Post Type in the Author.php?

Here I’ve modified the code from URL you’ve given. function _yoursite_get_author_post_type_counts() { static $counts; if (!isset($counts)) { global $wpdb; global $wp_post_types; $sql = <<<SQL SELECT post_type, post_author, COUNT(*) AS post_count FROM {$wpdb->posts} WHERE 1=1 AND post_type NOT IN (‘revision’,’nav_menu_item’) AND post_status IN (‘publish’,’pending’, ‘draft’) GROUP BY post_type, post_author SQL; $posts = $wpdb->get_results($sql); foreach($posts as $post) … Read more