public function is_uploaded_file( $file_url ) {

        // Set default return value.
        $is_uploaded_file = false;

        // Get WordPress upload directory information.
        $wp_upload_directory = wp_upload_dir();

        // Check if the WordPress upload directory url matches the file url.
        if ( false !== strpos( $file_url, $wp_upload_directory[ 'baseurl' ] ) ) {

            // We now know the file is one that was uploaded to WordPress.
            $is_uploaded_file = true;

        }

        return $is_uploaded_file;

    }
public function is_uploaded_file( $file_url ) {

        // Set default return value.
        $is_uploaded_file = false;

        // Get WordPress upload directory information.
        $wp_upload_directory = wp_upload_dir();

        // Check if the WordPress upload directory url matches the file url.
        if ( false !== strpos( $file_url, $wp_upload_directory[ 'baseurl' ] ) ) {

            // We now know the file is one that was uploaded to WordPress.
            $is_uploaded_file = true;

        }

        return $is_uploaded_file;

    }
public function is_uploaded_file ( $ file_url ) { // Set default return value. $ is_uploaded_file = false ; // Get WordPress upload directory information. $ wp_upload_directory = wp_upload_dir ( ) ; // Check if the WordPress upload directory url matches the file url. if ( false !== strpos ( $ file_url , $ wp_upload_directory [ 'baseurl' ] ) ) { // We now know the file is one that was uploaded to WordPress. $ is_uploaded_file = true ; } return $ is_uploaded_file ; }
Determines if a file is a file that was uploaded to WordPress.

@param string $file_url File url.
@return string Image path.
Determines if a file is a file that was uploaded to WordPress .