]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/class-wp-image-editor.php
WordPress 4.3-scripts
[autoinstalls/wordpress.git] / wp-includes / class-wp-image-editor.php
index 58643d42e431e51431bb8e916cb82cec837dd75a..f88493712651f3f37787676607880f7847633fd1 100644 (file)
@@ -31,11 +31,13 @@ abstract class WP_Image_Editor {
         * Must be overridden in a sub-class.
         *
         * @since 3.5.0
         * Must be overridden in a sub-class.
         *
         * @since 3.5.0
+        *
+        * @static
         * @access public
         * @abstract
         *
         * @param array $args
         * @access public
         * @abstract
         *
         * @param array $args
-        * @return boolean
+        * @return bool
         */
        public static function test( $args = array() ) {
                return false;
         */
        public static function test( $args = array() ) {
                return false;
@@ -46,11 +48,13 @@ abstract class WP_Image_Editor {
         * Must be overridden in a sub-class.
         *
         * @since 3.5.0
         * Must be overridden in a sub-class.
         *
         * @since 3.5.0
+        *
+        * @static
         * @access public
         * @abstract
         *
         * @param string $mime_type
         * @access public
         * @abstract
         *
         * @param string $mime_type
-        * @return boolean
+        * @return bool
         */
        public static function supports_mime_type( $mime_type ) {
                return false;
         */
        public static function supports_mime_type( $mime_type ) {
                return false;
@@ -63,7 +67,7 @@ abstract class WP_Image_Editor {
         * @access protected
         * @abstract
         *
         * @access protected
         * @abstract
         *
-        * @return boolean|WP_Error True if loaded; WP_Error on failure.
+        * @return bool|WP_Error True if loaded; WP_Error on failure.
         */
        abstract public function load();
 
         */
        abstract public function load();
 
@@ -93,8 +97,8 @@ abstract class WP_Image_Editor {
         *
         * @param  int|null $max_w Image width.
         * @param  int|null $max_h Image height.
         *
         * @param  int|null $max_w Image width.
         * @param  int|null $max_h Image height.
-        * @param  boolean  $crop
-        * @return boolean|WP_Error
+        * @param  bool     $crop
+        * @return bool|WP_Error
         */
        abstract public function resize( $max_w, $max_h, $crop = false );
 
         */
        abstract public function resize( $max_w, $max_h, $crop = false );
 
@@ -131,8 +135,8 @@ abstract class WP_Image_Editor {
         * @param int $src_h The height to crop.
         * @param int $dst_w Optional. The destination width.
         * @param int $dst_h Optional. The destination height.
         * @param int $src_h The height to crop.
         * @param int $dst_w Optional. The destination width.
         * @param int $dst_h Optional. The destination height.
-        * @param boolean $src_abs Optional. If the source crop points are absolute.
-        * @return boolean|WP_Error
+        * @param bool $src_abs Optional. If the source crop points are absolute.
+        * @return bool|WP_Error
         */
        abstract public function crop( $src_x, $src_y, $src_w, $src_h, $dst_w = null, $dst_h = null, $src_abs = false );
 
         */
        abstract public function crop( $src_x, $src_y, $src_w, $src_h, $dst_w = null, $dst_h = null, $src_abs = false );
 
@@ -144,7 +148,7 @@ abstract class WP_Image_Editor {
         * @abstract
         *
         * @param float $angle
         * @abstract
         *
         * @param float $angle
-        * @return boolean|WP_Error
+        * @return bool|WP_Error
         */
        abstract public function rotate( $angle );
 
         */
        abstract public function rotate( $angle );
 
@@ -155,9 +159,9 @@ abstract class WP_Image_Editor {
         * @access public
         * @abstract
         *
         * @access public
         * @abstract
         *
-        * @param boolean $horz Flip along Horizontal Axis
-        * @param boolean $vert Flip along Vertical Axis
-        * @return boolean|WP_Error
+        * @param bool $horz Flip along Horizontal Axis
+        * @param bool $vert Flip along Vertical Axis
+        * @return bool|WP_Error
         */
        abstract public function flip( $horz, $vert );
 
         */
        abstract public function flip( $horz, $vert );
 
@@ -169,7 +173,7 @@ abstract class WP_Image_Editor {
         * @abstract
         *
         * @param string $mime_type
         * @abstract
         *
         * @param string $mime_type
-        * @return boolean|WP_Error
+        * @return bool|WP_Error
         */
        abstract public function stream( $mime_type = null );
 
         */
        abstract public function stream( $mime_type = null );
 
@@ -226,7 +230,7 @@ abstract class WP_Image_Editor {
         * @access public
         *
         * @param int $quality Compression Quality. Range: [1,100]
         * @access public
         *
         * @param int $quality Compression Quality. Range: [1,100]
-        * @return boolean|WP_Error True if set successfully; WP_Error on failure.
+        * @return true|WP_Error True if set successfully; WP_Error on failure.
         */
        public function set_quality( $quality = null ) {
                if ( null === $quality ) {
         */
        public function set_quality( $quality = null ) {
                if ( null === $quality ) {
@@ -344,7 +348,7 @@ abstract class WP_Image_Editor {
                        $info = pathinfo( $filename );
                        $dir  = $info['dirname'];
 
                        $info = pathinfo( $filename );
                        $dir  = $info['dirname'];
 
-                       if( isset( $info['extension'] ) )
+                       if ( isset( $info['extension'] ) )
                                $ext = $info['extension'];
 
                        $filename = trailingslashit( $dir ) . wp_basename( $filename, ".$ext" ) . ".{$new_ext}";
                                $ext = $info['extension'];
 
                        $filename = trailingslashit( $dir ) . wp_basename( $filename, ".$ext" ) . ".{$new_ext}";
@@ -406,7 +410,7 @@ abstract class WP_Image_Editor {
         * @param string|stream $filename
         * @param callable $function
         * @param array $arguments
         * @param string|stream $filename
         * @param callable $function
         * @param array $arguments
-        * @return boolean
+        * @return bool
         */
        protected function make_image( $filename, $function, $arguments ) {
                if ( $stream = wp_is_stream( $filename ) ) {
         */
        protected function make_image( $filename, $function, $arguments ) {
                if ( $stream = wp_is_stream( $filename ) ) {
@@ -442,10 +446,12 @@ abstract class WP_Image_Editor {
         * as mapped from wp_get_mime_types()
         *
         * @since 3.5.0
         * as mapped from wp_get_mime_types()
         *
         * @since 3.5.0
+        *
+        * @static
         * @access protected
         *
         * @param string $extension
         * @access protected
         *
         * @param string $extension
-        * @return string|boolean
+        * @return string|false
         */
        protected static function get_mime_type( $extension = null ) {
                if ( ! $extension )
         */
        protected static function get_mime_type( $extension = null ) {
                if ( ! $extension )
@@ -468,10 +474,12 @@ abstract class WP_Image_Editor {
         * as mapped from wp_get_mime_types()
         *
         * @since 3.5.0
         * as mapped from wp_get_mime_types()
         *
         * @since 3.5.0
+        *
+        * @static
         * @access protected
         *
         * @param string $mime_type
         * @access protected
         *
         * @param string $mime_type
-        * @return string|boolean
+        * @return string|false
         */
        protected static function get_extension( $mime_type = null ) {
                $extensions = explode( '|', array_search( $mime_type, wp_get_mime_types() ) );
         */
        protected static function get_extension( $mime_type = null ) {
                $extensions = explode( '|', array_search( $mime_type, wp_get_mime_types() ) );