Changeset 62956
- Timestamp:
- 07/31/2026 01:08:01 PM (7 weeks ago)
- Location:
- trunk/src
- Files:
-
- 6 edited
-
wp-admin/includes/ajax-actions.php (modified) (1 diff)
-
wp-includes/class-wp-block-parser.php (modified) (1 diff)
-
wp-includes/class-wp-query.php (modified) (1 diff)
-
wp-includes/class-wp-theme-json.php (modified) (2 diffs)
-
wp-includes/pomo/plural-forms.php (modified) (2 diffs)
-
wp-trackback.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r62705 r62956 129 129 if ( str_contains( $search, ',' ) ) { 130 130 $search = explode( ',', $search ); 131 $search = $search[ count( $search ) - 1 ];131 $search = array_last( $search ); 132 132 } 133 133 -
trunk/src/wp-includes/class-wp-block-parser.php
r61995 r62956 343 343 */ 344 344 public function add_inner_block( WP_Block_Parser_Block $block, $token_start, $token_length, $last_offset = null ) { 345 $parent = $this->stack[ count( $this->stack ) - 1];345 $parent = $this->stack[ array_key_last( $this->stack ) ]; 346 346 $parent->block->innerBlocks[] = (array) $block; 347 347 $html = substr( $this->document, $parent->prev_offset, $token_start - $parent->prev_offset ); -
trunk/src/wp-includes/class-wp-query.php
r62804 r62956 2431 2431 if ( '' !== $query_vars['author_name'] ) { 2432 2432 if ( str_contains( $query_vars['author_name'], '/' ) ) { 2433 $query_vars['author_name'] = explode( '/', $query_vars['author_name'] ); 2434 if ( $query_vars['author_name'][ count( $query_vars['author_name'] ) - 1 ] ) { 2435 $query_vars['author_name'] = $query_vars['author_name'][ count( $query_vars['author_name'] ) - 1 ]; // No trailing slash. 2433 $author_name_parts = explode( '/', $query_vars['author_name'] ); 2434 $last_part = array_last( $author_name_parts ); 2435 2436 if ( $last_part ) { 2437 $query_vars['author_name'] = $last_part; // No trailing slash. 2436 2438 } else { 2437 $query_vars['author_name'] = $ query_vars['author_name'][ count( $query_vars['author_name']) - 2 ]; // There was a trailing slash.2439 $query_vars['author_name'] = $author_name_parts[ count( $author_name_parts ) - 2 ]; // There was a trailing slash. 2438 2440 } 2439 2441 } -
trunk/src/wp-includes/class-wp-theme-json.php
r62853 r62956 3995 3995 $is_processing_element = in_array( 'elements', $block_metadata['path'], true ); 3996 3996 3997 $current_element = $is_processing_element ? $block_metadata['path'][ count( $block_metadata['path'] ) - 1 ]: null;3997 $current_element = $is_processing_element ? array_last( $block_metadata['path'] ) : null; 3998 3998 3999 3999 $element_pseudo_allowed = array(); … … 4689 4689 * $metadata['path'] = array( 'styles', 'elements', 'link' ); 4690 4690 */ 4691 $current_element = $metadata['path'][ count( $metadata['path'] ) - 1 ];4691 $current_element = array_last( $metadata['path'] ); 4692 4692 4693 4693 /* -
trunk/src/wp-includes/pomo/plural-forms.php
r57883 r62956 129 129 $found = false; 130 130 while ( ! empty( $stack ) ) { 131 $o2 = $stack[ count( $stack ) - 1 ];131 $o2 = array_last( $stack ); 132 132 if ( '(' !== $o2 ) { 133 133 $output[] = array( 'op', array_pop( $stack ) ); … … 164 164 165 165 while ( ! empty( $stack ) ) { 166 $o2 = $stack[ count( $stack ) - 1 ];166 $o2 = array_last( $stack ); 167 167 168 168 // Ternary is right-associative in C. -
trunk/src/wp-trackback.php
r62704 r62956 51 51 if ( ! isset( $_GET['tb_id'] ) || ! $_GET['tb_id'] ) { 52 52 $post_id = explode( '/', $_SERVER['REQUEST_URI'] ); 53 $post_id = (int) $post_id[ count( $post_id ) - 1 ];53 $post_id = (int) array_last( $post_id ); 54 54 } 55 55
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)