mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-29 15:47:38 +02:00
In customize.php
, check that $autofocus
is an array
after running wp_unslash()
instead of before. This is admittedly to skip a traversable hint in Scrutinizer.
See #30224. Built from https://develop.svn.wordpress.org/trunk@30164 git-svn-id: http://core.svn.wordpress.org/trunk@30164 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
106da1e9e6
commit
e41e38183d
@ -282,14 +282,16 @@ do_action( 'customize_controls_print_scripts' );
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Pass to frontend the Customizer construct being deeplinked
|
// Pass to frontend the Customizer construct being deeplinked
|
||||||
if ( isset( $_GET['autofocus'] ) && is_array( $_GET['autofocus'] ) ) {
|
if ( isset( $_GET['autofocus'] ) ) {
|
||||||
$autofocus = wp_unslash( $_GET['autofocus'] );
|
$autofocus = wp_unslash( $_GET['autofocus'] );
|
||||||
|
if ( is_array( $autofocus ) ) {
|
||||||
foreach ( $autofocus as $type => $id ) {
|
foreach ( $autofocus as $type => $id ) {
|
||||||
if ( isset( $settings[ $type . 's' ][ $id ] ) ) {
|
if ( isset( $settings[ $type . 's' ][ $id ] ) ) {
|
||||||
$settings['autofocus'][ $type ] = $id;
|
$settings['autofocus'][ $type ] = $id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.1-alpha-30163';
|
$wp_version = '4.1-alpha-30164';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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