mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-23 04:34:41 +00:00
Docs: Replace multiple single line comments with multi-line comments.
This changeset updates various comments as per WordPress PHP Inline Documentation Standards. See https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#5-inline-comments. Follow-up to [56174], [56175], [56176], [56177]. Props costdev, audrasjb. See #58459. git-svn-id: https://develop.svn.wordpress.org/trunk@56178 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -349,8 +349,10 @@ abstract class WP_Image_Editor {
|
||||
$file_mime = $this->mime_type;
|
||||
}
|
||||
|
||||
// Check to see if specified mime-type is the same as type implied by
|
||||
// file extension. If so, prefer extension from file.
|
||||
/*
|
||||
* Check to see if specified mime-type is the same as type implied by
|
||||
* file extension. If so, prefer extension from file.
|
||||
*/
|
||||
if ( ! $mime_type || ( $file_mime == $mime_type ) ) {
|
||||
$mime_type = $file_mime;
|
||||
$new_ext = $file_ext;
|
||||
@@ -384,8 +386,10 @@ abstract class WP_Image_Editor {
|
||||
$new_ext = $this->get_extension( $mime_type );
|
||||
}
|
||||
|
||||
// Double-check that the mime-type selected is supported by the editor.
|
||||
// If not, choose a default instead.
|
||||
/*
|
||||
* Double-check that the mime-type selected is supported by the editor.
|
||||
* If not, choose a default instead.
|
||||
*/
|
||||
if ( ! $this->supports_mime_type( $mime_type ) ) {
|
||||
/**
|
||||
* Filters default mime type prior to getting the file extension.
|
||||
@@ -400,9 +404,11 @@ abstract class WP_Image_Editor {
|
||||
$new_ext = $this->get_extension( $mime_type );
|
||||
}
|
||||
|
||||
// Ensure both $filename and $new_ext are not empty.
|
||||
// $this->get_extension() returns false on error which would effectively remove the extension
|
||||
// from $filename. That shouldn't happen, files without extensions are not supported.
|
||||
/*
|
||||
* Ensure both $filename and $new_ext are not empty.
|
||||
* $this->get_extension() returns false on error which would effectively remove the extension
|
||||
* from $filename. That shouldn't happen, files without extensions are not supported.
|
||||
*/
|
||||
if ( $filename && $new_ext ) {
|
||||
$dir = pathinfo( $filename, PATHINFO_DIRNAME );
|
||||
$ext = pathinfo( $filename, PATHINFO_EXTENSION );
|
||||
@@ -515,8 +521,10 @@ abstract class WP_Image_Editor {
|
||||
$result = $this->flip( false, true );
|
||||
break;
|
||||
case 3:
|
||||
// Rotate 180 degrees or flip horizontally and vertically.
|
||||
// Flipping seems faster and uses less resources.
|
||||
/*
|
||||
* Rotate 180 degrees or flip horizontally and vertically.
|
||||
* Flipping seems faster and uses less resources.
|
||||
*/
|
||||
$result = $this->flip( true, true );
|
||||
break;
|
||||
case 4:
|
||||
|
||||
Reference in New Issue
Block a user