wp_update_post call really slow when official Facebook plugin is installed

This is beacuse facebook plugins does some really intensive checks on every save_post and this slows down calls to wp_update_post and wp_save_post to a crawl ( about 2 seconds for each call ). If you want you can remove them remove_action( ‘save_post’, ‘fb_add_page_mention_box_save’ ); remove_action( ‘save_post’, ‘fb_add_friend_mention_box_save’ ); The crazy thing is that facebook does … Read more

Change the class of wordpress menu

This will add class sub-menu-0, sub-menu-1 and so on depending upon their depth. //This will go in functions.php file class wpse61220_submenu_class extends Walker_Nav_Menu { function start_lvl(&$output, $depth) { $indent = str_repeat(“\t”, $depth); $output .= “\n$indent<ul class=\”sub-menu-“.$depth.”\”>\n”; } } // Usage – // wp_nav_menu( array(‘walker’ => new wpse61220_submenu_class() ) ); Reference – function wp_nav_menu()

How to display posts list on my plugin page?

Better would be the use of WordPress’ function get_posts(): $args = array( ‘post_type’ => ‘post’, ‘post_status’ => ‘publish’ ); $posts = get_posts( $args ); echo ‘<ul>’; foreach ( $posts as $post ) { echo ‘<li>’ . $post->post_title . ‘</li>’; } echo ‘</ul>’; http://codex.wordpress.org/Template_Tags/get_posts

Looking for Hook that is fired after a plugin or wp upgrade is installed/updated

A chance is the update_feedback filter hook. He is usable after core and plugin update, I think. You can hook in and start your custom doing. See the follow example, but only a code for understand my bad english; he don’t work. add_filter( ‘update_feedback’, ‘fb_add_feedback’ ); function fb_add_feedback( $feedback ) { // start my custom … Read more