Changeset 58009
- Timestamp:
- 04/15/2024 08:01:03 PM (6 months ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/export.php
r57681 r58009 402 402 * @param int[] $post_ids Optional. Array of post IDs to filter the query by. 403 403 */ 404 function wxr_authors_list( array $post_ids = null ) {404 function wxr_authors_list( ?array $post_ids = null ) { 405 405 global $wpdb; 406 406 -
trunk/src/wp-includes/l10n/class-wp-translation-controller.php
r57350 r58009 99 99 * @return bool True on success, false otherwise. 100 100 */ 101 public function load_file( string $translation_file, string $textdomain = 'default', string $locale = null ): bool {101 public function load_file( string $translation_file, string $textdomain = 'default', ?string $locale = null ): bool { 102 102 if ( null === $locale ) { 103 103 $locale = $this->current_locale; … … 154 154 * @return bool True on success, false otherwise. 155 155 */ 156 public function unload_file( $file, string $textdomain = 'default', string $locale = null ): bool {156 public function unload_file( $file, string $textdomain = 'default', ?string $locale = null ): bool { 157 157 if ( is_string( $file ) ) { 158 158 $file = realpath( $file ); … … 199 199 * @return bool True on success, false otherwise. 200 200 */ 201 public function unload_textdomain( string $textdomain = 'default', string $locale = null ): bool {201 public function unload_textdomain( string $textdomain = 'default', ?string $locale = null ): bool { 202 202 $unloaded = false; 203 203 … … 241 241 * @return bool True if there are any loaded translations, false otherwise. 242 242 */ 243 public function is_textdomain_loaded( string $textdomain = 'default', string $locale = null ): bool {243 public function is_textdomain_loaded( string $textdomain = 'default', ?string $locale = null ): bool { 244 244 if ( null === $locale ) { 245 245 $locale = $this->current_locale; … … 261 261 * @return string|false Translation on success, false otherwise. 262 262 */ 263 public function translate( string $text, string $context = '', string $textdomain = 'default', string $locale = null ) {263 public function translate( string $text, string $context = '', string $textdomain = 'default', ?string $locale = null ) { 264 264 if ( '' !== $context ) { 265 265 $context .= "\4"; … … 295 295 * @return string|false Translation on success, false otherwise. 296 296 */ 297 public function translate_plural( array $plurals, int $number, string $context = '', string $textdomain = 'default', string $locale = null ) {297 public function translate_plural( array $plurals, int $number, string $context = '', string $textdomain = 'default', ?string $locale = null ) { 298 298 if ( '' !== $context ) { 299 299 $context .= "\4"; … … 395 395 * } 396 396 */ 397 protected function locate_translation( string $singular, string $textdomain = 'default', string $locale = null ) {397 protected function locate_translation( string $singular, string $textdomain = 'default', ?string $locale = null ) { 398 398 if ( array() === $this->loaded_translations ) { 399 399 return false; … … 428 428 * @return WP_Translation_File[] List of translation files. 429 429 */ 430 protected function get_files( string $textdomain = 'default', string $locale = null ): array {430 protected function get_files( string $textdomain = 'default', ?string $locale = null ): array { 431 431 if ( null === $locale ) { 432 432 $locale = $this->current_locale; -
trunk/src/wp-includes/l10n/class-wp-translation-file.php
r57519 r58009 82 82 * @return false|WP_Translation_File 83 83 */ 84 public static function create( string $file, string $filetype = null ) {84 public static function create( string $file, ?string $filetype = null ) { 85 85 if ( ! is_readable( $file ) ) { 86 86 return false; -
trunk/src/wp-includes/media.php
r57921 r58009 5500 5500 * @return array|false Array of image information or false on failure. 5501 5501 */ 5502 function wp_getimagesize( $filename, array &$image_info = null ) {5502 function wp_getimagesize( $filename, ?array &$image_info = null ) { 5503 5503 // Don't silence errors when in debug mode, unless running unit tests. 5504 5504 if ( defined( 'WP_DEBUG' ) && WP_DEBUG
Note: See TracChangeset
for help on using the changeset viewer.