get_theme_updates

Definition:
function get_theme_updates() {}

Source code

function get_theme_updates() {

	$themes = get_themes();

	$current = get_site_transient('update_themes');

	$update_themes = array();



	foreach ( $themes as $theme ) {

		$theme = (object) $theme;

		if ( isset($current->response[ $theme->Stylesheet ]) ) {

			$update_themes[$theme->Stylesheet] = $theme;

			$update_themes[$theme->Stylesheet]->update = $current->response[ $theme->Stylesheet ];

		}

	}



	return $update_themes;

}

1779

get_theme_root_uri

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

Retrieve URI for themes directory.
Does not have trailing slash.

Parameters

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

Return values

returns:Themes URI.

Defined filters

  • theme_root_uri
    apply_filters( 'theme_root_uri', $theme_root_uri, get_option('siteurl')

Source code

function get_theme_root_uri( $stylesheet_or_template = false ) {

	if ( $stylesheet_or_template ) {

		if ( $theme_root = get_raw_theme_root($stylesheet_or_template) )

			$theme_root_uri = content_url( $theme_root );

		else

			$theme_root_uri = content_url( 'themes' );

	} else {

		$theme_root_uri = content_url( 'themes' );

	}



	return apply_filters( 'theme_root_uri', $theme_root_uri, get_option('siteurl'), $stylesheet_or_template );

}

1777

get_theme_roots

Definition:
function get_theme_roots() {}

Retrieve theme roots.

Return values

returns:An array of theme roots keyed by template/stylesheet or a single theme root if all themes have the same root.

Source code

function get_theme_roots() {

	global $wp_theme_directories;



	if ( count($wp_theme_directories) <= 1 )

		return '/themes';



	$theme_roots = get_site_transient( 'theme_roots' );

	if ( false === $theme_roots ) {

		get_themes();

		$theme_roots = get_site_transient( 'theme_roots' ); // this is set in get_theme()

	}

	return $theme_roots;

}

1775

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

get_theme_mod

Definition:
function get_theme_mod( $name, $default = false ) {}

Retrieve theme modification value for the current theme.
If the modification name does not exist, then the $default will be passed through sprintf() PHP function with the first string the template directory URI and the second string the stylesheet directory URI.

Parameters

  • string $name: Theme modification name.
  • bool|string $default

Defined filters

  • theme_mod_$name
    apply_filters( "theme_mod_$name", $mods[ $name ] )
  • theme_mod_$name
    apply_filters( "theme_mod_$name", sprintf( $default, get_template_directory_uri()

Source code

function get_theme_mod( $name, $default = false ) {

	$mods = get_theme_mods();



	if ( isset( $mods[ $name ] ) )

		return apply_filters( "theme_mod_$name", $mods[ $name ] );



	return apply_filters( "theme_mod_$name", sprintf( $default, get_template_directory_uri(), get_stylesheet_directory_uri() ) );

}

1771