Changeset 52352
- Timestamp:
- 12/10/2021 08:28:27 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/plugin.php
r52227 r52352 2524 2524 if ( ! empty( $plugin['version_compatible'] ) && ! empty( $plugin['version_deactivated'] ) ) { 2525 2525 $explanation = sprintf( 2526 /* translators: 1: Name of deactivated plugin, 2: Plugin version deactivated, 3: Current WP version, 4: Compatible plugin version */2526 /* translators: 1: Name of deactivated plugin, 2: Plugin version deactivated, 3: Current WP version, 4: Compatible plugin version. */ 2527 2527 __( '%1$s %2$s was deactivated due to incompatibility with WordPress %3$s, please upgrade to %1$s %4$s or later.' ), 2528 2528 $plugin['plugin_name'], … … 2533 2533 } else { 2534 2534 $explanation = sprintf( 2535 /* translators: 1: Name of deactivated plugin, 2: Plugin version deactivated, 3: Current WP version */2535 /* translators: 1: Name of deactivated plugin, 2: Plugin version deactivated, 3: Current WP version. */ 2536 2536 __( '%1$s %2$s was deactivated due to incompatibility with WordPress %3$s.' ), 2537 2537 $plugin['plugin_name'], … … 2545 2545 '<div class="notice notice-warning"><p><strong>%s</strong><br>%s</p><p><a href="%s">%s</a></p></div>', 2546 2546 sprintf( 2547 /* translators: %s: Name of deactivated plugin */2547 /* translators: %s: Name of deactivated plugin. */ 2548 2548 __( '%s plugin deactivated during WordPress upgrade.' ), 2549 2549 $plugin['plugin_name'] -
trunk/src/wp-admin/index.php
r47198 r52352 1 1 <?php 2 2 3 /* *3 /* 4 4 * Note: this file exists only to remind developers to build the assets. 5 5 * For the real wp-admin/index.php that gets built and boots WordPress, -
trunk/src/wp-admin/load-scripts.php
r52087 r52352 1 1 <?php 2 2 3 /* *3 /* 4 4 * Disable error reporting 5 5 * … … 8 8 error_reporting( 0 ); 9 9 10 / ** Set ABSPATH for execution */10 // Set ABSPATH for execution. 11 11 if ( ! defined( 'ABSPATH' ) ) { 12 12 define( 'ABSPATH', dirname( __DIR__ ) . '/' ); -
trunk/src/wp-admin/load-styles.php
r52087 r52352 1 1 <?php 2 2 3 /* *3 /* 4 4 * Disable error reporting 5 5 * … … 8 8 error_reporting( 0 ); 9 9 10 / ** Set ABSPATH for execution */10 // Set ABSPATH for execution. 11 11 if ( ! defined( 'ABSPATH' ) ) { 12 12 define( 'ABSPATH', dirname( __DIR__ ) . '/' ); -
trunk/src/wp-includes/class-wp-customize-manager.php
r52332 r52352 347 347 * 348 348 * @param string[] $components Array of core components to load. 349 * @param WP_Customize_Manager $manager WP_Customize_Manager instance.349 * @param WP_Customize_Manager $manager WP_Customize_Manager instance. 350 350 */ 351 351 $components = apply_filters( 'customize_loaded_components', $this->components, $this ); -
trunk/src/wp-includes/class-wp-customize-widgets.php
r51791 r52352 1422 1422 if ( 'block' === $id_base && ! current_user_can( 'unfiltered_html' ) ) { 1423 1423 /* 1424 * The content of the 'block' widget is not filtered on the 1425 * fly while editing. Filter the content here to prevent 1426 * vulnerabilities. 1424 * The content of the 'block' widget is not filtered on the fly while editing. 1425 * Filter the content here to prevent vulnerabilities. 1427 1426 */ 1428 1427 $value['raw_instance']['content'] = wp_kses_post( $value['raw_instance']['content'] ); -
trunk/src/wp-includes/default-filters.php
r52316 r52352 675 675 add_filter( 'user_has_cap', 'wp_maybe_grant_site_health_caps', 1, 4 ); 676 676 677 // Block Templates post type and Rendering677 // Block templates post type and rendering. 678 678 add_filter( 'render_block_context', '_block_template_render_without_post_block_context' ); 679 679 add_filter( 'pre_wp_unique_post_slug', 'wp_filter_wp_template_unique_post_slug', 10, 5 ); -
trunk/src/wp-includes/functions.php
r52215 r52352 2539 2539 } 2540 2540 2541 // Get the mime type. Uploaded files were already checked with wp_check_filetype_and_ext() 2542 // in _wp_handle_upload(). Using wp_check_filetype() would be sufficient here. 2541 /* 2542 * Get the mime type. Uploaded files were already checked with wp_check_filetype_and_ext() 2543 * in _wp_handle_upload(). Using wp_check_filetype() would be sufficient here. 2544 */ 2543 2545 $file_type = wp_check_filetype( $filename ); 2544 2546 $mime_type = $file_type['type']; … … 2551 2553 $_dir = trailingslashit( $dir ); 2552 2554 2553 // If the extension is uppercase add an alternate file name with lowercase extension. Both need to be tested 2554 // for uniqueness as the extension will be changed to lowercase for better compatibility with different filesystems. 2555 // Fixes an inconsistency in WP < 2.9 where uppercase extensions were allowed but image sub-sizes were created with 2556 // lowercase extensions. 2555 /* 2556 * If the extension is uppercase add an alternate file name with lowercase extension. 2557 * Both need to be tested for uniqueness as the extension will be changed to lowercase 2558 * for better compatibility with different filesystems. Fixes an inconsistency in WP < 2.9 2559 * where uppercase extensions were allowed but image sub-sizes were created with 2560 * lowercase extensions. 2561 */ 2557 2562 if ( $ext && $lc_ext !== $ext ) { 2558 2563 $lc_filename = preg_replace( '|' . preg_quote( $ext ) . '$|', $lc_ext, $filename ); 2559 2564 } 2560 2565 2561 // Increment the number added to the file name if there are any files in $dir whose names match one of the 2562 // possible name variations. 2566 /* 2567 * Increment the number added to the file name if there are any files in $dir 2568 * whose names match one of the possible name variations. 2569 */ 2563 2570 while ( file_exists( $_dir . $filename ) || ( $lc_filename && file_exists( $_dir . $lc_filename ) ) ) { 2564 2571 $new_number = (int) $number + 1; 2565 2572 2566 2573 if ( $lc_filename ) { 2567 $lc_filename = str_replace( array( "-{$number}{$lc_ext}", "{$number}{$lc_ext}" ), "-{$new_number}{$lc_ext}", $lc_filename ); 2574 $lc_filename = str_replace( 2575 array( "-{$number}{$lc_ext}", "{$number}{$lc_ext}" ), 2576 "-{$new_number}{$lc_ext}", 2577 $lc_filename 2578 ); 2568 2579 } 2569 2580 … … 2571 2582 $filename = "{$filename}-{$new_number}"; 2572 2583 } else { 2573 $filename = str_replace( array( "-{$number}{$ext}", "{$number}{$ext}" ), "-{$new_number}{$ext}", $filename ); 2584 $filename = str_replace( 2585 array( "-{$number}{$ext}", "{$number}{$ext}" ), 2586 "-{$new_number}{$ext}", 2587 $filename 2588 ); 2574 2589 } 2575 2590 … … 2582 2597 } 2583 2598 2584 // Prevent collisions with existing file names that contain dimension-like strings 2585 // (whether they are subsizes or originals uploaded prior to #42437). 2599 /* 2600 * Prevent collisions with existing file names that contain dimension-like strings 2601 * (whether they are subsizes or originals uploaded prior to #42437). 2602 */ 2586 2603 2587 2604 $files = array(); … … 2618 2635 $count = count( $files ); 2619 2636 2620 // Ensure this never goes into infinite loop 2621 // as it uses pathinfo() and regex in the check, but string replacement for the changes. 2637 /* 2638 * Ensure this never goes into infinite loop as it uses pathinfo() and regex in the check, 2639 * but string replacement for the changes. 2640 */ 2622 2641 $i = 0; 2623 2642 … … 2626 2645 2627 2646 // If $ext is uppercase it was replaced with the lowercase version after the previous loop. 2628 $filename = str_replace( array( "-{$number}{$lc_ext}", "{$number}{$lc_ext}" ), "-{$new_number}{$lc_ext}", $filename ); 2647 $filename = str_replace( 2648 array( "-{$number}{$lc_ext}", "{$number}{$lc_ext}" ), 2649 "-{$new_number}{$lc_ext}", 2650 $filename 2651 ); 2629 2652 2630 2653 $number = $new_number; … … 2634 2657 } 2635 2658 2636 // Check if an image will be converted after uploading or some existing images sub-sizes file names may conflict 2637 // when regenerated. If yes, ensure the new file name will be unique and will produce unique sub-sizes. 2659 /* 2660 * Check if an image will be converted after uploading or some existing image sub-size file names may conflict 2661 * when regenerated. If yes, ensure the new file name will be unique and will produce unique sub-sizes. 2662 */ 2638 2663 if ( $is_image ) { 2639 2664 /** This filter is documented in wp-includes/class-wp-image-editor.php */ … … 2669 2694 2670 2695 if ( ! empty( $alt_filenames ) ) { 2671 // Add the original filename. It needs to be checked again together with the alternate filenames 2672 // when $number is incremented. 2696 /* 2697 * Add the original filename. It needs to be checked again 2698 * together with the alternate filenames when $number is incremented. 2699 */ 2673 2700 $alt_filenames[ $lc_ext ] = $filename; 2674 2701 … … 2680 2707 2681 2708 foreach ( $alt_filenames as $alt_ext => $alt_filename ) { 2682 $alt_filenames[ $alt_ext ] = str_replace( array( "-{$number}{$alt_ext}", "{$number}{$alt_ext}" ), "-{$new_number}{$alt_ext}", $alt_filename ); 2709 $alt_filenames[ $alt_ext ] = str_replace( 2710 array( "-{$number}{$alt_ext}", "{$number}{$alt_ext}" ), 2711 "-{$new_number}{$alt_ext}", 2712 $alt_filename 2713 ); 2683 2714 } 2684 2715 2685 // Also update the $number in (the output) $filename. 2686 // If the extension was uppercase it was already replaced with the lowercase version. 2687 $filename = str_replace( array( "-{$number}{$lc_ext}", "{$number}{$lc_ext}" ), "-{$new_number}{$lc_ext}", $filename ); 2716 /* 2717 * Also update the $number in (the output) $filename. 2718 * If the extension was uppercase it was already replaced with the lowercase version. 2719 */ 2720 $filename = str_replace( 2721 array( "-{$number}{$lc_ext}", "{$number}{$lc_ext}" ), 2722 "-{$new_number}{$lc_ext}", 2723 $filename 2724 ); 2688 2725 2689 2726 $number = $new_number; -
trunk/src/wp-includes/load.php
r52144 r52352 427 427 * 428 428 * This filter runs before it can be used by plugins. It is designed for 429 * non-web run -times. Returning false causes the `WP_DEBUG` and related429 * non-web runtimes. Returning false causes the `WP_DEBUG` and related 430 430 * constants to not be checked and the default PHP values for errors 431 431 * will be used unless you take care to update them yourself. … … 674 674 * 675 675 * This filter runs before it can be used by plugins. It is designed for non-web 676 * run -times. If false is returned, object-cache.php will never be loaded.676 * runtimes. If false is returned, object-cache.php will never be loaded. 677 677 * 678 678 * @since 5.8.0 -
trunk/src/wp-includes/template-canvas.php
r52069 r52352 6 6 */ 7 7 8 /* *8 /* 9 9 * Get the template HTML. 10 10 * This needs to run before <head> so that blocks can add scripts and styles in wp_head(). -
trunk/src/wp-includes/user.php
r52076 r52352 2159 2159 * 2160 2160 * @since 4.9.0 2161 * @since 5.8.0 The $userdataparameter was added.2161 * @since 5.8.0 The `$userdata` parameter was added. 2162 2162 * 2163 2163 * @param array $data { … … 2204 2204 * 2205 2205 * @since 4.4.0 2206 * @since 5.8.0 The $userdataparameter was added.2206 * @since 5.8.0 The `$userdata` parameter was added. 2207 2207 * 2208 2208 * @param array $meta { … … 2275 2275 * 2276 2276 * @since 2.0.0 2277 * @since 5.8.0 The $userdataparameter was added.2277 * @since 5.8.0 The `$userdata` parameter was added. 2278 2278 * 2279 2279 * @param int $user_id User ID. … … 2309 2309 * 2310 2310 * @since 1.5.0 2311 * @since 5.8.0 The $userdataparameter was added.2311 * @since 5.8.0 The `$userdata` parameter was added. 2312 2312 * 2313 2313 * @param int $user_id User ID. -
trunk/tests/phpunit/data/widgets/custom-widget-classes.php
r50953 r52352 2 2 namespace Test\Sub\Sub { 3 3 4 class Namespaced_Widget extends \WP_Widget { 5 } 4 class Namespaced_Widget extends \WP_Widget {} 6 5 7 6 } … … 9 8 namespace { 10 9 11 class Non_Namespaced_Widget extends \WP_Widget { 12 } 10 class Non_Namespaced_Widget extends \WP_Widget {} 13 11 14 12 } -
trunk/tests/phpunit/tests/option/sanitize-option.php
r52294 r52352 156 156 array( '/%year%/%monthnum%/%day%/%postname%/', '/%year%/%monthnum%/%day%/%postname%/', true ), 157 157 array( '/%year/%postname%/', '/%year/%postname%/', true ), 158 array( new WP_Error( 'wpdb_get_table_charset_failure' ), false, false ), // ticket 53986158 array( new WP_Error( 'wpdb_get_table_charset_failure' ), false, false ), // @ticket 53986 159 159 ); 160 160 } -
trunk/tests/phpunit/tests/user.php
r52010 r52352 1910 1910 */ 1911 1911 public function filter_custom_meta( $meta_input ) { 1912 // Update some meta inputs 1912 // Update some meta inputs. 1913 1913 $meta_input['test_meta_key'] = 'update_from_filter'; 1914 // Add a new meta 1914 // Add a new meta. 1915 1915 $meta_input['new_meta_from_filter'] = 'new_from_filter'; 1916 1916
Note: See TracChangeset
for help on using the changeset viewer.