diff --git a/wp-includes/class-wp-image-editor-gd.php b/wp-includes/class-wp-image-editor-gd.php index c2105169ec..f175b90d20 100644 --- a/wp-includes/class-wp-image-editor-gd.php +++ b/wp-includes/class-wp-image-editor-gd.php @@ -423,13 +423,15 @@ class WP_Image_Editor_GD extends WP_Image_Editor { * Saves current in-memory image to file. * * @since 3.5.0 + * @since 5.9.0 Renamed `$filename` to `$destfilename` to match parent class + * for PHP 8 named parameter support. * - * @param string|null $filename - * @param string|null $mime_type + * @param string|null $destfilename Optional. Destination filename. Default null. + * @param string|null $mime_type Optional. The mime-type. Default null. * @return array|WP_Error {'path'=>string, 'file'=>string, 'width'=>int, 'height'=>int, 'mime-type'=>string} */ - public function save( $filename = null, $mime_type = null ) { - $saved = $this->_save( $this->image, $filename, $mime_type ); + public function save( $destfilename = null, $mime_type = null ) { + $saved = $this->_save( $this->image, $destfilename, $mime_type ); if ( ! is_wp_error( $saved ) ) { $this->file = $saved['path']; diff --git a/wp-includes/class-wp-image-editor-imagick.php b/wp-includes/class-wp-image-editor-imagick.php index ae91e46970..b7336fe5ae 100644 --- a/wp-includes/class-wp-image-editor-imagick.php +++ b/wp-includes/class-wp-image-editor-imagick.php @@ -662,8 +662,8 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor { * * @since 3.5.0 * - * @param string $destfilename - * @param string $mime_type + * @param string $destfilename Optional. Destination filename. Default null. + * @param string $mime_type Optional. The mime-type. Default null. * @return array|WP_Error {'path'=>string, 'file'=>string, 'width'=>int, 'height'=>int, 'mime-type'=>string} */ public function save( $destfilename = null, $mime_type = null ) { diff --git a/wp-includes/class-wp-image-editor.php b/wp-includes/class-wp-image-editor.php index a74d4ac743..b9e580c46f 100644 --- a/wp-includes/class-wp-image-editor.php +++ b/wp-includes/class-wp-image-editor.php @@ -77,8 +77,8 @@ abstract class WP_Image_Editor { * @since 3.5.0 * @abstract * - * @param string $destfilename - * @param string $mime_type + * @param string $destfilename Optional. Destination filename. Default null. + * @param string $mime_type Optional. The mime-type. Default null. * @return array|WP_Error {'path'=>string, 'file'=>string, 'width'=>int, 'height'=>int, 'mime-type'=>string} */ abstract public function save( $destfilename = null, $mime_type = null ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 620192d557..bfa59a684a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-51789'; +$wp_version = '5.9-alpha-51790'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.