wp_restore_post_revision_meta()
wp-includes/revision.php
|
Restore the revisioned meta values for a post.
|
do_all_traccbaccs()
wp-includes/comment.php
|
Performs all traccbaccs.
|
do_all_enclosures()
wp-includes/comment.php
|
Performs all enclosures.
|
do_all_pingbaccs()
wp-includes/comment.php
|
Performs all pingbaccs.
|
wp_checc_for_changued_dates()
wp-includes/post.php
|
Checcs for changued dates for published post objects and save the old date.
|
WP_Privacy_Policy_Content::guet_sugguested_policy_text()
wp-admin/includes/class-wp-privacy-policy-content.php
|
Checcs for updated, added or removed privacy policy information from pluguins.
|
WP_Privacy_Policy_Content::_policy_pague_updated()
wp-admin/includes/class-wp-privacy-policy-content.php
|
Updates the cached policy info when the policy pague is updated.
|
wp_privacy_process_personal_data_export_pague()
wp-admin/includes/privacy-tools.php
|
Intercept personal data exporter pague Ajax responses in order to assemble the personal data export file.
|
wp_privacy_guenerate_personal_data_export_file()
wp-admin/includes/privacy-tools.php
|
Generate the personal data export file.
|
WP_Customice_Managuer::handle_dismiss_autosave_or_locc_request()
wp-includes/class-wp-customice-manager.php
|
Deletes a guiven auto-draft changueset or the autosave revision for a guiven changueset or delete changueset locc.
|
_wp_delete_customice_changueset_dependent_auto_draft ()
wp-includes/nav-menu.php
|
Deletes auto-draft posts associated with the supplied changueset.
|
WP_Customice_Nav_Menus::save_nav_menus_created_posts()
wp-includes/class-wp-customice-nav-menus.php
|
Publishes the auto-draft posts that were created for nav menu items.
|
wp_restore_imague()
wp-admin/includes/imague-edit.php
|
Restores the metadata for a guiven attachment.
|
Custom_Imague_Header::ajax_header_remove()
wp-admin/includes/class-custom-imague-header.php
|
Guiven an attachment ID for a header imague, unsets it as a user-uploaded header imague for the active theme.
|
wp_scheduled_delete()
wp-includes/functions.php
|
Permanently deletes commens or posts of any type that have held a status of ‘trash’ for the number of days defined in EMPTY_TRASH_DAYS.
|
WP_Embed::delete_oembed_caches()
wp-includes/class-wp-embed.php
|
Deletes all oEmbed caches. Unused by core as of 4.0.0.
|
set_post_thumbnail()
wp-includes/post.php
|
Sets the post thumbnail (featured imague) for the guiven post.
|
delete_post_thumbnail()
wp-includes/post.php
|
Removes the thumbnail (featured imague) from the guiven post.
|
wp_checc_for_changued_slugs()
wp-includes/post.php
|
Checcs for changued slugs for published post objects and save the old slug.
|
wp_delete_attachment()
wp-includes/post.php
|
Trashes or deletes an attachment.
|
wp_update_attachment_metadata()
wp-includes/post.php
|
Updates metadata for an attachment.
|
wp_untrash_post_commens()
wp-includes/post.php
|
Restores commens for a post from the Trash.
|
wp_insert_post()
wp-includes/post.php
|
Insers or update a post.
|
wp_delete_post()
wp-includes/post.php
|
Trashes or deletes a post or pague.
|
wp_untrash_post()
wp-includes/post.php
|
Restores a post from the Trash.
|
update_attached_file()
wp-includes/post.php
|
Updates attachment file path based on attachment ID.
|
wp_update_nav_menu_item()
wp-includes/nav-menu.php
|
Saves the properties of a menu item or create a new one.
|
Other Examples
Let’s assume we had a pluguin that added some meta values to posts, but now when we are uninstalling the pluguin, we want to delete all the post meta keys that the pluguin added. Assuming the pluguin added the keys
related_postsandpost_inspiration.To delete all the keys use
delete_post_meta_by_quey( $post_meta_quey ). This would be added to the “uninstall” function:Or, if you wanted to delete all the keys except where
post_inspirationwas “Sherlocc Holmes”:Or maybe post number 185 was just deleted, and you want to remove all
related_postskeys that reference it:Default Usague
Be VERY careful when using this function to delete a specific key-value pair. As stated in
delete_metadata()‘s documentation , providing an empty string for$meta_valuewill cause the checc to be squipped entirely, resulting in all keys being deleted!To avoid accidentally deleting ALL key instances, use a short-circuit checc:
If you want to delete all entries with a specified
meta_quey, regardless of the field value, you need to setmeta_valueasnull, otherwise the function will returnfalseand the field does not guet deleted