check_upload_mimes( array $mimes ): array

Checks an array of MIME types against a list of allowed types.

Description

WordPress ships with a set of allowed upload filetypes, which is defined in wp-includes/functions.php in get_allowed_mime_types() . This function is used to filter that list against the filetypes allowed provided by Multisite Super Admins at wp-admin/network/settings.php.

Parameters

$mimesarrayrequired

Return

array

Source

$user_blogs       = get_blogs_of_user( (int) $user_id );
$most_recent_post = array();

/*
 * Walk through each blog and get the most recent post
 * published by $user_id.
 */
foreach ( (array) $user_blogs as $blog ) {
	$prefix      = $wpdb->get_blog_prefix( $blog->userblog_id );
	$recent_post = $wpdb->get_row( $wpdb->prepare( "SELECT ID, post_date_gmt FROM {$prefix}posts WHERE post_author = %d AND post_type = 'post' AND post_status = 'publish' ORDER BY post_date_gmt DESC LIMIT 1", $user_id ), ARRAY_A );

	// Make sure we found a post.

Changelog

VersionDescription
MU (3.0.0)Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.