Avoid a PHP notice in wp_enqueue_media()
if $post
is null.
see #19257. Built from https://develop.svn.wordpress.org/trunk@32675 git-svn-id: http://core.svn.wordpress.org/trunk@32645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ff3f2ac243
commit
3fc78a1109
@ -3008,7 +3008,11 @@ function wp_enqueue_media( $args = array() ) {
|
|||||||
|
|
||||||
$hier = $post && is_post_type_hierarchical( $post->post_type );
|
$hier = $post && is_post_type_hierarchical( $post->post_type );
|
||||||
|
|
||||||
|
if ( $post ) {
|
||||||
$post_type_object = get_post_type_object( $post->post_type );
|
$post_type_object = get_post_type_object( $post->post_type );
|
||||||
|
} else {
|
||||||
|
$post_type_object = get_post_type_object( 'post' );
|
||||||
|
}
|
||||||
|
|
||||||
$strings = array(
|
$strings = array(
|
||||||
// Generic
|
// Generic
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.3-alpha-32674';
|
$wp_version = '4.3-alpha-32675';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user