get_stylesheet_directory

Definition:
function get_stylesheet_directory() {}

Retrieve stylesheet directory path for current theme.

Return values

returns:Path to current theme directory.

Defined filters

  • stylesheet_directory
    apply_filters( 'stylesheet_directory', $stylesheet_dir, $stylesheet, $theme_root )

Source code

function get_stylesheet_directory() {

	$stylesheet = get_stylesheet();

	$theme_root = get_theme_root( $stylesheet );

	$stylesheet_dir = "$theme_root/$stylesheet";



	return apply_filters( 'stylesheet_directory', $stylesheet_dir, $stylesheet, $theme_root );

}

1709

get_stylesheet

Definition:
function get_stylesheet() {}

Retrieve name of the current stylesheet.
The theme name that the administrator has currently set the front end theme as.

Return values

returns:Stylesheet name.

Defined filters

  • stylesheet
    apply_filters('stylesheet', get_option('stylesheet')

Source code

function get_stylesheet() {

	return apply_filters('stylesheet', get_option('stylesheet'));

}

1707

get_status_header_desc

Definition:
function get_status_header_desc( $code ) {}

Retrieve the description for the HTTP status.

Parameters

  • int $code: HTTP status code.

Return values

returns:Empty string if not found, or description if found.

Source code

function get_status_header_desc( $code ) {

	global $wp_header_to_desc;



	$code = absint( $code );



	if ( !isset( $wp_header_to_desc ) ) {

		$wp_header_to_desc = array(

			100 => 'Continue',

			101 => 'Switching Protocols',

			102 => 'Processing',



			200 => 'OK',

			201 => 'Created',

			202 => 'Accepted',

			203 => 'Non-Authoritative Information',

			204 => 'No Content',

			205 => 'Reset Content',

			206 => 'Partial Content',

			207 => 'Multi-Status',

			226 => 'IM Used',



			300 => 'Multiple Choices',

			301 => 'Moved Permanently',

			302 => 'Found',

			303 => 'See Other',

			304 => 'Not Modified',

			305 => 'Use Proxy',

			306 => 'Reserved',

			307 => 'Temporary Redirect',



			400 => 'Bad Request',

			401 => 'Unauthorized',

			402 => 'Payment Required',

			403 => 'Forbidden',

			404 => 'Not Found',

			405 => 'Method Not Allowed',

			406 => 'Not Acceptable',

			407 => 'Proxy Authentication Required',

			408 => 'Request Timeout',

			409 => 'Conflict',

			410 => 'Gone',

			411 => 'Length Required',

			412 => 'Precondition Failed',

			413 => 'Request Entity Too Large',

			414 => 'Request-URI Too Long',

			415 => 'Unsupported Media Type',

			416 => 'Requested Range Not Satisfiable',

			417 => 'Expectation Failed',

			422 => 'Unprocessable Entity',

			423 => 'Locked',

			424 => 'Failed Dependency',

			426 => 'Upgrade Required',



			500 => 'Internal Server Error',

			501 => 'Not Implemented',

			502 => 'Bad Gateway',

			503 => 'Service Unavailable',

			504 => 'Gateway Timeout',

			505 => 'HTTP Version Not Supported',

			506 => 'Variant Also Negotiates',

			507 => 'Insufficient Storage',

			510 => 'Not Extended'

		);

	}



	if ( isset( $wp_header_to_desc[$code] ) )

		return $wp_header_to_desc[$code];

	else

		return '';

}

1705

get_space_allowed

Definition:
function get_space_allowed() {}

Returns the upload quota for the current blog.

Return values

returns:Quota

Source code

function get_space_allowed() {

	$space_allowed = get_option( 'blog_upload_space' );

	if ( $space_allowed == false )

		$space_allowed = get_site_option( 'blog_upload_space' );

	if ( empty( $space_allowed ) || !is_numeric( $space_allowed ) )

		$space_allowed = 50;



	return $space_allowed;

}

1703

get_site_url

Definition:
function get_site_url( $blog_id = null, $path = '', $scheme = null ) {}

Retrieve the site url for a given site.
Returns the ‘site_url’ option with the appropriate protocol, ‘https’ if is_ssl() and ‘http’ otherwise. If $scheme is ‘http’ or ‘https’, is_ssl() is overridden.

Parameters

  • int $blog_id: (optional) Blog ID. Defaults to current blog.
  • string $path: Optional. Path relative to the site url.
  • string $scheme: Optional. Scheme to give the site url context. Currently ‘http’, ‘https’, ‘login’, ‘login_post’, or ‘admin’.

Return values

returns:Site url link with optional path appended.

Source code

function get_site_url( $blog_id = null, $path = '', $scheme = null ) {

	// should the list of allowed schemes be maintained elsewhere?

	$orig_scheme = $scheme;

	if ( !in_array( $scheme, array( 'http', 'https' ) ) ) {

		if ( ( 'login_post' == $scheme || 'rpc' == $scheme ) && ( force_ssl_login() || force_ssl_admin() ) )

			$scheme = 'https';

		elseif ( ( 'login' == $scheme ) && force_ssl_admin() )

			$scheme = 'https';

		elseif ( ( 'admin' == $scheme ) && force_ssl_admin() )

			$scheme = 'https';

		else

			$scheme = ( is_ssl() ? 'https' : 'http' );

	}



	if ( empty( $blog_id ) || !is_multisite() )

		$url = get_option( 'siteurl' );

	else

		$url = get_blog_option( $blog_id, 'siteurl' );



	if ( 'http' != $scheme )

		$url = str_replace( 'http://', "{$scheme}://", $url );

1701