is_tag

Definition:
function is_tag( $slug = '' ) {}

Is the query for a tag archive page?
If the $tag parameter is specified, this function will additionally check if the query is for one of the tags specified.

Parameters

  • mixed $slug: Optional. Tag slug or array of slugs.

Source code

	function is_tag( $slug = '' ) {

		if ( !$this->is_tag )

			return false;



		if ( empty( $slug ) )

			return true;



		$tag_obj = $this->get_queried_object();



		$slug = (array) $slug;



		if ( in_array( $tag_obj->slug, $slug ) )

			return true;



		return false;

	}

2199

is_super_admin

Definition:
function is_super_admin( $user_id = false ) {}

Determine if user is a site admin.

Parameters

  • int $user_id: (Optional) The ID of a user. Defaults to the current user.

Return values

returns:True if the user is a site admin.

Source code

function is_super_admin( $user_id = false ) {

	if ( $user_id )

		$user = new WP_User( $user_id );

	else

		$user = wp_get_current_user();



	if ( empty( $user->ID ) )

		return false;



	if ( is_multisite() ) {

		$super_admins = get_super_admins();

		if ( is_array( $super_admins ) && in_array( $user->user_login, $super_admins ) )

			return true;

	} else {

		if ( $user->has_cap('delete_users') )

			return true;

	}



	return false;

}

2197

is_success

Definition:
function is_success ($sc) {}

Parameters

  • $sc

Source code

function is_success ($sc) {

	return $sc >= 200 && $sc < 300;

}

2195

is_subdomain_install

Definition:
function is_subdomain_install() {}

Whether a subdomain configuration is enabled.

Return values

returns:True if subdomain configuration is enabled, false otherwise.

Source code

function is_subdomain_install() {

	if ( defined('SUBDOMAIN_INSTALL') )

		return SUBDOMAIN_INSTALL;



	if ( defined('VHOST') && VHOST == 'yes' )

		return true;



	return false;

}

2193

is_sticky

Definition:
function is_sticky( $post_id = 0 ) {}

Check if post is sticky.
Sticky posts should remain at the top of The Loop. If the post ID is not given, then The Loop ID for the current post will be used.

Parameters

  • int $post_id: Optional. Post ID.

Return values

returns:Whether post is sticky.

Source code

function is_sticky( $post_id = 0 ) {

	$post_id = absint( $post_id );



	if ( ! $post_id )

		$post_id = get_the_ID();



	$stickies = get_option( 'sticky_posts' );



	if ( ! is_array( $stickies ) )

		return false;



	if ( in_array( $post_id, $stickies ) )

		return true;



	return false;

}

2191