post_unstuck
Action HookDescription
Fires once a post has been removed from the sticky list.Hook Information
File Location |
wp-includes/post.php
View on GitHub
|
Hook Type | Action |
Line Number | 3307 |
Hook Parameters
Type | Name | Description |
---|---|---|
int
|
$post_id
|
ID of the post that was unstuck. |
Usage Examples
Basic Usage
<?php
// Hook into post_unstuck
add_action('post_unstuck', 'my_custom_function', 10, 1);
function my_custom_function($post_id) {
// Your custom code here
}
Source Code Context
wp-includes/post.php:3307
- How this hook is used in WordPress core
<?php
3302 *
3303 * @since 4.6.0
3304 *
3305 * @param int $post_id ID of the post that was unstuck.
3306 */
3307 do_action( 'post_unstuck', $post_id );
3308 }
3309 }
3310
3311 /**
3312 * Returns the cache key for wp_count_posts() based on the passed arguments.
PHP Documentation
<?php
/**
* Fires once a post has been removed from the sticky list.
*
* @since 4.6.0
*
* @param int $post_id ID of the post that was unstuck.
*/
Quick Info
- Hook Type: Action
- Parameters: 1
- File: wp-includes/post.php
Related Hooks
Related hooks will be displayed here in future updates.