wp_dequeue_script not working in my plugin

wp_enqueue_script() also registers the script. So, you’ll also need to de-register it first. This code should work depending on how and where the script is enqueued. function my_dequeue() { wp_deregister_script( ‘ocmx-jquery’ ); wp_dequeue_script( ‘ocmx-jquery’ ); } add_action( ‘admin_enqueue_scripts’, ‘my_dequeue’, 10 ); You might also need to play with the priority of the action.

500 internal server error on wp-admin only

500 can be caused due to these -> Corrupted WP core files Corrupted .htaccess files Problematic plugins PHP memory limit issues Problematic theme As you already I have re-copied the .htaccess file and put in what WordPress recommended. I have stripped the plugins from the site through FTP. I think Upload fresh copy of wp-admin … Read more

Issue with contextual help overwriting existing content

In order to not delete help from all other screens, you need to always return the contextual help text, otherwise your filter doesn’t return anything for non-page/post screens and so nothing will show up. Move the return to the bottom of the function, outside of your if/else. Also, the original contextual help is being concatenated … Read more

Filtering the Admin Comments List to Show Only Comments from the Current User?

Either of these 3 will help you: //Before getting the comments, on the WP_Comment_Query object for each comment add_action(‘pre_get_comments’, ‘wpse56652_filt_comm’); //Applied on the comments SQL Query, you can modify the ‘Where’ part of the query add_filter(‘comments_clauses’, ‘wpse56652_filt_comm’); //After the comments are fetched, you can modify the comments array add_filter(‘the_comments’, ‘wpse56652_filt_comm’); function wpse56652_filt_comm($param) { //access the … Read more

wp-admin redirects to 404

One possible reason is that the /wp-admin has been reset to something else, for security reasons. The WP Better Security plugin can do this. I know, because I have in the past turned on a bunch of this plugin’s options, without thinking too much about it, including the one that re-writes the /wp-admin URL so … Read more