Changeset 56178
- Timestamp:
- 07/09/2023 09:23:34 PM (15 months ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-image-editor-imagick.php
r55404 r56178 103 103 } 104 104 105 // setIteratorIndex is optional unless mime is an animated format. 106 // Here, we just say no if you are missing it and aren't loading a jpeg. 105 /* 106 * setIteratorIndex is optional unless mime is an animated format. 107 * Here, we just say no if you are missing it and aren't loading a jpeg. 108 */ 107 109 if ( ! method_exists( 'Imagick', 'setIteratorIndex' ) && 'image/jpeg' !== $mime_type ) { 108 110 return false; … … 603 605 604 606 if ( $dst_w || $dst_h ) { 605 // If destination width/height isn't specified, 606 // use same as width/height from source. 607 /* 608 * If destination width/height isn't specified, 609 * use same as width/height from source. 610 */ 607 611 if ( ! $dst_w ) { 608 612 $dst_w = $src_w; … … 958 962 protected function pdf_setup() { 959 963 try { 960 // By default, PDFs are rendered in a very low resolution. 961 // We want the thumbnail to be readable, so increase the rendering DPI. 964 /* 965 * By default, PDFs are rendered in a very low resolution. 966 * We want the thumbnail to be readable, so increase the rendering DPI. 967 */ 962 968 $this->image->setResolution( 128, 128 ); 963 969 … … 987 993 988 994 try { 989 // When generating thumbnails from cropped PDF pages, Imagemagick uses the uncropped 990 // area (resulting in unnecessary whitespace) unless the following option is set. 995 /* 996 * When generating thumbnails from cropped PDF pages, Imagemagick uses the uncropped 997 * area (resulting in unnecessary whitespace) unless the following option is set. 998 */ 991 999 $this->image->setOption( 'pdf:use-cropbox', true ); 992 1000 993 // Reading image after Imagick instantiation because `setResolution` 994 // only applies correctly before the image is read. 1001 /* 1002 * Reading image after Imagick instantiation because `setResolution` 1003 * only applies correctly before the image is read. 1004 */ 995 1005 $this->image->readImage( $filename ); 996 1006 } catch ( Exception $e ) { -
trunk/src/wp-includes/class-wp-image-editor.php
r54417 r56178 350 350 } 351 351 352 // Check to see if specified mime-type is the same as type implied by 353 // file extension. If so, prefer extension from file. 352 /* 353 * Check to see if specified mime-type is the same as type implied by 354 * file extension. If so, prefer extension from file. 355 */ 354 356 if ( ! $mime_type || ( $file_mime == $mime_type ) ) { 355 357 $mime_type = $file_mime; … … 385 387 } 386 388 387 // Double-check that the mime-type selected is supported by the editor. 388 // If not, choose a default instead. 389 /* 390 * Double-check that the mime-type selected is supported by the editor. 391 * If not, choose a default instead. 392 */ 389 393 if ( ! $this->supports_mime_type( $mime_type ) ) { 390 394 /** … … 401 405 } 402 406 403 // Ensure both $filename and $new_ext are not empty. 404 // $this->get_extension() returns false on error which would effectively remove the extension 405 // from $filename. That shouldn't happen, files without extensions are not supported. 407 /* 408 * Ensure both $filename and $new_ext are not empty. 409 * $this->get_extension() returns false on error which would effectively remove the extension 410 * from $filename. That shouldn't happen, files without extensions are not supported. 411 */ 406 412 if ( $filename && $new_ext ) { 407 413 $dir = pathinfo( $filename, PATHINFO_DIRNAME ); … … 516 522 break; 517 523 case 3: 518 // Rotate 180 degrees or flip horizontally and vertically. 519 // Flipping seems faster and uses less resources. 524 /* 525 * Rotate 180 degrees or flip horizontally and vertically. 526 * Flipping seems faster and uses less resources. 527 */ 520 528 $result = $this->flip( true, true ); 521 529 break; -
trunk/src/wp-includes/class-wp-locale-switcher.php
r55298 r56178 256 256 } 257 257 258 // Unload current text domain but allow them to be reloaded 259 // after switching back or to another locale. 258 /* 259 * Unload current text domain but allow them to be reloaded 260 * after switching back or to another locale. 261 */ 260 262 unload_textdomain( $domain, true ); 261 263 get_translations_for_domain( $domain ); -
trunk/src/wp-includes/class-wp-locale.php
r55351 r56178 220 220 $this->meridiem['PM'] = __( 'PM' ); 221 221 222 // Numbers formatting. 223 // See https://www.php.net/number_format 222 /* 223 * Numbers formatting. 224 * See https://www.php.net/number_format 225 */ 224 226 225 227 /* translators: $thousands_sep argument for https://www.php.net/number_format, default is ',' */ -
trunk/src/wp-includes/class-wp-oembed.php
r55988 r56178 621 621 622 622 if ( PHP_VERSION_ID < 80000 ) { 623 // This function has been deprecated in PHP 8.0 because in libxml 2.9.0, external entity loading 624 // is disabled by default, so this function is no longer needed to protect against XXE attacks. 625 // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.libxml_disable_entity_loaderDeprecated 623 /* 624 * This function has been deprecated in PHP 8.0 because in libxml 2.9.0, external entity loading 625 * is disabled by default, so this function is no longer needed to protect against XXE attacks. 626 */ 626 627 $loader = libxml_disable_entity_loader( true ); 627 628 } -
trunk/src/wp-includes/class-wp-query.php
r56019 r56178 1617 1617 } 1618 1618 1619 // Sanity limit, sort as sentence when more than 6 terms 1620 // (few searches are longer than 6 terms and most titles are not). 1619 /* 1620 * Sanity limit, sort as sentence when more than 6 terms 1621 * (few searches are longer than 6 terms and most titles are not). 1622 */ 1621 1623 if ( $num_terms < 7 ) { 1622 1624 // All words in title. … … 3510 3512 } 3511 3513 3512 // Ensure that any posts added/modified via one of the filters above are 3513 // of the type WP_Post and are filtered. 3514 /* 3515 * Ensure that any posts added/modified via one of the filters above are 3516 * of the type WP_Post and are filtered. 3517 */ 3514 3518 if ( $this->posts ) { 3515 3519 $this->post_count = count( $this->posts ); … … 3554 3558 global $wpdb; 3555 3559 3556 // Bail if posts is an empty array. Continue if posts is an empty string, 3557 // null, or false to accommodate caching plugins that fill posts later. 3560 /* 3561 * Bail if posts is an empty array. Continue if posts is an empty string, 3562 * null, or false to accommodate caching plugins that fill posts later. 3563 */ 3558 3564 if ( $q['no_found_rows'] || ( is_array( $this->posts ) && ! $this->posts ) ) { 3559 3565 return; -
trunk/src/wp-includes/class-wp-text-diff-renderer-table.php
r55276 r56178 286 286 // Length of all text between <ins> or <del>. 287 287 $stripped_matches = strlen( strip_tags( implode( ' ', $diff_matches[0] ) ) ); 288 // Since we count length of text between <ins> or <del> (instead of picking just one), 289 // we double the length of chars not in those tags. 288 /* 289 * Since we count length of text between <ins> or <del> (instead of picking just one), 290 * we double the length of chars not in those tags. 291 */ 290 292 $stripped_diff = strlen( strip_tags( $diff ) ) * 2 - $stripped_matches; 291 293 $diff_ratio = $stripped_matches / $stripped_diff; … … 417 419 $final_rows = array_keys( $final_matches ); 418 420 419 // Interleaves rows with blanks to keep matches aligned. 420 // We may end up with some extraneous blank rows, but we'll just ignore them later. 421 /* 422 * Interleaves rows with blanks to keep matches aligned. 423 * We may end up with some extraneous blank rows, but we'll just ignore them later. 424 */ 421 425 foreach ( $orig_rows_copy as $orig_row ) { 422 426 $final_pos = array_search( $orig_matches[ $orig_row ], $final_rows, true ); -
trunk/src/wp-includes/class-wp-textdomain-registry.php
r55865 r56178 202 202 } 203 203 204 // If no path is found for the given locale and a custom path has been set 205 // using load_plugin_textdomain/load_theme_textdomain, use that one. 204 /* 205 * If no path is found for the given locale and a custom path has been set 206 * using load_plugin_textdomain/load_theme_textdomain, use that one. 207 */ 206 208 if ( 'en_US' !== $locale && isset( $this->custom_paths[ $domain ] ) ) { 207 209 $fallback_location = rtrim( $this->custom_paths[ $domain ], '/' ) . '/';
Note: See TracChangeset
for help on using the changeset viewer.