WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/ transition post status


This function's access is marked as private. That means it is not intended for use by plugin and theme developers, but only in other core functions. It is listed here for completeness. Use any of these functions instead.

Description

Hook for managing future post transitions to published.

Usage

<?php _transition_post_status$new_status$old_status$post ?>

Parameters

$new_status
(string) (required) New post status
Default: None
$old_status
(string) (required) Previous post status
Default: None
$post
(object) (required) Object type containing the post information
Default: None

Return Values

(void) 
This function does not return a value.

Examples

Notes

  • This is a private function. It should not be called directly. It is listed in the Codex for completeness.
  • Uses: do_action() Calls 'private_to_published' on post ID if this is a 'private_to_published' call.
  • Uses: wp_clear_scheduled_hook() with 'publish_future_post' and post ID.
  • Uses global: (object) $wpdb

Change Log

Since: 2.3.0

Source File

_transition_post_status() is located in wp-includes/post.php.

Related

wp_transition_post_status() - calls hooks to transition the status of a post.