Changeset 55990 for trunk/src/wp-includes/widgets.php
- Timestamp:
- 06/22/2023 02:55:47 PM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/widgets.php
r55414 r55990 909 909 if ( is_array( $sidebars_widgets ) ) { 910 910 foreach ( $sidebars_widgets as $sidebar => $widgets ) { 911 if ( $skip_inactive && ( 'wp_inactive_widgets' === $sidebar || 'orphaned_widgets' === substr( $sidebar, 0, 16) ) ) {911 if ( $skip_inactive && ( 'wp_inactive_widgets' === $sidebar || str_starts_with( $sidebar, 'orphaned_widgets' ) ) ) { 912 912 continue; 913 913 } … … 1383 1383 1384 1384 foreach ( $existing_sidebars_widgets as $sidebar => $widgets ) { 1385 if ( 'wp_inactive_widgets' === $sidebar || 'orphaned_widgets' === substr( $sidebar, 0, 16) ) {1385 if ( 'wp_inactive_widgets' === $sidebar || str_starts_with( $sidebar, 'orphaned_widgets' ) ) { 1386 1386 $new_sidebars_widgets['wp_inactive_widgets'] = array_merge( $new_sidebars_widgets['wp_inactive_widgets'], (array) $widgets ); 1387 1387 unset( $existing_sidebars_widgets[ $sidebar ] ); … … 1491 1491 // Remove orphaned widgets, we're only interested in previously active sidebars. 1492 1492 foreach ( $old_sidebars_widgets as $sidebar => $widgets ) { 1493 if ( 'orphaned_widgets' === substr( $sidebar, 0, 16) ) {1493 if ( str_starts_with( $sidebar, 'orphaned_widgets' ) ) { 1494 1494 unset( $old_sidebars_widgets[ $sidebar ] ); 1495 1495 } … … 1628 1628 1629 1629 // Change existing [...] to […]. 1630 if ( '[...]' === substr( $summary, -5) ) {1630 if ( str_ends_with( $summary, '[...]' ) ) { 1631 1631 $summary = substr( $summary, 0, -5 ) . '[…]'; 1632 1632 }
Note: See TracChangeset
for help on using the changeset viewer.