diff --git a/wp-includes/media.php b/wp-includes/media.php index 8b8b862e5d..3d8507ff90 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -4029,9 +4029,11 @@ function wp_prepare_attachment_for_js( $attachment ) { $response['compat'] = get_compat_media_markup( $attachment->ID, array( 'in_modal' => true ) ); } - $media_states = get_media_states( $attachment ); - if ( ! empty( $media_states ) ) { - $response['mediaStates'] = implode( ', ', $media_states ); + if ( function_exists( 'get_media_states' ) ) { + $media_states = get_media_states( $attachment ); + if ( ! empty( $media_states ) ) { + $response['mediaStates'] = implode( ', ', $media_states ); + } } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index b87bbc1b28..344a968f57 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-beta4-49612'; +$wp_version = '5.6-beta4-49613'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.