wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_untrash_post_set_previous_status › WordPress Function

Seit5.6.0
Veraltetn/v
wp_untrash_post_set_previous_status ( $new_status, $post_id, $previous_status )
Parameter: (3)
  • (string) $new_status The new status of the post being restored.
    Erforderlich: Ja
  • (int) $post_id The ID of the post being restored.
    Erforderlich: Ja
  • (string) $previous_status The status of the post at the point where it was trashed.
    Erforderlich: Ja
Gibt zurück:
  • (string) The new status of the post.
Definiert in:
Codex:

Filters callback which sets the status of an untrashed post to its previous status.

This can be used as a callback on the wp_untrash_post_status filter.


Quellcode

function wp_untrash_post_set_previous_status( $new_status, $post_id, $previous_status ) {
	return $previous_status;
}