Returns the cache key for wp_count_posts() based on the passed arguments.
Parameters
$type
stringoptional- Post type to retrieve count Default
'post'
.Default:
'post'
$perm
stringoptional'readable'
or empty.Default:
''
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
Version | Description |
---|---|
3.9.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.