wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
wp_delete_post_revision › WordPress Function
Seit2.6.0
Veraltetn/v
› wp_delete_post_revision ( $revision )
Parameter: |
|
Gibt zurück: |
|
Definiert in: |
|
Codex: |
Deletes a revision.
Deletes the row from the posts table corresponding to the specified revision.Ähnliche Funktionen: wp_get_post_revision, wp_get_post_revisions, wp_restore_post_revision, wp_list_post_revisions, _wp_put_post_revision
Quellcode
function wp_delete_post_revision( $revision ) { $revision = wp_get_post_revision( $revision ); if ( ! $revision ) { return $revision; } $delete = wp_delete_post( $revision->ID ); if ( $delete ) { /** * Fires once a post revision has been deleted. * * @since 2.6.0 * * @param int $revision_id Post revision ID. * @param WP_Post $revision Post revision object. */ do_action( 'wp_delete_post_revision', $revision->ID, $revision ); } return $delete; }