Make WordPress Core

Ticket #32444: 32444.7.diff

File 32444.7.diff, 21.0 KB (added by wonderboymusic, 9 years ago)
  • src/wp-admin/includes/export.php

     
    319319         *
    320320         * @param bool   $return_me
    321321         * @param string $meta_key
    322          * @return boolean
     322         * @return bool
    323323         */
    324324        function wxr_filter_postmeta( $return_me, $meta_key ) {
    325325                if ( '_edit_lock' == $meta_key )
  • src/wp-admin/includes/file.php

     
    837837 *                                                   the `WP_Filesystem_*()` classes. Default false.
    838838 * @param string|false $context                      Optional. Context for get_filesystem_method(). Default false.
    839839 * @param bool         $allow_relaxed_file_ownership Optional. Whether to allow Group/World writable. Default false.
    840  * @return null|boolean false on failure, true on success.
     840 * @return null|bool false on failure, true on success.
    841841 */
    842842function WP_Filesystem( $args = false, $context = false, $allow_relaxed_file_ownership = false ) {
    843843        global $wp_filesystem;
     
    996996 *
    997997 * @todo Properly mark optional arguments as such
    998998 *
    999  * @param string $form_post the URL to post the form to
    1000  * @param string $type the chosen Filesystem method in use
    1001  * @param boolean $error if the current request has failed to connect
    1002  * @param string $context The directory which is needed access to, The write-test will be performed on this directory by get_filesystem_method()
    1003  * @param array $extra_fields Extra POST fields which should be checked for to be included in the post.
    1004  * @param bool $allow_relaxed_file_ownership Whether to allow Group/World writable.
    1005  * @return boolean False on failure. True on success.
     999 * @param string $form_post    the URL to post the form to
     1000 * @param string $type         the chosen Filesystem method in use
     1001 * @param bool   $error        if the current request has failed to connect
     1002 * @param string $context      The directory which is needed access to, The write-test will be performed on this directory by get_filesystem_method()
     1003 * @param array  $extra_fields Extra POST fields which should be checked for to be included in the post.
     1004 * @param bool   $allow_relaxed_file_ownership Whether to allow Group/World writable.
     1005 * @return bool False on failure. True on success.
    10061006 */
    10071007function request_filesystem_credentials($form_post, $type = '', $error = false, $context = false, $extra_fields = null, $allow_relaxed_file_ownership = false ) {
    10081008
  • src/wp-admin/includes/image-edit.php

     
    208208 * @param WP_Image_Editor $image
    209209 * @param string $mime_type
    210210 * @param int $post_id
    211  * @return boolean
     211 * @return bool
    212212 */
    213213function wp_stream_image( $image, $mime_type, $post_id ) {
    214214        if ( $image instanceof WP_Image_Editor ) {
     
    264264 * @param WP_Image_Editor $image
    265265 * @param string $mime_type
    266266 * @param int $post_id
    267  * @return boolean
     267 * @return bool
    268268 */
    269269function wp_save_image_file( $filename, $image, $mime_type, $post_id ) {
    270270        if ( $image instanceof WP_Image_Editor ) {
     
    552552 * in $_REQUEST['history']
    553553 *
    554554 * @param int $post_id
    555  * @return boolean
     555 * @return bool
    556556 */
    557557function stream_preview_image( $post_id ) {
    558558        $post = get_post( $post_id );
  • src/wp-admin/includes/media.php

     
    14931493        }
    14941494        if ( 'image' == $type && $calling_post_id && current_theme_supports( 'post-thumbnails', get_post_type( $calling_post_id ) )
    14951495                && post_type_supports( get_post_type( $calling_post_id ), 'thumbnail' ) && get_post_thumbnail_id( $calling_post_id ) != $attachment_id ) {
    1496                
     1496
    14971497                $calling_post = get_post( $calling_post_id );
    14981498                $calling_post_type_object = get_post_type_object( $calling_post->post_type );
    14991499
     
    17431743
    17441744        $post_id = isset( $_REQUEST['post_id'] ) ? intval( $_REQUEST['post_id'] ) : 0;
    17451745
    1746         if ( ! empty( $post_id ) ) { 
    1747                 $post_type = get_post_type( $post_id ); 
     1746        if ( ! empty( $post_id ) ) {
     1747                $post_type = get_post_type( $post_id );
    17481748        } else {
    1749                 $post_type = ''; 
    1750         } 
     1749                $post_type = '';
     1750        }
    17511751
    17521752        echo '<script type="text/javascript">post_id = ' . $post_id . ';post_type = ' . $post_type . ';</script>';
    17531753        if ( empty( $_GET['chromeless'] ) ) {
     
    30243024 * @since 3.6.0
    30253025 *
    30263026 * @param string $file Path to file.
    3027  * @return array|boolean Returns array of metadata, if found.
     3027 * @return array|bool Returns array of metadata, if found.
    30283028 */
    30293029function wp_read_audio_metadata( $file ) {
    30303030        if ( ! file_exists( $file ) )
  • src/wp-admin/includes/template.php

     
    14821482 *
    14831483 * @since 3.0.0
    14841484 *
    1485  * @param string $setting Optional slug title of a specific setting who's errors you want.
    1486  * @param boolean $sanitize Whether to re-sanitize the setting value before returning errors.
    1487  * @param boolean $hide_on_update If set to true errors will not be shown if the settings page has already been submitted.
     1485 * @param string $setting        Optional slug title of a specific setting who's errors you want.
     1486 * @param bool   $sanitize      Whether to re-sanitize the setting value before returning errors.
     1487 * @param bool  $hide_on_update If set to true errors will not be shown if the settings page has already been submitted.
    14881488 */
    14891489function settings_errors( $setting = '', $sanitize = false, $hide_on_update = false ) {
    14901490
  • src/wp-includes/class-IXR.php

     
    152152     * Checks whether or not the supplied array is a struct or not
    153153     *
    154154     * @param array $array
    155      * @return boolean
     155     * @return bool
    156156     */
    157157    function isStruct($array)
    158158    {
  • src/wp-includes/class-http.php

     
    12551255         * @since 2.7.0
    12561256         * @since 3.7.0 Combined with the fsockopen transport and switched to stream_socket_client().
    12571257         *
    1258          * @return boolean False means this class can not be used, true means it can.
     1258         * @return bool False means this class can not be used, true means it can.
    12591259         */
    12601260        public static function test( $args = array() ) {
    12611261                if ( ! function_exists( 'stream_socket_client' ) )
     
    16341634         * @static
    16351635         * @since 2.7.0
    16361636         *
    1637          * @return boolean False means this class can not be used, true means it can.
     1637         * @return bool False means this class can not be used, true means it can.
    16381638         */
    16391639        public static function test( $args = array() ) {
    16401640                if ( ! function_exists( 'curl_init' ) || ! function_exists( 'curl_exec' ) )
     
    20092009         * @since 2.8.0
    20102010         *
    20112011         * @param string $url URL you intend to send this cookie to
    2012          * @return boolean true if allowed, false otherwise.
     2012         * @return bool true if allowed, false otherwise.
    20132013         */
    20142014        public function test( $url ) {
    20152015                if ( is_null( $this->name ) )
  • src/wp-includes/class-wp-customize-manager.php

     
    3838        /**
    3939         * Whether this is a Customizer pageload.
    4040         *
    41          * @var boolean
     41         * @var bool
    4242         */
    4343        protected $previewing = false;
    4444
  • src/wp-includes/class-wp-customize-widgets.php

     
    14311431         * @access protected
    14321432         *
    14331433         * @param string $option_name Option name.
    1434          * @return boolean Whether the option capture is ignored.
     1434         * @return bool Whether the option capture is ignored.
    14351435         */
    14361436        protected function is_option_capture_ignored( $option_name ) {
    14371437                return ( 0 === strpos( $option_name, '_transient_' ) );
  • src/wp-includes/class-wp-image-editor-gd.php

     
    8787         * @since 3.5.0
    8888         * @access protected
    8989         *
    90          * @return boolean|WP_Error True if loaded successfully; WP_Error on failure.
     90         * @return bool|WP_Error True if loaded successfully; WP_Error on failure.
    9191         */
    9292        public function load() {
    9393                if ( $this->image )
     
    160160         *
    161161         * @param  int|null $max_w Image width.
    162162         * @param  int|null $max_h Image height.
    163          * @param  boolean  $crop
     163         * @param  bool     $crop
    164164         * @return true|WP_Error
    165165         */
    166166        public function resize( $max_w, $max_h, $crop = false ) {
     
    272272         * @since 3.5.0
    273273         * @access public
    274274         *
    275          * @param int $src_x The start x position to crop from.
    276          * @param int $src_y The start y position to crop from.
    277          * @param int $src_w The width to crop.
    278          * @param int $src_h The height to crop.
    279          * @param int $dst_w Optional. The destination width.
    280          * @param int $dst_h Optional. The destination height.
    281          * @param boolean $src_abs Optional. If the source crop points are absolute.
    282          * @return boolean|WP_Error
     275         * @param int  $src_x  The start x position to crop from.
     276         * @param int  $src_y  The start y position to crop from.
     277         * @param int  $src_w  The width to crop.
     278         * @param int  $src_h  The height to crop.
     279         * @param int  $dst_w  Optional. The destination width.
     280         * @param int  $dst_h  Optional. The destination height.
     281         * @param bool $src_abs Optional. If the source crop points are absolute.
     282         * @return bool|WP_Error
    283283         */
    284284        public function crop( $src_x, $src_y, $src_w, $src_h, $dst_w = null, $dst_h = null, $src_abs = false ) {
    285285                // If destination width/height isn't specified, use same as
     
    344344         * @since 3.5.0
    345345         * @access public
    346346         *
    347          * @param boolean $horz Flip along Horizontal Axis
    348          * @param boolean $vert Flip along Vertical Axis
     347         * @param bool $horz Flip along Horizontal Axis
     348         * @param bool $vert Flip along Vertical Axis
    349349         * @returns true|WP_Error
    350350         */
    351351        public function flip( $horz, $vert ) {
     
    476476         * @param string|stream $filename
    477477         * @param callable $function
    478478         * @param array $arguments
    479          * @return boolean
     479         * @return bool
    480480         */
    481481        protected function make_image( $filename, $function, $arguments ) {
    482482                if ( wp_is_stream( $filename ) )
  • src/wp-includes/class-wp-image-editor-imagick.php

     
    4343         * @access public
    4444         *
    4545         * @param array $args
    46          * @return boolean
     46         * @return bool
    4747         */
    4848        public static function test( $args = array() ) {
    4949
     
    9393         * @access public
    9494         *
    9595         * @param string $mime_type
    96          * @return boolean
     96         * @return bool
    9797         */
    9898        public static function supports_mime_type( $mime_type ) {
    9999                $imagick_extension = strtoupper( self::get_extension( $mime_type ) );
     
    233233         *
    234234         * @param  int|null $max_w Image width.
    235235         * @param  int|null $max_h Image height.
    236          * @param  boolean  $crop
    237          * @return boolean|WP_Error
     236         * @param  bool     $crop
     237         * @return bool|WP_Error
    238238         */
    239239        public function resize( $max_w, $max_h, $crop = false ) {
    240240                if ( ( $this->size['width'] == $max_w ) && ( $this->size['height'] == $max_h ) )
     
    338338         * @since 3.5.0
    339339         * @access public
    340340         *
    341          * @param int $src_x The start x position to crop from.
    342          * @param int $src_y The start y position to crop from.
    343          * @param int $src_w The width to crop.
    344          * @param int $src_h The height to crop.
    345          * @param int $dst_w Optional. The destination width.
    346          * @param int $dst_h Optional. The destination height.
    347          * @param boolean $src_abs Optional. If the source crop points are absolute.
    348          * @return boolean|WP_Error
     341         * @param int  $src_x The start x position to crop from.
     342         * @param int  $src_y The start y position to crop from.
     343         * @param int  $src_w The width to crop.
     344         * @param int  $src_h The height to crop.
     345         * @param int  $dst_w Optional. The destination width.
     346         * @param int  $dst_h Optional. The destination height.
     347         * @param bool $src_abs Optional. If the source crop points are absolute.
     348         * @return bool|WP_Error
    349349         */
    350350        public function crop( $src_x, $src_y, $src_w, $src_h, $dst_w = null, $dst_h = null, $src_abs = false ) {
    351351                if ( $src_abs ) {
     
    411411         * @since 3.5.0
    412412         * @access public
    413413         *
    414          * @param boolean $horz Flip along Horizontal Axis
    415          * @param boolean $vert Flip along Vertical Axis
     414         * @param bool $horz Flip along Horizontal Axis
     415         * @param bool $vert Flip along Vertical Axis
    416416         * @returns true|WP_Error
    417417         */
    418418        public function flip( $horz, $vert ) {
  • src/wp-includes/class-wp-image-editor.php

     
    3737         * @abstract
    3838         *
    3939         * @param array $args
    40          * @return boolean
     40         * @return bool
    4141         */
    4242        public static function test( $args = array() ) {
    4343                return false;
     
    5454         * @abstract
    5555         *
    5656         * @param string $mime_type
    57          * @return boolean
     57         * @return bool
    5858         */
    5959        public static function supports_mime_type( $mime_type ) {
    6060                return false;
     
    6767         * @access protected
    6868         * @abstract
    6969         *
    70          * @return boolean|WP_Error True if loaded; WP_Error on failure.
     70         * @return bool|WP_Error True if loaded; WP_Error on failure.
    7171         */
    7272        abstract public function load();
    7373
     
    9797         *
    9898         * @param  int|null $max_w Image width.
    9999         * @param  int|null $max_h Image height.
    100          * @param  boolean  $crop
    101          * @return boolean|WP_Error
     100         * @param  bool     $crop
     101         * @return bool|WP_Error
    102102         */
    103103        abstract public function resize( $max_w, $max_h, $crop = false );
    104104
     
    135135         * @param int $src_h The height to crop.
    136136         * @param int $dst_w Optional. The destination width.
    137137         * @param int $dst_h Optional. The destination height.
    138          * @param boolean $src_abs Optional. If the source crop points are absolute.
    139          * @return boolean|WP_Error
     138         * @param bool $src_abs Optional. If the source crop points are absolute.
     139         * @return bool|WP_Error
    140140         */
    141141        abstract public function crop( $src_x, $src_y, $src_w, $src_h, $dst_w = null, $dst_h = null, $src_abs = false );
    142142
     
    148148         * @abstract
    149149         *
    150150         * @param float $angle
    151          * @return boolean|WP_Error
     151         * @return bool|WP_Error
    152152         */
    153153        abstract public function rotate( $angle );
    154154
     
    159159         * @access public
    160160         * @abstract
    161161         *
    162          * @param boolean $horz Flip along Horizontal Axis
    163          * @param boolean $vert Flip along Vertical Axis
    164          * @return boolean|WP_Error
     162         * @param bool $horz Flip along Horizontal Axis
     163         * @param bool $vert Flip along Vertical Axis
     164         * @return bool|WP_Error
    165165         */
    166166        abstract public function flip( $horz, $vert );
    167167
     
    173173         * @abstract
    174174         *
    175175         * @param string $mime_type
    176          * @return boolean|WP_Error
     176         * @return bool|WP_Error
    177177         */
    178178        abstract public function stream( $mime_type = null );
    179179
     
    410410         * @param string|stream $filename
    411411         * @param callable $function
    412412         * @param array $arguments
    413          * @return boolean
     413         * @return bool
    414414         */
    415415        protected function make_image( $filename, $function, $arguments ) {
    416416                if ( $stream = wp_is_stream( $filename ) ) {
  • src/wp-includes/class.wp-dependencies.php

     
    331331         *
    332332         * @param array  $queue  An array of queued _WP_Dependency handle objects.
    333333         * @param string $handle Name of the item. Should be unique.
    334          * @return boolean Whether the handle is found after recursively searching the dependency tree.
     334         * @return bool Whether the handle is found after recursively searching the dependency tree.
    335335         */
    336336        protected function recurse_deps( $queue, $handle ) {
    337337                foreach ( $queue as $queued ) {
  • src/wp-includes/comment.php

     
    14931493 * @global WP_Query $wp_query
    14941494 *
    14951495 * @param array $comments Optional array of comment objects. Defaults to $wp_query->comments
    1496  * @param int $per_page Optional comments per page.
    1497  * @param boolean $threaded Optional control over flat or threaded comments.
     1496 * @param int   $per_page Optional comments per page.
     1497 * @param bool  $threaded Optional control over flat or threaded comments.
    14981498 * @return int Number of comment pages.
    14991499 */
    15001500function get_comment_pages_count( $comments = null, $per_page = null, $threaded = null ) {
  • src/wp-includes/deprecated.php

     
    24452445 * @deprecated 3.0.0
    24462446 * @deprecated Use add_theme_support( 'automatic-feed-links' )
    24472447 *
    2448  * @param boolean $add Optional, default is true. Add or remove links. Defaults to true.
     2448 * @param bool $add Optional, default is true. Add or remove links. Defaults to true.
    24492449 */
    24502450function automatic_feed_links( $add = true ) {
    24512451        _deprecated_function( __FUNCTION__, '3.0', "add_theme_support( 'automatic-feed-links' )" );
  • src/wp-includes/link-template.php

     
    20572057 *
    20582058 * @since 0.71
    20592059 *
    2060  * @param int     $max_page Optional. Max pages.
    2061  * @param boolean $echo     Optional. Echo or return;
     2060 * @param int   $max_page Optional. Max pages.
     2061 * @param bool  $echo     Optional. Echo or return;
    20622062 * @return string|void The link URL for next posts page if `$echo = false`.
    20632063 */
    20642064function next_posts( $max_page = 0, $echo = true ) {
     
    21512151 *
    21522152 * @since 0.71
    21532153 *
    2154  * @param boolean $echo Optional. Echo or return;
     2154 * @param bool $echo Optional. Echo or return;
    21552155 * @return string|void The previous posts page link if `$echo = false`.
    21562156 */
    21572157function previous_posts( $echo = true ) {
  • src/wp-includes/plugin.php

     
    615615 * @param string   $tag                The action hook to which the function to be removed is hooked.
    616616 * @param callback $function_to_remove The name of the function which should be removed.
    617617 * @param int      $priority           Optional. The priority of the function. Default 10.
    618  * @return boolean Whether the function is removed.
     618 * @return bool Whether the function is removed.
    619619 */
    620620function remove_action( $tag, $function_to_remove, $priority = 10 ) {
    621621        return remove_filter( $tag, $function_to_remove, $priority );
  • src/wp-includes/theme.php

     
    11591159 * @since 3.2.0
    11601160 *
    11611161 * @param string $type The random pool to use. any|default|uploaded
    1162  * @return boolean
     1162 * @return bool
    11631163 */
    11641164function is_random_header_image( $type = 'any' ) {
    11651165        $header_image_mod = get_theme_mod( 'header_image', get_theme_support( 'custom-header', 'default-image' ) );
  • src/wp-includes/wp-db.php

     
    176176         * @since 4.2.0
    177177         * @access private
    178178         * @see wpdb::check_safe_collation()
    179          * @var boolean
     179         * @var bool
    180180         */
    181181        private $checking_collation = false;
    182182
  • src/wp-signup.php

     
    299299 *
    300300 * @since MU
    301301 *
    302  * @return null|boolean True if blog signup was validated, false if error.
    303  *                      The function halts all execution if the user is not logged in.
     302 * @return null|bool True if blog signup was validated, false if error.
     303 *                   The function halts all execution if the user is not logged in.
    304304 */
    305305function validate_another_blog_signup() {
    306306        global $wpdb, $blogname, $blog_title, $errors, $domain, $path;