Advertisements

get_theme_root

Definition:
function get_theme_root( $stylesheet_or_template = false ) {}

Retrieve path to themes directory.
Does not have trailing slash.

Parameters

  • string $stylesheet_or_template: The stylesheet or template name of the theme

Return values

returns:Theme path.

Defined filters

  • theme_root
    apply_filters( 'theme_root', $theme_root )

Source code

function get_theme_root( $stylesheet_or_template = false ) {

	if ( $stylesheet_or_template ) {

		if ( $theme_root = get_raw_theme_root($stylesheet_or_template) )

			$theme_root = WP_CONTENT_DIR . $theme_root;

		else

			$theme_root = WP_CONTENT_DIR . '/themes';

	} else {

		$theme_root = WP_CONTENT_DIR . '/themes';

	}



	return apply_filters( 'theme_root', $theme_root );

}

1773

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: