Retrieves the ID of the currently queried object.
Source
* @return WP_Term|WP_Post_Type|WP_Post|WP_User|null The queried object.
*/
public function get_queried_object() {
if ( isset( $this->queried_object ) ) {
return $this->queried_object;
}
$this->queried_object = null;
$this->queried_object_id = null;
Changelog
Version | Description |
---|---|
1.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.