ap_count_users_temp_media( integer $user_id )
Description #
Count temporary attachments of a user.
Parameters #
- $user_idinteger (Required) User ID.
Source #
File: includes/upload.php
function ap_count_users_temp_media( $user_id ) { global $wpdb; $count = $wpdb->get_var( $wpdb->prepare( "SELECT count(*) FROM $wpdb->posts WHERE post_title = '_ap_temp_media' AND post_author=%d AND post_type='attachment'", $user_id ) ); // phpcs:ignore WordPress.DB return (int) $count; }
Expand full source code Collapse full source code View on GitHub: includes/upload.php:449
Add your comment