Changeset 58973
- Timestamp:
- 09/03/2024 04:39:29 PM (6 weeks ago)
- Location:
- branches/6.6
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.6
-
branches/6.6/src/wp-admin/customize.php
r58069 r58973 85 85 } 86 86 87 $url = ! empty( $_REQUEST['url'] ) ? sanitize_text_field( $_REQUEST['url'] ) : ''; 88 $return = ! empty( $_REQUEST['return'] ) ? sanitize_text_field( $_REQUEST['return'] ) : ''; 89 $autofocus = ! empty( $_REQUEST['autofocus'] ) ? sanitize_text_field( $_REQUEST['autofocus'] ) : ''; 87 $url = ! empty( $_REQUEST['url'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['url'] ) ) : ''; 88 $return = ! empty( $_REQUEST['return'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['return'] ) ) : ''; 89 $autofocus = ! empty( $_REQUEST['autofocus'] ) && is_array( $_REQUEST['autofocus'] ) 90 ? array_map( 'sanitize_text_field', wp_unslash( $_REQUEST['autofocus'] ) ) 91 : array(); 90 92 91 93 if ( ! empty( $url ) ) { 92 $wp_customize->set_preview_url( wp_unslash( $url ));94 $wp_customize->set_preview_url( $url ); 93 95 } 94 96 if ( ! empty( $return ) ) { 95 $wp_customize->set_return_url( wp_unslash( $return ));96 } 97 if ( ! empty( $autofocus ) && is_array( $autofocus )) {98 $wp_customize->set_autofocus( wp_unslash( $autofocus ));97 $wp_customize->set_return_url( $return ); 98 } 99 if ( ! empty( $autofocus ) ) { 100 $wp_customize->set_autofocus( $autofocus ); 99 101 } 100 102
Note: See TracChangeset
for help on using the changeset viewer.