Changeset 47968 for branches/4.0
- Timestamp:
- 06/10/2020 06:28:04 PM (4 years ago)
- Location:
- branches/4.0
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.0
- Property svn:mergeinfo changed
/trunk merged: 47947-47951
- Property svn:mergeinfo changed
-
branches/4.0/src/wp-admin/includes/media.php
r40467 r47968 2690 2690 if ( preg_match( '#^(audio|video)/#', $post->post_mime_type ) ) { 2691 2691 echo ': ' . __( 'Displayed on attachment pages.' ); 2692 } ?></label> 2693 <?php wp_editor( $post->post_content, 'attachment_content', $editor_args ); ?> 2692 } 2693 2694 ?> 2695 </label> 2696 <?php wp_editor( format_to_edit( $post->post_content ), 'attachment_content', $editor_args ); ?> 2694 2697 2695 2698 </div> -
branches/4.0/src/wp-admin/includes/misc.php
r29707 r47968 406 406 break; 407 407 default: 408 if ( '_page' === substr( $option, -5 ) || 'layout_columns' === $option ) { 409 /** 410 * Filters a screen option value before it is set. 411 * 412 * The filter can also be used to modify non-standard [items]_per_page 413 * settings. See the parent function for a full list of standard options. 414 * 415 * Returning false to the filter will skip saving the current option. 416 * 417 * @since 2.8.0 418 * @since 5.4.2 Only applied to options ending with '_page', 419 * or the 'layout_columns' option. 420 * 421 * @see set_screen_options() 422 * 423 * @param bool $keep Whether to save or skip saving the screen option value. 424 * Default false. 425 * @param string $option The option name. 426 * @param int $value The number of rows to use. 427 */ 428 $value = apply_filters( 'set-screen-option', false, $option, $value ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores 429 } 408 430 409 431 /** 410 432 * Filter a screen option value before it is set. 411 433 * 412 * The filter can also be used to modify non-standard [items]_per_page 413 * settings. See the parent function for a full list of standard options. 434 * The dynamic portion of the hook, `$option`, refers to the option name. 414 435 * 415 436 * Returning false to the filter will skip saving the current option. 416 437 * 417 * @since 2.8.0438 * @since 5.4.2 418 439 * 419 440 * @see set_screen_options() 420 441 * 421 * @param bool|int $value Screen option value. Default false to skip. 422 * @param string $option The option name. 423 * @param int $value The number of rows to use. 442 * @param bool $keep Whether to save or skip saving the screen option value. 443 * Default false. 444 * @param string $option The option name. 445 * @param int $value The number of rows to use. 424 446 */ 425 $value = apply_filters( 'set-screen-option', false, $option, $value );447 $value = apply_filters( "set_screen_option_{$option}", false, $option, $value ); 426 448 427 449 if ( false === $value ) -
branches/4.0/src/wp-admin/themes.php
r29596 r47968 256 256 echo " 257 257 <tr> 258 <td> " . ( $broken_theme->get( 'Name' ) ? $broken_theme->get( 'Name' ) : $broken_theme->get_stylesheet() ) . "</td>258 <td><?php echo $broken_theme->get( 'Name' ) ? $broken_theme->display( 'Name' ) : esc_html( $broken_theme->get_stylesheet() ); ?></td> 259 259 <td>" . $broken_theme->errors()->get_error_message() . "</td> 260 260 </tr>"; -
branches/4.0/src/wp-includes/pluggable.php
r46502 r47968 1197 1197 **/ 1198 1198 function wp_sanitize_redirect($location) { 1199 $location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%!* ]|i', '', $location);1199 $location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%!*@]|i', '', $location); 1200 1200 $location = wp_kses_no_null($location); 1201 1201 … … 1253 1253 **/ 1254 1254 function wp_validate_redirect($location, $default = '') { 1255 $location = trim( $location, " \t\n\r\0\x08\x0B");1255 $location = wp_sanitize_redirect( trim( $location, " \t\n\r\0\x08\x0B" ) ); 1256 1256 // browsers will assume 'http' is your protocol, and will obey a redirect to a URL starting with '//' 1257 1257 if ( substr($location, 0, 2) == '//' ) -
branches/4.0/tests/phpunit/tests/formatting/redirect.php
r40191 r47968 28 28 $this->assertEquals('http://example.com/watchthecarriagereturngo', wp_sanitize_redirect('http://example.com/watchthecarriagereturn%0%0ddgo')); 29 29 $this->assertEquals('http://example.com/watchthecarriagereturngo', wp_sanitize_redirect('http://example.com/watchthecarriagereturn%0%0DDgo')); 30 $this->assertEquals('http://example.com/@username', wp_sanitize_redirect('http://example.com/@username')); 30 31 } 31 32
Note: See TracChangeset
for help on using the changeset viewer.