WP_Customize_Manager::changeset_post_id() WordPress Method

The WP_Customize_Manager::changeset_post_id() method is used to get the post ID for a Customizerchangeset.

WP_Customize_Manager::changeset_post_id() #

Gets the changeset post ID for the loaded changeset.


Return

(int|null) Post ID on success or null if there is no post yet saved.


Top ↑

Source

File: wp-includes/class-wp-customize-manager.php

	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;
	}


Top ↑

Changelog

Changelog
VersionDescription
4.7.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More