Changeset 63501
- Timestamp:
- 09/05/2026 12:43:21 PM (2 months ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 5 edited
-
class-wp-date-query.php (modified) (1 diff)
-
class-wp-image-editor-gd.php (modified) (1 diff)
-
class-wp-image-editor-imagick.php (modified) (1 diff)
-
l10n/class-wp-translation-controller.php (modified) (4 diffs)
-
post.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-date-query.php
r63420 r63501 934 934 $datetime = array_map( 'absint', $datetime ); 935 935 936 if ( ! isset( $datetime['year'] ) ) { 937 $datetime['year'] = current_time( 'Y' ); 938 } 939 940 if ( ! isset( $datetime['month'] ) ) { 941 $datetime['month'] = ( $default_to_max ) ? 12 : 1; 942 } 943 944 if ( ! isset( $datetime['day'] ) ) { 945 $datetime['day'] = ( $default_to_max ) ? (int) gmdate( 't', mktime( 0, 0, 0, $datetime['month'], 1, $datetime['year'] ) ) : 1; 946 } 947 948 if ( ! isset( $datetime['hour'] ) ) { 949 $datetime['hour'] = ( $default_to_max ) ? 23 : 0; 950 } 951 952 if ( ! isset( $datetime['minute'] ) ) { 953 $datetime['minute'] = ( $default_to_max ) ? 59 : 0; 954 } 955 956 if ( ! isset( $datetime['second'] ) ) { 957 $datetime['second'] = ( $default_to_max ) ? 59 : 0; 958 } 936 $datetime['year'] ??= current_time( 'Y' ); 937 $datetime['month'] ??= ( $default_to_max ) ? 12 : 1; 938 $datetime['day'] ??= ( $default_to_max ) ? (int) gmdate( 't', mktime( 0, 0, 0, $datetime['month'], 1, $datetime['year'] ) ) : 1; 939 $datetime['hour'] ??= ( $default_to_max ) ? 23 : 0; 940 $datetime['minute'] ??= ( $default_to_max ) ? 59 : 0; 941 $datetime['second'] ??= ( $default_to_max ) ? 59 : 0; 959 942 960 943 return sprintf( '%04d-%02d-%02d %02d:%02d:%02d', $datetime['year'], $datetime['month'], $datetime['day'], $datetime['hour'], $datetime['minute'], $datetime['second'] ); -
trunk/src/wp-includes/class-wp-image-editor-gd.php
r62517 r63501 313 313 $orig_size = $this->size; 314 314 315 if ( ! isset( $size_data['width'] ) ) { 316 $size_data['width'] = null; 317 } 318 319 if ( ! isset( $size_data['height'] ) ) { 320 $size_data['height'] = null; 321 } 322 323 if ( ! isset( $size_data['crop'] ) ) { 324 $size_data['crop'] = false; 325 } 315 $size_data['width'] ??= null; 316 $size_data['height'] ??= null; 317 $size_data['crop'] ??= false; 326 318 327 319 $resized = $this->_resize( $size_data['width'], $size_data['height'], $size_data['crop'] ); -
trunk/src/wp-includes/class-wp-image-editor-imagick.php
r63378 r63501 876 876 $orig_image = $this->image->getImage(); 877 877 878 if ( ! isset( $size_data['width'] ) ) { 879 $size_data['width'] = null; 880 } 881 882 if ( ! isset( $size_data['height'] ) ) { 883 $size_data['height'] = null; 884 } 885 886 if ( ! isset( $size_data['crop'] ) ) { 887 $size_data['crop'] = false; 888 } 878 $size_data['width'] ??= null; 879 $size_data['height'] ??= null; 880 $size_data['crop'] ??= false; 889 881 890 882 if ( ( $this->size['width'] === $size_data['width'] ) && ( $this->size['height'] === $size_data['height'] ) ) { -
trunk/src/wp-includes/l10n/class-wp-translation-controller.php
r63443 r63501 98 98 */ 99 99 public function load_file( string $translation_file, string $textdomain = 'default', ?string $locale = null ): bool { 100 if ( null === $locale ) { 101 $locale = $this->current_locale; 102 } 100 $locale ??= $this->current_locale; 103 101 104 102 $translation_file = realpath( $translation_file ); … … 240 238 */ 241 239 public function is_textdomain_loaded( string $textdomain = 'default', ?string $locale = null ): bool { 242 if ( null === $locale ) { 243 $locale = $this->current_locale; 244 } 240 $locale ??= $this->current_locale; 245 241 246 242 return isset( $this->loaded_translations[ $locale ][ $textdomain ] ) && … … 427 423 */ 428 424 protected function get_files( string $textdomain = 'default', ?string $locale = null ): array { 429 if ( null === $locale ) { 430 $locale = $this->current_locale; 431 } 425 $locale ??= $this->current_locale; 432 426 433 427 return $this->loaded_translations[ $locale ][ $textdomain ] ?? array(); … … 445 439 */ 446 440 public function has_translation( string $singular, string $textdomain = 'default', ?string $locale = null ): bool { 447 if ( null === $locale ) { 448 $locale = $this->current_locale; 449 } 441 $locale ??= $this->current_locale; 450 442 451 443 return false !== $this->locate_translation( $singular, $textdomain, $locale ); -
trunk/src/wp-includes/post.php
r63497 r63501 1488 1488 } 1489 1489 1490 if ( null === $args->public ) { 1491 $args->public = false; 1492 } 1493 1494 if ( null === $args->private ) { 1495 $args->private = false; 1496 } 1497 1498 if ( null === $args->protected ) { 1499 $args->protected = false; 1500 } 1501 1502 if ( null === $args->internal ) { 1503 $args->internal = false; 1504 } 1505 1506 if ( null === $args->publicly_queryable ) { 1507 $args->publicly_queryable = $args->public; 1508 } 1509 1510 if ( null === $args->exclude_from_search ) { 1511 $args->exclude_from_search = $args->internal; 1512 } 1513 1514 if ( null === $args->show_in_admin_all_list ) { 1515 $args->show_in_admin_all_list = ! $args->internal; 1516 } 1517 1518 if ( null === $args->show_in_admin_status_list ) { 1519 $args->show_in_admin_status_list = ! $args->internal; 1520 } 1521 1522 if ( null === $args->date_floating ) { 1523 $args->date_floating = false; 1524 } 1490 $args->public ??= false; 1491 $args->private ??= false; 1492 $args->protected ??= false; 1493 $args->internal ??= false; 1494 $args->publicly_queryable ??= $args->public; 1495 $args->exclude_from_search ??= $args->internal; 1496 $args->show_in_admin_all_list ??= ! $args->internal; 1497 $args->show_in_admin_status_list ??= ! $args->internal; 1498 $args->date_floating ??= false; 1525 1499 1526 1500 if ( false === $args->label ) {
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)