Recent

tptn_set_count action

tptn_set_count

Set count for a post to a specific value.

Type: action
Since: 4.2.0
Source: includes/class-database.php line 146

Parameters

TypeNameDescription
int$post_idPost ID.
int$countCount value to set.
int$blog_idBlog ID (optional, defaults to current blog).
bool$dailyWhether to update daily count.

Usage

add_action( 'tptn_set_count', function($post_id, $count, $blog_id, $daily) {
    // ...
} );