WP_Customize_Manager::changeset_post_id()
Gets the changeset post ID for the loaded changeset.
Метод класса: WP_Customize_Manager{}
Хуков нет.
Возвращает
int|null
. Post ID on success or null if there is no post yet saved.
Использование
$WP_Customize_Manager = new WP_Customize_Manager(); $WP_Customize_Manager->changeset_post_id();
Список изменений
С версии 4.7.0 | Введена. |
Код WP_Customize_Manager::changeset_post_id() WP Customize Manager::changeset post id WP 6.8
public function changeset_post_id() { if ( ! isset( $this->_changeset_post_id ) ) { $post_id = $this->find_changeset_post_id( $this->changeset_uuid() ); if ( ! $post_id ) { $post_id = false; } $this->_changeset_post_id = $post_id; } if ( false === $this->_changeset_post_id ) { return null; } return $this->_changeset_post_id; }