_count_posts_cache_key( string $type = 'post', string $perm = '' ): string

In this article

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Returns the cache key for wp_count_posts() based on the passed arguments.

Parameters

$typestringoptional
Post type to retrieve count Default 'post'.

Default:'post'

$permstringoptional
'readable' or empty.

Default:''

Return

string The cache key.

Source

 * @since 2.7.0
 *
 * @param int $post_id Post ID.
 */
function unstick_post( $post_id ) {
	$post_id  = (int) $post_id;
	$stickies = get_option( 'sticky_posts' );

	if ( ! is_array( $stickies ) ) {
		return;
	}

	$stickies = array_values( array_unique( array_map( 'intval', $stickies ) ) );

Changelog

VersionDescription
3.9.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.