Combining action and filter?

A better solution would be to add the filter hooks before the actual call in the template and removing theme when done meaning in your theme before you call your sidebar using dynamic_sidebar or what ever use this: add_filter( ’embed_defaults’, ‘small_embed_defaults’ ); dynamic_sidebar(‘my_sidebar’); remove_filter( ’embed_defaults’, ‘small_embed_defaults’ ); and the same with your main loop: add_filter( … Read more

Can taxonomies of custom post types be used with category actions?

What you’re looking for are the create_$taxonomy, edit_$taxonomy and delete_$taxonomy hooks. $taxonomy is, of course, your taxonomy name. <?php add_action( ‘create_your_tax’, ‘wpse32510_create’, 10, 2 ); funciton wpse32510_create( $term_id, $tt_id ) { // do stuff } There’s also create_term, edit_term and delete_term. Best place to find hooks: http://adambrown.info/p/wp_hooks/

When to load auto-login code?

I ended up using the ‘plugins_loaded’ action or state from http://codex.wordpress.org/Plugin_API/Action_Reference: In my main plugin file I have: include_once( ‘lib/class-my-auth.php’ ); // your class file here add_action( ‘plugins_loaded’, ‘My_Auth::auto_login’ ); In lib/class-my-auth.php: <?php class My_Auth { private static $successfully_connected_Main_to_WP = false; public static function auto_login() { $username = …; // Integrate with main site to … Read more

Which action does wp_update_user triggers?

wp_update_user() is in /wp-includes/user.php lines 1401-1439. It uses wp_insert_user() (same file, lines 1254-1380) to update the existing user or add a new one if the user doesn’t exist. That function is where the various filters and actions affecting user account info live, and shows everything you can do to the $user object.