WP_Theme::parent() WordPress Method

The WP_Theme::parent() method is used to get the parent theme of the current theme. If the current theme does not have a parent theme, then this method will return null.

WP_Theme::parent() #

Returns reference to the parent theme.


Return

(WP_Theme|false) Parent theme, or false if the active theme is not a child theme.


Top ↑

Source

File: wp-includes/class-wp-theme.php

	public function parent() {
		return isset( $this->parent ) ? $this->parent : false;
	}


Top ↑

Changelog

Changelog
VersionDescription
3.4.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.