AnsPress_Views::delete_views( integer $post_id )
Description #
Delete views count when post is deleted.
Parameters #
- $post_idinteger (Required) Post ID.
Source #
File: includes/views.php
public static function delete_views( $post_id ) { global $wpdb; if ( apply_filters( 'ap_insert_view_to_db', false ) ) { $wpdb->delete( $wpdb->ap_views, array( 'view_ref_id' => $post_id ), array( '%d' ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery } }
Expand full source code Collapse full source code View on GitHub: includes/views.php:57
Add your comment