is_protected_meta

Definition:
function is_protected_meta( $meta_key, $meta_type = null ) {}

Determine whether a meta key is protected

Parameters

  • string $meta_key: Meta key
  • $meta_type

Return values

returns:True if the key is protected, false otherwise.

Defined filters

  • is_protected_meta
    apply_filters( 'is_protected_meta', $protected, $meta_key, $meta_type )

Source code

function is_protected_meta( $meta_key, $meta_type = null ) {

	$protected = ( '_' == $meta_key[0] );



	return apply_filters( 'is_protected_meta', $protected, $meta_key, $meta_type );

}

14227

is_multi_author

Definition:
function is_multi_author() {}

Does this site have more than one author
Checks to see if more than one author has published posts.

Return values

returns:Whether or not we have more than one author

Defined filters

  • is_multi_author
    apply_filters( 'is_multi_author', (bool)

Source code

function is_multi_author() {

	global $wpdb;



	if ( false === ( $is_multi_author = wp_cache_get('is_multi_author', 'posts') ) ) {

		$rows = (array) $wpdb->get_col("SELECT DISTINCT post_author FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' LIMIT 2");

		$is_multi_author = 1 < count( $rows ) ? 1 : 0;

		wp_cache_set('is_multi_author', $is_multi_author, 'posts');

	}



	return apply_filters( 'is_multi_author', (bool) $is_multi_author );

}

14208

get_uploaded_header_images

Definition:
function get_uploaded_header_images() {}

Get the header images uploaded for the current theme.

Source code

function get_uploaded_header_images() {

	$header_images = array();



	// @todo caching

	$headers = get_posts( array( 'post_type' => 'attachment', 'meta_key' => '_wp_attachment_is_custom_header', 'meta_value' => get_option('stylesheet'), 'orderby' => 'none', 'nopaging' => true ) );



	if ( empty( $headers ) )

		return array();



	foreach ( (array) $headers as $header ) {

		$url = esc_url_raw( $header->guid );

		$header = basename($url);

		$header_images[$header] = array();

		$header_images[$header]['url'] =  $url;

		$header_images[$header]['thumbnail_url'] =  $url;

		$header_images[$header]['uploaded'] = true;

	}



	return $header_images;

}

14077

get_temp_dir

Definition:
function get_temp_dir() {}

Determines a writable directory for temporary files.
Function’s preference is to WP_CONTENT_DIR followed by the return value of

Return values

returns:Writable temporary directory

Source code

function get_temp_dir() {

	static $temp;

	if ( defined('WP_TEMP_DIR') )

		return trailingslashit(WP_TEMP_DIR);



	if ( $temp )

		return trailingslashit($temp);



	$temp = WP_CONTENT_DIR . '/';

	if ( is_dir($temp) && @is_writable($temp) )

		return $temp;



	if  ( function_exists('sys_get_temp_dir') ) {

		$temp = sys_get_temp_dir();

		if ( @is_writable($temp) )

			return trailingslashit($temp);

	}



	$temp = ini_get('upload_tmp_dir');

	if ( is_dir($temp) && @is_writable($temp) )

		return trailingslashit($temp);



	$temp = '/tmp/';

	return $temp;

}

14009

get_screen_icon

Definition:
function get_screen_icon( $screen = '' ) {}

Parameters

  • $screen

Source code

function get_screen_icon( $screen = '' ) {

	global $current_screen, $typenow;



	if ( empty($screen) )

		$screen = $current_screen;

	elseif ( is_string($screen) )

		$name = $screen;



	$class = 'icon32';



	if ( empty($name) ) {

		if ( !empty($screen->parent_base) )

			$name = $screen->parent_base;

		else

			$name = $screen->base;



		if ( 'edit' == $name && isset($screen->post_type) && 'page' == $screen->post_type )

			$name = 'edit-pages';



		$post_type = '';

		if ( isset( $screen->post_type ) )

			$post_type = $screen->post_type;

		elseif ( $current_screen == $screen )

			$post_type = $typenow;

		if ( $post_type )

			$class .= ' ' . sanitize_html_class( 'icon32-posts-' . $post_type );

	}



	return '<div id="icon-' . esc_attr( $name ) . '" class="' . $class . '"><br /></div>';

}

13967