Is there a WordPress core & plugins update action hook?

Hooks The hooks you’re searching for are ‘pre_set_site_transient_update_plugins’ and ‘upgrader_post_install’ The later takes three arguments. Example: function upgrader_post_install_cb( $true, $hook_extra, $result ) and should be used for: Move & activate the plugin, echo the update message. Moving plugins Moving works like this: $wp_filesystem->move( $result[‘destination’] ,’your_destination_path’ ); Then use activate_plugin( ‘path/file’ ); after moving.

Hooks for trashing, deleting, saving, restoring custom post type

Two action hooks run when a post is trashed wp_trash_post before the post is trashed and trashed_post afterwards. These run for any post type including attachments. See wp-includes/post.php If you want to limit your function to a specific post type you need to run a check in you callback function. function my_trash_action( $post_id ) { … Read more

Which hook if user profile information is updated?

From Codex: Plugin API – Action Reference – profile_update: Note: This hook is not used on user edit/profile pages. To hook into the admin’s user edit pages, use the hook edit_user_profile_update which is located in /wp-includes/user-edit.php instead. From Codex: Plugin API – Action Reference – edit_user_profile_update: This hook only triggers when a user is viewing … Read more

Auto-retrieve YouTube Image for Thumbnail?

Hi @Jonathan Sampson: While this is not exactly what you asked for it might actually be a viable solution and it comes for free from WordPress.com thanks to @yoast‘s tweet this morning when he referenced this blog post: An Automated Way to Take Screenshots of any Website – Free Basically you can use WordPress.com’ screenshot … Read more

Hook *after* user password change?

I wonder if you’re looking for this one: /** * Fires after the user’s password is reset. * * @since 4.4.0 * * @param object $user The user. * @param string $new_pass New user password. */ do_action( ‘after_password_reset’, $user, $new_pass ); It was introduced in WordPress 4.4 and lives within the reset_password() function. The after_password_reset … Read more

Hook on trash post

The wp_trash_post hook might be what you’re looking for: Fires before a post is sent to the trash. Also, there’s the trashed_post hook: Fires after a post is sent to the trash. Here’s some untested code to get you started: function my_wp_trash_post( $post_id ) { $post_type = get_post_type( $post_id ); $post_status = get_post_status( $post_id ); … Read more