ap_user_can_upload_temp_media( integer $user_id = false )

Description #

Check if user have uploaded maximum numbers of allowed attachments.

Parameters #

  • $user_id
    integer (Optional) User ID. Default value: false

Source #

File: includes/upload.php

function ap_user_can_upload_temp_media( $user_id = false ) {
	if ( false === $user_id ) {
		$user_id = get_current_user_id();
	}

	// @codingStandardsIgnoreLine
	$temp_images = (int) get_user_meta( $user_id, '_ap_temp_media', true );

	if ( $temp_images < ap_opt( 'uploads_per_post' ) ) {
		return true;
	}

	return false;
}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment