How to limit number of number of categories displayed by categories widget

You could show the Category widgets as a dropdown instead, if you have large number of categories. I’m not sure how useful it is to limit categories when ordered by name. You might try to order by count to display the most used categories: add_filter( ‘widget_categories_args’, function( $args ) { $args[‘number’] = 1; $args[‘orderby’] = … Read more

Updating post data on save (save_post vs wp_insert_post_data)

At first, Data was sanitized here (line 2997). If you don’t want any plugin/theme run on action save_post. User function remove_all_actions to remove all functions hooked to action save_post. function post_save_action($post_id, $post, $update) { if ($this->is_temp_saving_post($post, $post_id)) { return; } // Check user permissions if (!current_user_can(‘edit_post’, $post_id)) return; // Update post if (!$this->is_proper_post_type($post)) { return; … Read more

As a plugin developer, how do I remove a plugin from the global plugin directory? [duplicate]

Just delete the content of your plugin directory using subversion in the SVN repository. svn co http://plugins.svn.wordpress.org/your-plugin your-plugin In other words, these instructions may help you update the plugin files. svn status svn update svn commit -m “Emptied my plugins…” If you need to delete files use this svn st | grep ‘^!’ | awk … Read more