How do I diagnose a plugin resource 404?

I have the feeling that either those files don’t exist or the location of the file has changed. Go into /plugins/wp-greet-box/js/ and see if you can locate the functions.js and the jquery.js. If the files are not there then they must have been deleted and that is why it’s throwing the 404 (Not found). EDIT: … Read more

Output the admin menu_position for each item

I’ve just finished a plugin that (amongst other things) allows the reordering of the admin menu. The way the admin menu is constructed is not the easiest thing to work with at all. That being said have a look at the admin_menu hook. You can access the global $menu array at that point – which … Read more

Is there alternative to WP_List_Table?

My choice would be to use WP_List_Table. If you continue reading the Codex it makes it clear that it is commonly used by third party code. “Someday” it might go away, but I doubt it will happen abruptly (if at all). If it does change, there will probably be a newer solution to replace it. … Read more

Shared account / dual blogging in WordPress

Yes, this is really very basic. If you are the admin, you can create new users and asign them a role. You could make your friend ‘author’, which would allow him to write and edit his own posts only, or make him an ‘editor’ if you also want him to edit other people’s post.

Getting admin notices to appear after page refresh

You should use set_transient this is stored and will show up after the page reloads as it is like cookies on the server side. function SITE_profile_update_notice() { // Add this to your code where you want to the transient to fire after function set_transient( ‘fx-admin-notice-panel’, true, 5 ); } /* Add admin notice */ add_action( … Read more

How to verify nonces in bulk?

You don’t need a nonce for every field, a single nonce should suffice This is because a nonce isn’t tied to a field, it’s tied to a request, and verifies that you did indeed intend to press update, or click a link, submit a form, etc As an example, back in the days of MySpace, … Read more

How to find a spam link?

Did you try a search from the Posts (Admin) screen? (And also the Pages (Admin) screen? And sometimes a googles of your site might find it: use something like search-term site:example.com …depends on how current the googles are for your site. But sometimes works well. Added To answer your question/comment: Remember that there is no … Read more

Add term of current custom post type to admin body class using admin_body_class

I think you’re missing get_current_screen(). add_filter( ‘admin_body_class’, ‘rw_admin_body_class’ ); function rw_admin_body_class( $classes ) { $screen = get_current_screen(); if ( ‘post’ != $screen->base ) { return $classes; } global $post; $terms = wp_get_post_terms( $post->ID, ‘product_cat’, array( ‘fields’ => ‘all’ ) ); $terms = wp_list_pluck( $terms, ‘slug’ ); foreach ( $terms as $term ) { $classes .= … Read more