Changeset 56680
- Timestamp:
- 09/25/2023 03:34:34 PM (18 months ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/options-general.php
r56573 r56680 141 141 $new_admin_email = get_option( 'new_admin_email' ); 142 142 if ( $new_admin_email && get_option( 'admin_email' ) !== $new_admin_email ) { 143 $pending_admin_email_message 143 $pending_admin_email_message = sprintf( 144 144 /* translators: %s: New admin email. */ 145 145 __( 'There is a pending change of the admin email to %s.' ), -
trunk/src/wp-admin/plugins.php
r56600 r56680 691 691 692 692 } elseif ( isset( $_GET['deleted'] ) ) { 693 $delete_result 693 $delete_result = get_transient( 'plugins_delete_result_' . $user_ID ); 694 694 // Delete it once we're done. 695 695 delete_transient( 'plugins_delete_result_' . $user_ID ); -
trunk/src/wp-admin/user-edit.php
r56602 r56680 551 551 if ( $new_email && $new_email['newemail'] !== $current_user->user_email && $profile_user->ID === $current_user->ID ) : 552 552 553 $pending_change_message 553 $pending_change_message = sprintf( 554 554 /* translators: %s: New email. */ 555 555 __( 'There is a pending change of your email to %s.' ), -
trunk/src/wp-includes/block-supports/elements.php
r56604 r56680 99 99 foreach ( $element_config['paths'] as $path ) { 100 100 if ( null !== _wp_array_get( $block['attrs'], explode( '.', $path ), null ) ) { 101 $element_colors_set++;101 ++$element_colors_set; 102 102 } 103 103 } -
trunk/src/wp-includes/blocks.php
r56678 r56680 791 791 * `first_child`, respectively, to the serialized markup for the given block. 792 792 * 793 * @param array $block The block to inject the theme attribute into, and hooked blocks before.794 * @param array $parent The parent block of the given block.795 * @param array $prev The previous sibling block of the given block.793 * @param array $block The block to inject the theme attribute into, and hooked blocks before. 794 * @param array $parent_block The parent block of the given block. 795 * @param array $prev The previous sibling block of the given block. 796 796 * @return string The serialized markup for the given block, with the markup for any hooked blocks prepended to it. 797 797 */ 798 return function ( &$block, $parent= null, $prev = null ) use ( $context ) {798 return function ( &$block, $parent_block = null, $prev = null ) use ( $context ) { 799 799 _inject_theme_attribute_in_template_part_block( $block ); 800 800 801 801 $markup = ''; 802 802 803 if ( $parent && ! $prev ) {803 if ( $parent_block && ! $prev ) { 804 804 // Candidate for first-child insertion. 805 805 $relative_position = 'first_child'; 806 $anchor_block_type = $parent ['blockName'];806 $anchor_block_type = $parent_block['blockName']; 807 807 $hooked_block_types = array_keys( get_hooked_blocks( $anchor_block_type, $relative_position ) ); 808 808 /** … … 857 857 * `last_child`, respectively, to the serialized markup for the given block. 858 858 * 859 * @param array $block The block to inject the hooked blocks after.860 * @param array $parent The parent block of the given block.861 * @param array $next The next sibling block of the given block.859 * @param array $block The block to inject the hooked blocks after. 860 * @param array $parent_block The parent block of the given block. 861 * @param array $next The next sibling block of the given block. 862 862 * @return string The serialized markup for the given block, with the markup for any hooked blocks appended to it. 863 863 */ 864 return function ( &$block, $parent= null, $next = null ) use ( $context ) {864 return function ( &$block, $parent_block = null, $next = null ) use ( $context ) { 865 865 $markup = ''; 866 866 … … 874 874 } 875 875 876 if ( $parent && ! $next ) {876 if ( $parent_block && ! $next ) { 877 877 // Candidate for last-child insertion. 878 878 $relative_position = 'last_child'; 879 $anchor_block_type = $parent ['blockName'];879 $anchor_block_type = $parent_block['blockName']; 880 880 $hooked_block_types = array_keys( get_hooked_blocks( $anchor_block_type, $relative_position ) ); 881 881 /** This filter is documented in wp-includes/blocks.php */ … … 1060 1060 ? null 1061 1061 : $block['innerBlocks'][ $block_index - 1 ]; 1062 1062 1063 $block_content .= call_user_func_array( 1063 1064 $pre_callback, … … 1072 1073 ? null 1073 1074 : $block['innerBlocks'][ $block_index + 1 ]; 1075 1074 1076 $block_content .= call_user_func_array( 1075 1077 $post_callback, … … 1077 1079 ); 1078 1080 } 1079 $block_index++;1081 ++$block_index; 1080 1082 } 1081 1083 } … … 1131 1133 ? null 1132 1134 : $blocks[ $index - 1 ]; 1135 1133 1136 $result .= call_user_func_array( 1134 1137 $pre_callback, … … 1136 1139 ); 1137 1140 } 1141 1138 1142 $result .= traverse_and_serialize_block( $block, $pre_callback, $post_callback ); 1143 1139 1144 if ( is_callable( $post_callback ) ) { 1140 1145 $next = count( $blocks ) - 1 === $index 1141 1146 ? null 1142 1147 : $blocks[ $index + 1 ]; 1148 1143 1149 $result .= call_user_func_array( 1144 1150 $post_callback, … … 1147 1153 } 1148 1154 } 1155 1149 1156 return $result; 1150 1157 } -
trunk/src/wp-includes/media.php
r56651 r56680 5731 5731 $header_enforced_contexts = array( 5732 5732 'template_part_' . WP_TEMPLATE_PART_AREA_HEADER => true, 5733 'get_header_image_tag' 5733 'get_header_image_tag' => true, 5734 5734 ); 5735 5735 -
trunk/src/wp-includes/taxonomy.php
r56650 r56680 232 232 'hierarchical' => false, 233 233 'labels' => array( 234 'name' 235 'singular_name' 234 'name' => _x( 'Pattern Categories', 'taxonomy general name' ), 235 'singular_name' => _x( 'Pattern Category', 'taxonomy singular name' ), 236 236 ), 237 237 'query_var' => false, -
trunk/tests/phpunit/tests/admin/wpTermsListTable.php
r56631 r56680 42 42 * Call an inaccessible (private or protected) method. 43 43 * 44 * @param object|string $ objectObject instance or class string to call the method of.44 * @param object|string $instance Object instance or class string to call the method of. 45 45 * @param string $method_name Name of the method to call. 46 46 * @param array $args Optional. Array of arguments to pass to the method. … … 48 48 * @throws ReflectionException If the object could not be reflected upon. 49 49 */ 50 private function call_inaccessible_method( $ object, $method_name, $args = array() ) {51 $method = ( new ReflectionClass( $ object) )->getMethod( $method_name );50 private function call_inaccessible_method( $instance, $method_name, $args = array() ) { 51 $method = ( new ReflectionClass( $instance ) )->getMethod( $method_name ); 52 52 $method->setAccessible( true ); 53 return $method->invokeArgs( $ object, $args );53 return $method->invokeArgs( $instance, $args ); 54 54 } 55 55 -
trunk/tests/phpunit/tests/blocks/editor.php
r56629 r56680 544 544 545 545 $this->assertArrayNotHasKey( 'postContentAttributes', $settings ); 546 547 546 } 548 547 -
trunk/tests/phpunit/tests/media.php
r56651 r56680 4437 4437 add_filter( 4438 4438 'the_content', 4439 function ( $content ) use ( &$result ) {4439 function ( $content ) use ( &$result ) { 4440 4440 $attr = $this->get_width_height_for_high_priority(); 4441 4441 $result = wp_get_loading_optimization_attributes( 'img', $attr, 'something_completely_arbitrary' ); … … 4497 4497 add_filter( 4498 4498 'wp_loading_optimization_force_header_contexts', 4499 function ( $context ) {4499 function ( $context ) { 4500 4500 $contexts['something_completely_arbitrary'] = true; 4501 4501 return $contexts; -
trunk/tests/phpunit/tests/vars.php
r56638 r56680 35 35 * @return array 36 36 */ 37 function get_data_to_test_wp_is_mobile(): array {37 public function get_data_to_test_wp_is_mobile(): array { 38 38 return array( 39 39 'mobile client hint' => array( … … 105 105 106 106 /** 107 * Tests that wp_is_mobile() .108 *109 107 * @ticket 59370 110 108 * … … 116 114 * @param bool $expected Whether expected. 117 115 */ 118 function test_wp_is_mobile( array $headers, bool $expected ) {116 public function test_wp_is_mobile( array $headers, bool $expected ) { 119 117 foreach ( $headers as $key => $value ) { 120 118 $_SERVER[ $key ] = $value; … … 128 126 * @covers ::wp_is_mobile 129 127 */ 130 function test_wp_is_mobile_is_true_with_filter() {128 public function test_wp_is_mobile_is_true_with_filter() { 131 129 $this->assertFalse( wp_is_mobile() ); 132 130 add_filter( 'wp_is_mobile', '__return_true' ); … … 139 137 * @covers ::wp_is_mobile 140 138 */ 141 function test_wp_is_mobile_is_false_with_filter() {139 public function test_wp_is_mobile_is_false_with_filter() { 142 140 $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.5938.60 Mobile Safari/537.36'; 143 141 $this->assertTrue( wp_is_mobile() );
Note: See TracChangeset
for help on using the changeset viewer.