Make WordPress Core

Changeset 32654


Ignore:
Timestamp:
05/29/2015 08:16:22 PM (11 years ago)
Author:
wonderboymusic
Message:

Add missing doc blocks to wp-admin/includes/*.
Fix some egregious uses of tabbing.
Some functions can simply return apply_filters(...) instead of setting a variable that is immediately returned.

See #32444.

Location:
trunk/src/wp-admin
Files:
44 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/credits.php

    r32277 r32654  
    1919 * @since 3.2.0
    2020 *
    21  * @return array|bool A list of all of the contributors, or false on error.
     21 * @return array|false A list of all of the contributors, or false on error.
    2222*/
    2323function wp_credits() {
     
    5656 * @param string $username      The contributor's username.
    5757 * @param string $profiles      URL to the contributor's WordPress.org profile page.
    58  * @return string A contributor's display name, hyperlinked to a WordPress.org profile page.
    5958 */
    6059function _wp_credits_add_profile_link( &$display_name, $username, $profiles ) {
     
    6968 *
    7069 * @param string &$data External library data, passed by reference.
    71  * @return string Link to the external library.
    7270 */
    7371function _wp_credits_build_object_link( &$data ) {
  • trunk/src/wp-admin/custom-background.php

    r32116 r32654  
    109109         */
    110110        public function take_action() {
    111 
    112111                if ( empty($_POST) )
    113112                        return;
     
    358357         */
    359358        public function handle_upload() {
    360 
    361359                if ( empty($_FILES) )
    362360                        return;
     
    435433         * @since 3.4.0
    436434         * @deprecated 3.5.0
     435         *
     436         * @param array $form_fields
     437         * @return $form_fields
    437438         */
    438439        public function attachment_fields_to_edit( $form_fields ) {
     
    444445         * @since 3.4.0
    445446         * @deprecated 3.5.0
     447         *
     448         * @param $tabs
     449         * @return $tabs
    446450         */
    447451        public function filter_upload_tabs( $tabs ) {
  • trunk/src/wp-admin/custom-header.php

    r32642 r32654  
    318318                }
    319319                ?>
    320 
    321320<script type="text/javascript">
    322321(function($){
     
    926925         *
    927926         * @since 3.4.0
     927         *
     928         * @param array $form_fields
     929         * @return $form_fields
    928930         */
    929931        public function attachment_fields_to_edit( $form_fields ) {
     
    935937         *
    936938         * @since 3.4.0
     939         *
     940         * @param array $tabs
     941         * @return $tabs
    937942         */
    938943        public function filter_upload_tabs( $tabs ) {
     
    951956         *
    952957         * @since 3.4.0
     958         *
     959         * @param array|object|string $choice
    953960         */
    954961        final public function set_header_image( $choice ) {
     
    10021009         */
    10031010        final public function remove_header_image() {
    1004                 return $this->set_header_image( 'remove-header' );
     1011                $this->set_header_image( 'remove-header' );
    10051012        }
    10061013
     
    10161023                $default = get_theme_support( 'custom-header', 'default-image' );
    10171024
    1018                 if ( ! $default )
    1019                         return $this->remove_header_image();
    1020 
     1025                if ( ! $default ) {
     1026                        $this->remove_header_image();
     1027                        return;
     1028                }
    10211029                $default = sprintf( $default, get_template_directory_uri(), get_stylesheet_directory_uri() );
    10221030
     
    10361044         * Calculate width and height based on what the currently selected theme supports.
    10371045         *
     1046         * @param array $dimensions
    10381047         * @return array dst_height and dst_width of header image.
    10391048         */
     
    10851094         * Create an attachment 'object'.
    10861095         *
    1087          * @param string $cropped Cropped image URL.
    1088          * @param int $parent_attachment_id Attachment ID of parent image.
     1096         * @param string $cropped              Cropped image URL.
     1097         * @param int    $parent_attachment_id Attachment ID of parent image.
    10891098         *
    10901099         * @return array Attachment object.
     
    11131122         * Insert an attachment and its metadata.
    11141123         *
    1115          * @param array $object Attachment object.
     1124         * @param array  $object Attachment object.
    11161125         * @param string $cropped Cropped image URL.
    11171126         *
     
    12411250        }
    12421251
     1252        /**
     1253         *
     1254         * @param WP_Customize_Manager $wp_customize
     1255         */
    12431256        public function customize_set_last_used( $wp_customize ) {
    12441257                $data = $wp_customize->get_setting( 'header_image_data' )->post_value();
     
    12531266        }
    12541267
     1268        /**
     1269         *
     1270         * @return array
     1271         */
    12551272        public function get_default_header_images() {
    12561273                $this->process_default_headers();
     
    12861303
    12871304                // The rest of the set comes after.
    1288                 $header_images = array_merge( $header_images, $this->default_headers );
    1289                 return $header_images;
    1290         }
    1291 
     1305                return array_merge( $header_images, $this->default_headers );
     1306        }
     1307
     1308        /**
     1309         *
     1310         * @return array
     1311         */
    12921312        public function get_uploaded_header_images() {
    12931313                $header_images = get_uploaded_header_images();
  • trunk/src/wp-admin/includes/bookmark.php

    r32653 r32654  
    7878 *
    7979 * @param int $link_id ID of the link to delete
    80  * @return bool True
     80 * @return true
    8181 */
    8282function wp_delete_link( $link_id ) {
     
    141141 *
    142142 * @param array $linkdata Elements that make up the link to insert.
    143  * @param bool $wp_error Optional. If true return WP_Error object on failure.
     143 * @param bool  $wp_error Optional. If true return WP_Error object on failure.
    144144 * @return int|WP_Error Value 0 or WP_Error on failure. The link ID on success.
    145145 */
  • trunk/src/wp-admin/includes/class-wp-comments-list-table.php

    r32651 r32654  
    5454        }
    5555
     56        /**
     57         * @return bool
     58         */
    5659        public function ajax_user_can() {
    5760                return current_user_can('edit_posts');
     
    159162                 * @param string $comment_status    The comment status name. Default 'All'.
    160163                 */
    161                 $comments_per_page = apply_filters( 'comments_per_page', $comments_per_page, $comment_status );
    162                 return $comments_per_page;
     164                return apply_filters( 'comments_per_page', $comments_per_page, $comment_status );
    163165        }
    164166
     
    231233                 *                            Accepts 'All', 'Pending', 'Approved', 'Spam', and 'Trash'.
    232234                 */
    233                 $status_links = apply_filters( 'comment_status_links', $status_links );
    234                 return $status_links;
     235                return apply_filters( 'comment_status_links', $status_links );
    235236        }
    236237
     
    238239         *
    239240         * @global string $comment_status
     241         *
     242         * @return array
    240243         */
    241244        protected function get_bulk_actions() {
     
    267270         * @global string $comment_status
    268271         * @global string $comment_type
     272         *
    269273         * @param string $which
    270274         */
     
    322326        }
    323327
     328        /**
     329         * @return string|false
     330         */
    324331        public function current_action() {
    325332                if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) )
     
    332339         *
    333340         * @global int $post_id
     341         *
    334342         * @return array
    335343         */
     
    351359        }
    352360
     361        /**
     362         *
     363         * @return array
     364         */
    353365        protected function get_sortable_columns() {
    354366                return array(
     
    407419         * @global WP_Post $post
    408420         * @global object  $comment
     421         *
    409422         * @param object $a_comment
    410423         */
     
    438451         * @param string $primary Primary column name
    439452         *
    440          * @return string
     453         * @return string|void
    441454         */
    442455        protected function handle_row_actions( $comment, $column_name, $primary ) {
    443456                global $comment_status;
    444  
     457
    445458                if ( ! $this->user_can ) {
    446459                        return;
    447 
    448460                }
    449461
     
    543555        }
    544556
     557        /**
     558         *
     559         * @param object $comment
     560         */
    545561        public function column_cb( $comment ) {
    546562                if ( $this->user_can ) { ?>
     
    554570         *
    555571         * @global string $comment_status
     572         *
    556573         * @param object $comment
    557574         */
     
    602619         *
    603620         * @global string $comment_status
     621         *
    604622         * @param object $comment
    605623         */
     
    635653        }
    636654
     655        /**
     656         *
     657         * @return string
     658         */
    637659        public function column_date() {
    638660                return get_comment_date( __( 'Y/m/d \a\t g:i a' ) );
     
    667689        }
    668690
     691        /**
     692         *
     693         * @param object $comment
     694         * @param string $column_name
     695         */
    669696        public function column_default( $comment, $column_name ) {
    670697                /**
     
    692719class WP_Post_Comments_List_Table extends WP_Comments_List_Table {
    693720
     721        /**
     722         *
     723         * @return array
     724         */
    694725        protected function get_column_info() {
    695726                return array(
     
    704735        }
    705736
     737        /**
     738         *
     739         * @return array
     740         */
    706741        protected function get_table_classes() {
    707742                $classes = parent::get_table_classes();
     
    710745        }
    711746
     747        /**
     748         *
     749         * @param bool $output_empty
     750         */
    712751        public function display( $output_empty = false ) {
    713752                $singular = $this->_args['singular'];
     
    728767        }
    729768
     769        /**
     770         *
     771         * @param bool $comment_status
     772         * @return int
     773         */
    730774        public function get_per_page( $comment_status = false ) {
    731775                return 10;
  • trunk/src/wp-admin/includes/class-wp-filesystem-base.php

    r31554 r32654  
    172172         */
    173173        public function find_folder( $folder ) {
    174 
    175174                if ( isset( $this->cache[ $folder ] ) )
    176175                        return $this->cache[ $folder ];
  • trunk/src/wp-admin/includes/class-wp-filesystem-ftpext.php

    r32650 r32654  
    1818        public $link;
    1919
    20         public function __construct($opt='') {
     20        /**
     21         *
     22         * @param array $opt
     23         */
     24        public function __construct( $opt = '' ) {
    2125                $this->method = 'ftpext';
    2226                $this->errors = new WP_Error();
     
    5963        }
    6064
     65        /**
     66         *
     67         * @return bool
     68         */
    6169        public function connect() {
    6270                if ( isset($this->options['ssl']) && $this->options['ssl'] && function_exists('ftp_ssl_connect') )
  • trunk/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php

    r31815 r32654  
    2121        public $ftp;
    2222
    23         public function __construct($opt = '') {
     23        /**
     24         *
     25         * @param array $opt
     26         */
     27        public function __construct( $opt  = '' ) {
    2428                $this->method = 'ftpsockets';
    2529                $this->errors = new WP_Error();
     
    5357        }
    5458
     59        /**
     60         *
     61         * @return bool
     62         */
    5563        public function connect() {
    5664                if ( ! $this->ftp )
     
    227235        }
    228236        /**
     237         * @param string   $source
     238         * @param string   $destination
     239         * @param bool     $overwrite
     240         * @param int|bool $mode
     241         * @return bool
     242         */
     243        public function copy($source, $destination, $overwrite = false, $mode = false) {
     244                if ( ! $overwrite && $this->exists($destination) )
     245                        return false;
     246
     247                $content = $this->get_contents($source);
     248                if ( false === $content )
     249                        return false;
     250
     251                return $this->put_contents($destination, $content, $mode);
     252        }
     253        /**
    229254         * @param string $source
    230255         * @param string $destination
    231          * @param bool $overwrite
    232          * @param int|bool $mode
    233          * @return bool
    234          */
    235         public function copy($source, $destination, $overwrite = false, $mode = false) {
    236                 if ( ! $overwrite && $this->exists($destination) )
    237                         return false;
    238 
    239                 $content = $this->get_contents($source);
    240                 if ( false === $content )
    241                         return false;
    242 
    243                 return $this->put_contents($destination, $content, $mode);
    244         }
    245         /**
    246          * @param string $source
    247          * @param string $destination
    248          * @param bool $overwrite
     256         * @param bool   $overwrite
    249257         * @return bool
    250258         */
     
    254262        /**
    255263         * @param string $file
    256          * @param bool $recursive
     264         * @param bool   $recursive
    257265         * @param string $type
    258266         * @return bool
     
    360368        /**
    361369         * @param string $path
    362          * @param mixed $chmod
    363          * @param mixed $chown
    364          * @param mixed $chgrp
     370         * @param mixed  $chmod
     371         * @param mixed  $chown
     372         * @param mixed  $chgrp
    365373         * @return bool
    366374         */
     
    388396        /**
    389397         * @param string $path
    390          * @param bool $include_hidden
    391          * @param bool $recursive
     398         * @param bool   $include_hidden
     399         * @param bool   $recursive
    392400         * @return bool|array
    393401         */
  • trunk/src/wp-admin/includes/class-wp-filesystem-ssh2.php

    r31686 r32654  
    4343        public $keys = false;
    4444
    45         public function __construct($opt='') {
     45        /**
     46         *
     47         * @param array $opt
     48         */
     49        public function __construct( $opt = '' ) {
    4650                $this->method = 'ssh2';
    4751                $this->errors = new WP_Error();
     
    9094                        $this->options['password'] = $opt['password'];
    9195                }
    92 
    93         }
    94 
     96        }
     97
     98        /**
     99         *
     100         * @return bool
     101         */
    95102        public function connect() {
    96103                if ( ! $this->keys ) {
     
    127134         * @return bool|string
    128135         */
    129         public function run_command( $command, $returnbool = false) {
    130 
     136        public function run_command( $command, $returnbool = false ) {
    131137                if ( ! $this->link )
    132138                        return false;
     
    167173
    168174        /**
    169          * @param string $file
    170          * @param string $contents
     175         * @param string   $file
     176         * @param string   $contents
    171177         * @param bool|int $mode
    172178         * @return bool
     
    183189        }
    184190
     191        /**
     192         *
     193         * @return bool
     194         */
    185195        public function cwd() {
    186196                $cwd = $this->run_command('pwd');
     
    202212         * @param string $file
    203213         * @param string $group
    204          * @param bool $recursive
     214         * @param bool   $recursive
     215         *
     216         * @return bool
    205217         */
    206218        public function chgrp($file, $group, $recursive = false ) {
     
    214226        /**
    215227         * @param string $file
    216          * @param int $mode
    217          * @param bool $recursive
     228         * @param int    $mode
     229         * @param bool   $recursive
    218230         * @return bool|string
    219231         */
     
    290302
    291303        /**
     304         * @param string   $source
     305         * @param string   $destination
     306         * @param bool     $overwrite
     307         * @param int|bool $mode
     308         * @return bool
     309         */
     310        public function copy($source, $destination, $overwrite = false, $mode = false) {
     311                if ( ! $overwrite && $this->exists($destination) )
     312                        return false;
     313                $content = $this->get_contents($source);
     314                if ( false === $content)
     315                        return false;
     316                return $this->put_contents($destination, $content, $mode);
     317        }
     318
     319        /**
    292320         * @param string $source
    293321         * @param string $destination
    294          * @param bool $overwrite
    295          * @param int|bool $mode
    296          * @return bool
    297          */
    298         public function copy($source, $destination, $overwrite = false, $mode = false) {
    299                 if ( ! $overwrite && $this->exists($destination) )
    300                         return false;
    301                 $content = $this->get_contents($source);
    302                 if ( false === $content)
    303                         return false;
    304                 return $this->put_contents($destination, $content, $mode);
    305         }
    306 
    307         /**
    308          * @param string $source
    309          * @param string $destination
    310          * @param bool $overwrite
     322         * @param bool   $overwrite
    311323         * @return bool
    312324         */
     
    316328
    317329        /**
    318          * @param string $file
    319          * @param bool $recursive
     330         * @param string      $file
     331         * @param bool        $recursive
    320332         * @param string|bool $type
    321333         * @return bool
     
    404416        /**
    405417         * @param string $file
    406          * @param int $time
    407          * @param int $atime
     418         * @param int    $time
     419         * @param int    $atime
    408420         */
    409421        public function touch($file, $time = 0, $atime = 0) {
     
    413425        /**
    414426         * @param string $path
    415          * @param mixed $chmod
    416          * @param mixed $chown
    417          * @param mixed $chgrp
     427         * @param mixed  $chmod
     428         * @param mixed  $chown
     429         * @param mixed  $chgrp
    418430         * @return bool
    419431         */
     
    436448        /**
    437449         * @param string $path
    438          * @param bool $recursive
     450         * @param bool   $recursive
    439451         * @return bool
    440452         */
     
    445457        /**
    446458         * @param string $path
    447          * @param bool $include_hidden
    448          * @param bool $recursive
     459         * @param bool   $include_hidden
     460         * @param bool   $recursive
    449461         * @return bool|array
    450462         */
  • trunk/src/wp-admin/includes/class-wp-importer.php

    r32642 r32654  
    1515         * @global wpdb $wpdb
    1616         *
     17         * @param string $importer_name
    1718         * @param string $bid
    1819         * @return array
     
    5455         * @global wpdb $wpdb
    5556         *
     57         * @param string $importer_name
    5658         * @param string $bid
    5759         * @return int
     
    121123        }
    122124
     125        /**
     126         *
     127         * @param int $blog_id
     128         * @return int|void
     129         */
    123130        public function set_blog( $blog_id ) {
    124131                if ( is_numeric( $blog_id ) ) {
     
    148155        }
    149156
     157        /**
     158         *
     159         * @param int $user_id
     160         * @return int|void
     161         */
    150162        public function set_user( $user_id ) {
    151163                if ( is_numeric( $user_id ) ) {
     
    180192         * @param string $username
    181193         * @param string $password
    182          * @param bool $head
     194         * @param bool   $head
    183195         * @return array
    184196         */
     
    255267 *
    256268 * @param string $param
    257  * @param bool $required
     269 * @param bool   $required
    258270 * @return mixed
    259271 */
  • trunk/src/wp-admin/includes/class-wp-links-list-table.php

    r32644 r32654  
    2727        }
    2828
     29        /**
     30         *
     31         * @return bool
     32         */
    2933        public function ajax_user_can() {
    3034                return current_user_can( 'manage_links' );
     
    6165        }
    6266
     67        /**
     68         *
     69         * @return array
     70         */
    6371        protected function get_bulk_actions() {
    6472                $actions = array();
     
    100108        }
    101109
     110        /**
     111         *
     112         * @return array
     113         */
    102114        public function get_columns() {
    103115                return array(
     
    112124        }
    113125
     126        /**
     127         *
     128         * @return array
     129         */
    114130        protected function get_sortable_columns() {
    115131                return array(
  • trunk/src/wp-admin/includes/class-wp-list-table.php

    r32650 r32654  
    251251         * @param array $args An associative array with information about the pagination
    252252         * @access protected
     253         *
     254         * @param array|string $args
    253255         */
    254256        protected function set_pagination_args( $args ) {
     
    456458         * @access public
    457459         *
    458          * @return string|bool The action name or False if no action was selected
     460         * @return string|false The action name or False if no action was selected
    459461         */
    460462        public function current_action() {
     
    977979
    978980                $this->display_tablenav( 'top' );
    979 
    980981?>
    981982<table class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>">
     
    10931094        }
    10941095
     1096        /**
     1097         *
     1098         * @param object $item
     1099         * @param string $column_name
     1100         */
    10951101        protected function column_default( $item, $column_name ) {}
    10961102
     1103        /**
     1104         *
     1105         * @param object $item
     1106         */
    10971107        protected function column_cb( $item ) {}
    10981108
  • trunk/src/wp-admin/includes/class-wp-media-list-table.php

    r32644 r32654  
    3838        }
    3939
     40        /**
     41         *
     42         * @return bool
     43         */
    4044        public function ajax_user_can() {
    4145                return current_user_can('upload_files');
     
    106110        }
    107111
     112        /**
     113         *
     114         * @return array
     115         */
    108116        protected function get_bulk_actions() {
    109117                $actions = array();
     
    152160        }
    153161
     162        /**
     163         *
     164         * @return string
     165         */
    154166        public function current_action() {
    155167                if ( isset( $_REQUEST['found_post_id'] ) && isset( $_REQUEST['media'] ) )
     
    165177        }
    166178
     179        /**
     180         *
     181         * @return bool
     182         */
    167183        public function has_items() {
    168184                return have_posts();
     
    222238        }
    223239
     240        /**
     241         *
     242         * @return array
     243         */
    224244        public function get_columns() {
    225245                $posts_columns = array();
     
    272292                 *                             to any posts. Default true.
    273293                 */
    274                 $posts_columns = apply_filters( 'manage_media_columns', $posts_columns, $this->detached );
    275 
    276                 return $posts_columns;
    277         }
    278 
     294                return apply_filters( 'manage_media_columns', $posts_columns, $this->detached );
     295        }
     296
     297        /**
     298         *
     299         * @return array
     300         */
    279301        protected function get_sortable_columns() {
    280302                return array(
     
    496518                        echo $this->row_actions( $this->_get_row_actions( $post, $att_title ) );
    497519                }
    498                
     520
    499521                echo '</td>';
    500522        }
     
    520542         * @param WP_Post $post
    521543         * @param string  $att_title
     544         *
     545         * @return array
    522546         */
    523547        private function _get_row_actions( $post, $att_title ) {
     
    568592                 *                          to any posts. Default true.
    569593                 */
    570                 $actions = apply_filters( 'media_row_actions', $actions, $post, $this->detached );
    571 
    572                 return $actions;
     594                return apply_filters( 'media_row_actions', $actions, $post, $this->detached );
    573595        }
    574596}
  • trunk/src/wp-admin/includes/class-wp-ms-sites-list-table.php

    r32644 r32654  
    2727        }
    2828
     29        /**
     30         *
     31         * @return bool
     32         */
    2933        public function ajax_user_can() {
    3034                return current_user_can( 'manage_sites' );
     
    143147        }
    144148
     149        /**
     150         *
     151         * @return array
     152         */
    145153        protected function get_bulk_actions() {
    146154                $actions = array();
     
    167175        }
    168176
     177        /**
     178         *
     179         * @return array
     180         */
    169181        public function get_columns() {
    170182                $blogname_columns = ( is_subdomain_install() ) ? __( 'Domain' ) : __( 'Path' );
     
    188200                 *                             'blogname', 'lastupdated', 'registered', 'users'.
    189201                 */
    190                 $sites_columns = apply_filters( 'wpmu_blogs_columns', $sites_columns );
    191 
    192                 return $sites_columns;
    193         }
    194 
     202                return apply_filters( 'wpmu_blogs_columns', $sites_columns );
     203        }
     204
     205        /**
     206         *
     207         * @return array
     208         */
    195209        protected function get_sortable_columns() {
    196210                return array(
  • trunk/src/wp-admin/includes/class-wp-ms-themes-list-table.php

    r32650 r32654  
    4848        }
    4949
     50        /**
     51         *
     52         * @return array
     53         */
    5054        protected function get_table_classes() {
    5155                // todo: remove and add CSS for .themes
     
    5357        }
    5458
     59        /**
     60         *
     61         * @return bool
     62         */
    5563        public function ajax_user_can() {
    5664                if ( $this->is_site_themes )
     
    224232        }
    225233
     234        /**
     235         *
     236         * @return array
     237         */
    226238        protected function get_sortable_columns() {
    227239                return array(
     
    292304
    293305        /**
    294          *
    295306         * @global string $status
     307         *
    296308         * @return array
    297309         */
     
    323335         * @global string $s
    324336         * @global array $totals
     337         *
    325338         * @param WP_Theme $theme
    326339         */
  • trunk/src/wp-admin/includes/class-wp-ms-users-list-table.php

    r32644 r32654  
    99 */
    1010class WP_MS_Users_List_Table extends WP_List_Table {
    11 
     11        /**
     12         *
     13         * @return bool
     14         */
    1215        public function ajax_user_can() {
    1316                return current_user_can( 'manage_network_users' );
     
    8083        }
    8184
     85        /**
     86         *
     87         * @return array
     88         */
    8289        protected function get_bulk_actions() {
    8390                $actions = array();
     
    128135        }
    129136
     137        /**
     138         *
     139         * @return array
     140         */
    130141        public function get_columns() {
    131142                $users_columns = array(
     
    145156                 *                             'name', 'email', 'registered', 'blogs'.
    146157                 */
    147                 $users_columns = apply_filters( 'wpmu_users_columns', $users_columns );
    148 
    149                 return $users_columns;
    150         }
    151 
     158                return apply_filters( 'wpmu_users_columns', $users_columns );
     159        }
     160
     161        /**
     162         *
     163         * @return array
     164         */
    152165        protected function get_sortable_columns() {
    153166                return array(
     
    209222                                } else {
    210223                                        echo "<td $attributes>";
    211                                        
     224
    212225                                        switch ( $column_name ) {
    213226                                                case 'username':
  • trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php

    r32642 r32654  
    1616        private $error;
    1717
     18        /**
     19         *
     20         * @return bool
     21         */
    1822        public function ajax_user_can() {
    1923                return current_user_can('install_plugins');
     
    2933         * @since 4.0.0
    3034         * @access protected
     35         *
     36         * @return array
    3137         */
    3238        protected function get_installed_plugin_slugs() {
     
    222228         * @global array $tabs
    223229         * @global string $tab
     230         *
    224231         * @return array
    225232         */
     
    326333        }
    327334
     335        /**
     336         * @return array
     337         */
    328338        protected function get_table_classes() {
    329339                return array( 'widefat', $this->_args['plural'] );
    330340        }
    331 
     341       
     342        /**
     343         * @return array
     344         */
    332345        public function get_columns() {
    333346                return array();
  • trunk/src/wp-admin/includes/class-wp-plugins-list-table.php

    r32650 r32654  
    4141        }
    4242
     43        /**
     44         * @return array
     45         */
    4346        protected function get_table_classes() {
    4447                return array( 'widefat', $this->_args['plural'] );
    4548        }
    4649
     50        /**
     51         * @return bool
     52         */
    4753        public function ajax_user_can() {
    4854                return current_user_can('activate_plugins');
     
    217223         * @staticvar string $term
    218224         * @param array $plugin
    219          * @return boolean
     225         * @return bool
    220226         */
    221227        public function _search_callback( $plugin ) {
     
    283289        }
    284290
     291        /**
     292         * @return array
     293         */
    285294        protected function get_sortable_columns() {
    286295                return array();
     
    366375         * @global string $status
    367376         * @param string $which
    368          * @return null
    369377         */
    370378        public function bulk_actions( $which = '' ) {
     
    380388         * @global string $status
    381389         * @param string $which
    382          * @return null
    383390         */
    384391        protected function extra_tablenav( $which ) {
     
    400407        }
    401408
     409        /**
     410         * @return string
     411         */
    402412        public function current_action() {
    403413                if ( isset($_POST['clear-recent-list']) )
     
    426436         * @global string $s
    427437         * @global array $totals
     438         *
    428439         * @param array $item
    429440         */
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r32644 r32654  
    101101        }
    102102
     103        /**
     104         *
     105         * @return bool
     106         */
    103107        public function ajax_user_can() {
    104108                return current_user_can( get_post_type_object( $this->screen->post_type )->cap->edit_posts );
     
    148152        }
    149153
     154        /**
     155         *
     156         * @return bool
     157         */
    150158        public function has_items() {
    151159                return have_posts();
     
    164172         * @since 4.2.0
    165173         *
    166          * @return bool Whether the current ivew is the "All" view.
     174         * @return bool Whether the current view is the "All" view.
    167175         */
    168176        protected function is_base_request() {
     
    255263        }
    256264
     265        /**
     266         *
     267         * @return array
     268         */
    257269        protected function get_bulk_actions() {
    258270                $actions = array();
     
    324336        }
    325337
     338        /**
     339         *
     340         * @return string
     341         */
    326342        public function current_action() {
    327343                if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) )
     
    344360        }
    345361
     362        /**
     363         *
     364         * @return array
     365         */
    346366        protected function get_table_classes() {
    347367                return array( 'widefat', 'fixed', 'striped', is_post_type_hierarchical( $this->screen->post_type ) ? 'pages' : 'posts' );
    348368        }
    349369
     370        /**
     371         *
     372         * @return array
     373         */
    350374        public function get_columns() {
    351375                $post_type = $this->screen->post_type;
     
    428452                 * @param array $post_columns An array of column names.
    429453                 */
    430                 $posts_columns = apply_filters( "manage_{$post_type}_posts_columns", $posts_columns );
    431 
    432                 return $posts_columns;
    433         }
    434 
     454                return apply_filters( "manage_{$post_type}_posts_columns", $posts_columns );
     455        }
     456
     457        /**
     458         *
     459         * @return array
     460         */
    435461        protected function get_sortable_columns() {
    436462                return array(
     
    489515         * @param int $pagenum
    490516         * @param int $per_page
    491          * @return false|null
    492517         */
    493518        private function _display_rows_hierarchical( $pages, $pagenum = 1, $per_page = 20 ) {
     
    500525
    501526                        if ( ! $pages )
    502                                 return false;
     527                                return;
    503528                }
    504529
     
    597622         */
    598623        private function _page_rows( &$children_pages, &$count, $parent, $level, $pagenum, $per_page, &$to_display ) {
    599 
    600624                if ( ! isset( $children_pages[$parent] ) )
    601625                        return;
     
    605629
    606630                foreach ( $children_pages[$parent] as $page ) {
    607 
    608631                        if ( $count >= $end )
    609632                                break;
  • trunk/src/wp-admin/includes/class-wp-terms-list-table.php

    r32644 r32654  
    5656        }
    5757
     58        /**
     59         *
     60         * @return bool
     61         */
    5862        public function ajax_user_can() {
    5963                return current_user_can( get_taxonomy( $this->screen->taxonomy )->cap->manage_terms );
     
    115119        }
    116120
     121        /**
     122         *
     123         * @return bool
     124         */
    117125        public function has_items() {
    118126                // todo: populate $this->items in prepare_items()
     
    124132        }
    125133
     134        /**
     135         *
     136         * @return array
     137         */
    126138        protected function get_bulk_actions() {
    127139                $actions = array();
     
    131143        }
    132144
     145        /**
     146         *
     147         * @return string
     148         */
    133149        public function current_action() {
    134150                if ( isset( $_REQUEST['action'] ) && isset( $_REQUEST['delete_tags'] ) && ( 'delete' == $_REQUEST['action'] || 'delete' == $_REQUEST['action2'] ) )
     
    138154        }
    139155
     156        /**
     157         *
     158         * @return array
     159         */
    140160        public function get_columns() {
    141161                $columns = array(
     
    155175        }
    156176
     177        /**
     178         *
     179         * @return array
     180         */
    157181        protected function get_sortable_columns() {
    158182                return array(
     
    218242         * @param array $terms
    219243         * @param array $children
    220          * @param int $start
    221          * @param int $per_page
    222          * @param int $count
    223          * @param int $parent
    224          * @param int $level
     244         * @param int   $start
     245         * @param int   $per_page
     246         * @param int   $count
     247         * @param int   $parent
     248         * @param int   $level
    225249         */
    226250        private function _rows( $taxonomy, $terms, &$children, $start, $per_page, &$count, $parent = 0, $level = 0 ) {
  • trunk/src/wp-admin/includes/class-wp-theme-install-list-table.php

    r32642 r32654  
    1212        public $features = array();
    1313
     14        /**
     15         *
     16         * @return bool
     17         */
    1418        public function ajax_user_can() {
    1519                return current_user_can( 'install_themes' );
     
    417421         * @global string $tab  Current tab within Themes->Install screen
    418422         * @global string $type Type of search.
     423         *
     424         * @param array $extra_args Unused.
    419425         */
    420426        public function _js_vars( $extra_args = array() ) {
  • trunk/src/wp-admin/includes/class-wp-themes-list-table.php

    r32116 r32654  
    3030        }
    3131
     32        /**
     33         *
     34         * @return bool
     35         */
    3236        public function ajax_user_can() {
    3337                // Do not check edit_theme_options here. AJAX calls for available themes require switch_themes.
     
    98102        /**
    99103         * @param string $which
    100          * @return null
    101104         */
    102105        public function tablenav( $which = 'top' ) {
     
    125128        }
    126129
     130        /**
     131         *
     132         * @return array
     133         */
    127134        public function get_columns() {
    128135                return array();
  • trunk/src/wp-admin/includes/class-wp-users-list-table.php

    r32644 r32654  
    5757         * @since 3.1.0
    5858         * @access public
     59         *
     60         * @return bool
    5961         */
    6062        public function ajax_user_can() {
  • trunk/src/wp-admin/includes/comment.php

    r32642 r32654  
    2121        global $wpdb;
    2222
    23         $comment_author = stripslashes($comment_author);
    24         $comment_date = stripslashes($comment_date);
    25 
    2623        return $wpdb->get_var( $wpdb->prepare("SELECT comment_post_ID FROM $wpdb->comments
    27                         WHERE comment_author = %s AND comment_date = %s", $comment_author, $comment_date) );
     24                        WHERE comment_author = %s AND comment_date = %s",
     25                        stripslashes( $comment_author ),
     26                        stripslashes( $comment_date )
     27        ) );
    2828}
    2929
     
    3434 */
    3535function edit_comment() {
    36 
    3736        if ( ! current_user_can( 'edit_comment', (int) $_POST['comment_ID'] ) )
    3837                wp_die ( __( 'You are not allowed to edit comments on this post.' ) );
     
    8180 *
    8281 * @param int $id ID of comment to retrieve.
    83  * @return bool|object Comment if found. False on failure.
     82 * @return object|false Comment if found. False on failure.
    8483 */
    8584function get_comment_to_edit( $id ) {
     
    157156 *
    158157 * @since 2.5.0
    159  * 
     158 *
    160159 * @global object $comment
    161160 *
  • trunk/src/wp-admin/includes/template.php

    r32653 r32654  
    439439 * @global WP_List_Table $wp_list_table
    440440 *
    441  * @param int $position
    442  * @param bool $checkbox
     441 * @param int    $position
     442 * @param bool   $checkbox
    443443 * @param string $mode
    444  * @param bool $table_row
     444 * @param bool   $table_row
    445445 */
    446446function wp_comment_reply( $position = 1, $checkbox = false, $mode = 'single', $table_row = true ) {
     
    10391039 *
    10401040 * @staticvar bool $already_sorted
    1041  * @param string|WP_Screen $screen Screen identifier
    1042  * @param string $context box context
    1043  * @param mixed $object gets passed to the box callback function as first parameter
     1041 * @param string|WP_Screen $screen  Screen identifier
     1042 * @param string           $context box context
     1043 * @param mixed            $object gets passed to the box callback function as first parameter
    10441044 * @return int number of meta_boxes
    10451045 */
     
    11081108 * @global array $wp_meta_boxes
    11091109 *
    1110  * @param string $id String for use in the 'id' attribute of tags.
    1111  * @param string|object $screen The screen on which to show the box (post, page, link).
    1112  * @param string $context The context within the page where the boxes should show ('normal', 'advanced').
     1110 * @param string        $id      String for use in the 'id' attribute of tags.
     1111 * @param string|object $screen  The screen on which to show the box (post, page, link).
     1112 * @param string        $context The context within the page where the boxes should show ('normal', 'advanced').
    11131113 */
    11141114function remove_meta_box($id, $screen, $context) {
     
    11441144 * @uses global $wp_meta_boxes Used to retrieve registered meta boxes.
    11451145 *
    1146  * @param string|object $screen The screen identifier.
    1147  * @param string $context The meta box context.
    1148  * @param mixed $object gets passed to the section callback function as first parameter.
     1146 * @param string|object $screen  The screen identifier.
     1147 * @param string        $context The meta box context.
     1148 * @param mixed         $object gets passed to the section callback function as first parameter.
    11491149 * @return int number of meta boxes as accordion sections.
    11501150 */
     
    12221222 * @global $wp_settings_sections Storage array of all settings sections added to admin pages
    12231223 *
    1224  * @param string $id Slug-name to identify the section. Used in the 'id' attribute of tags.
    1225  * @param string $title Formatted title of the section. Shown as the heading for the section.
     1224 * @param string $id       Slug-name to identify the section. Used in the 'id' attribute of tags.
     1225 * @param string $title    Formatted title of the section. Shown as the heading for the section.
    12261226 * @param string $callback Function that echos out any content at the top of the section (between heading and fields).
    1227  * @param string $page The slug-name of the settings page on which to show the section. Built-in pages include 'general', 'reading', 'writing', 'discussion', 'media', etc. Create your own using add_options_page();
     1227 * @param string $page     The slug-name of the settings page on which to show the section. Built-in pages include 'general', 'reading', 'writing', 'discussion', 'media', etc. Create your own using add_options_page();
    12281228 */
    12291229function add_settings_section($id, $title, $callback, $page) {
     
    17011701}
    17021702
     1703/**
     1704 *
     1705 * @param WP_Post $post
     1706 */
    17031707function _post_states($post) {
    17041708        $post_states = array();
     
    17511755}
    17521756
     1757/**
     1758 *
     1759 * @param WP_Post $post
     1760 */
    17531761function _media_states( $post ) {
    17541762        $media_states = array();
  • trunk/src/wp-admin/includes/theme-install.php

    r32653 r32654  
    5151 *
    5252 * @since 2.8.0
     53 *
     54 * @param bool $type_selector
    5355 */
    5456function install_theme_search_form( $type_selector = true ) {
     
    151153 *
    152154 * @global WP_Theme_Install_List_Table $wp_list_table
     155 *
     156 * @param object $theme
    153157 */
    154158function display_theme( $theme ) {
  • trunk/src/wp-admin/includes/theme.php

    r32653 r32654  
    1616 * @param string $stylesheet Stylesheet of the theme to delete
    1717 * @param string $redirect Redirect to page when complete.
    18  * @return mixed
     18 * @return void|bool|WP_Error When void, echoes content.
    1919 */
    2020function delete_theme($stylesheet, $redirect = '') {
     
    124124 * @see get_theme_update_available()
    125125 *
    126  * @param object $theme Theme data object.
     126 * @param WP_Theme $theme Theme data object.
    127127 */
    128128function theme_update_available( $theme ) {
  • trunk/src/wp-admin/includes/update-core.php

    r32653 r32654  
    778778 *
    779779 * @param string $from New release unzipped path.
    780  * @param string $to Path to old WordPress installation.
     780 * @param string $to   Path to old WordPress installation.
    781781 * @return WP_Error|null WP_Error on failure, null on success.
    782782 */
     
    11191119 * @global WP_Filesystem_Base $wp_filesystem
    11201120 *
    1121  * @param string $from source directory
    1122  * @param string $to destination directory
     1121 * @param string $from     source directory
     1122 * @param string $to       destination directory
    11231123 * @param array $skip_list a list of files/folders to skip copying
    11241124 * @return mixed WP_Error on failure, True on success.
     
    11771177 * @global string $pagenow
    11781178 * @global string $action
     1179 *
     1180 * @param string $new_version
    11791181 */
    11801182function _redirect_to_about_wordpress( $new_version ) {
  • trunk/src/wp-admin/includes/update.php

    r32653 r32654  
    1010 * Selects the first update version from the update_core option.
    1111 *
    12  * @return bool|object The response from the API on success, false on failure.
     12 * @return object|array|false The response from the API on success, false on failure.
    1313 */
    1414function get_preferred_from_update_core() {
     
    2525 *
    2626 * @param array $options Set $options['dismissed'] to true to show dismissed upgrades too,
    27  *      set $options['available'] to false to skip not-dismissed updates.
    28  * @return bool|array Array of the update objects on success, false on failure.
     27 *                           set $options['available'] to false to skip not-dismissed updates.
     28 * @return array|false Array of the update objects on success, false on failure.
    2929 */
    3030function get_core_updates( $options = array() ) {
     
    6868 * @since 3.7.0
    6969 *
    70  * @return bool|array False on failure, otherwise the core update offering.
     70 * @return array|false False on failure, otherwise the core update offering.
    7171 */
    7272function find_core_auto_update() {
     
    129129}
    130130
     131/**
     132 *
     133 * @param object $update
     134 * @return bool
     135 */
    131136function dismiss_core_update( $update ) {
    132137        $dismissed = get_site_option( 'dismissed_update_core' );
     
    135140}
    136141
     142/**
     143 *
     144 * @param string $version
     145 * @param string $locale
     146 * @return bool
     147 */
    137148function undismiss_core_update( $version, $locale ) {
    138149        $dismissed = get_site_option( 'dismissed_update_core' );
     
    146157}
    147158
     159/**
     160 *
     161 * @param string $version
     162 * @param string $locale
     163 * @return object|false
     164 */
    148165function find_core_update( $version, $locale ) {
    149166        $from_api = get_site_transient( 'update_core' );
     
    160177}
    161178
     179/**
     180 *
     181 * @param string $msg
     182 * @return string
     183 */
    162184function core_update_footer( $msg = '' ) {
    163185        if ( !current_user_can('update_core') )
     
    265287}
    266288
     289/**
     290 *
     291 * @param string $file
     292 * @param array  $plugin_data
     293 * @return false|void
     294 */
    267295function wp_plugin_update_row( $file, $plugin_data ) {
    268296        $current = get_site_transient( 'update_plugins' );
     
    331359}
    332360
     361/**
     362 *
     363 * @return array
     364 */
    333365function get_theme_updates() {
    334366        $current = get_site_transient('update_themes');
     
    360392}
    361393
     394/**
     395 *
     396 * @param string   $theme_key
     397 * @param WP_Theme $theme
     398 * @return false|void
     399 */
    362400function wp_theme_update_row( $theme_key, $theme ) {
    363401        $current = get_site_transient( 'update_themes' );
  • trunk/src/wp-admin/includes/upgrade.php

    r32643 r32654  
    166166
    167167        $wpdb->insert( $wpdb->posts, array(
    168                                                                 'post_author' => $user_id,
    169                                                                 'post_date' => $now,
    170                                                                 'post_date_gmt' => $now_gmt,
    171                                                                 'post_content' => $first_post,
    172                                                                 'post_excerpt' => '',
    173                                                                 'post_title' => __('Hello world!'),
    174                                                                 /* translators: Default post slug */
    175                                                                 'post_name' => sanitize_title( _x('hello-world', 'Default post slug') ),
    176                                                                 'post_modified' => $now,
    177                                                                 'post_modified_gmt' => $now_gmt,
    178                                                                 'guid' => $first_post_guid,
    179                                                                 'comment_count' => 1,
    180                                                                 'to_ping' => '',
    181                                                                 'pinged' => '',
    182                                                                 'post_content_filtered' => ''
    183                                                                 ));
     168                'post_author' => $user_id,
     169                'post_date' => $now,
     170                'post_date_gmt' => $now_gmt,
     171                'post_content' => $first_post,
     172                'post_excerpt' => '',
     173                'post_title' => __('Hello world!'),
     174                /* translators: Default post slug */
     175                'post_name' => sanitize_title( _x('hello-world', 'Default post slug') ),
     176                'post_modified' => $now,
     177                'post_modified_gmt' => $now_gmt,
     178                'guid' => $first_post_guid,
     179                'comment_count' => 1,
     180                'to_ping' => '',
     181                'pinged' => '',
     182                'post_content_filtered' => ''
     183        ));
    184184        $wpdb->insert( $wpdb->term_relationships, array('term_taxonomy_id' => $cat_tt_id, 'object_id' => 1) );
    185185
     
    195195        }
    196196        $wpdb->insert( $wpdb->comments, array(
    197                                                                 'comment_post_ID' => 1,
    198                                                                 'comment_author' => $first_comment_author,
    199                                                                 'comment_author_email' => '',
    200                                                                 'comment_author_url' => $first_comment_url,
    201                                                                 'comment_date' => $now,
    202                                                                 'comment_date_gmt' => $now_gmt,
    203                                                                 'comment_content' => $first_comment
    204                                                                 ));
     197                'comment_post_ID' => 1,
     198                'comment_author' => $first_comment_author,
     199                'comment_author_email' => '',
     200                'comment_author_url' => $first_comment_url,
     201                'comment_date' => $now,
     202                'comment_date_gmt' => $now_gmt,
     203                'comment_content' => $first_comment
     204        ));
    205205
    206206        // First Page
     
    218218        $first_post_guid = get_option('home') . '/?page_id=2';
    219219        $wpdb->insert( $wpdb->posts, array(
    220                                                                 'post_author' => $user_id,
    221                                                                 'post_date' => $now,
    222                                                                 'post_date_gmt' => $now_gmt,
    223                                                                 'post_content' => $first_page,
    224                                                                 'post_excerpt' => '',
    225                                                                 'post_title' => __( 'Sample Page' ),
    226                                                                 /* translators: Default page slug */
    227                                                                 'post_name' => __( 'sample-page' ),
    228                                                                 'post_modified' => $now,
    229                                                                 'post_modified_gmt' => $now_gmt,
    230                                                                 'guid' => $first_post_guid,
    231                                                                 'post_type' => 'page',
    232                                                                 'to_ping' => '',
    233                                                                 'pinged' => '',
    234                                                                 'post_content_filtered' => ''
    235                                                                 ));
     220                'post_author' => $user_id,
     221                'post_date' => $now,
     222                'post_date_gmt' => $now_gmt,
     223                'post_content' => $first_page,
     224                'post_excerpt' => '',
     225                'post_title' => __( 'Sample Page' ),
     226                /* translators: Default page slug */
     227                'post_name' => __( 'sample-page' ),
     228                'post_modified' => $now,
     229                'post_modified_gmt' => $now_gmt,
     230                'guid' => $first_post_guid,
     231                'post_type' => 'page',
     232                'to_ping' => '',
     233                'pinged' => '',
     234                'post_content_filtered' => ''
     235        ));
    236236        $wpdb->insert( $wpdb->postmeta, array( 'post_id' => 2, 'meta_key' => '_wp_page_template', 'meta_value' => 'default' ) );
    237237
     
    393393 * @global int  $wp_db_version
    394394 * @global wpdb $wpdb
    395  *
    396  * @return null If no update is necessary or site isn't completely installed, null.
    397395 */
    398396function wp_upgrade() {
     
    446444 * @global int $wp_current_db_version
    447445 * @global int $wp_db_version
    448  *
    449  * @return null If no update is necessary, null.
    450446 */
    451447function upgrade_all() {
     
    17481744 * @param string $table Database table name.
    17491745 * @param string $index Index name to drop.
    1750  * @return bool True, when finished.
     1746 * @return true True, when finished.
    17511747 */
    17521748function drop_index($table, $index) {
     
    17711767 * @param string $table Database table name.
    17721768 * @param string $index Database table index column.
    1773  * @return bool True, when done with execution.
     1769 * @return true True, when done with execution.
    17741770 */
    17751771function add_clean_index($table, $index) {
     
    17901786 * @param string $column_name The column name to add to the table.
    17911787 * @param string $create_ddl  The SQL statement used to add the column.
    1792  * @return True if already exists or on successful completion, false on error.
     1788 * @return bool True if already exists or on successful completion, false on error.
    17931789 */
    17941790function maybe_add_column($table_name, $column_name, $create_ddl) {
     
    22792275                                // Don't copy anything.
    22802276                                continue;
    2281                                 }
     2277                        }
    22822278                }
    22832279
     
    23322328 * @param string $theme_name The name of the theme.
    23332329 * @param string $template   The directory name of the theme.
    2334  * @return null|false
     2330 * @return false|void
    23352331 */
    23362332function make_site_theme_from_default($theme_name, $template) {
  • trunk/src/wp-admin/includes/user.php

    r32653 r32654  
    1212 * @since 2.0.0
    1313 *
    14  * @return null|WP_Error|int Null when adding user, WP_Error or User ID integer when no parameters.
     14 * @return int|WP_Error WP_Error or User ID.
    1515 */
    1616function add_user() {
     
    2626 *
    2727 * @param int $user_id Optional. User ID.
    28  * @return int user id of the updated user
     28 * @return int|WP_Error user id of the updated user
    2929 */
    3030function edit_user( $user_id = 0 ) {
     
    411411/**
    412412 * @since 2.8.0
     413 *
     414 * @param int    $user_ID
     415 * @param object $old_data
    413416 */
    414417function default_password_nag_edit_user($user_ID, $old_data) {
  • trunk/src/wp-admin/includes/widgets.php

    r32650 r32654  
    5555 * @since 3.1.0
    5656 * @access private
     57 *
     58 * @return int
    5759 */
    5860function _sort_name_callback( $a, $b ) {
  • trunk/src/wp-admin/install-helper.php

    r32642 r32654  
    158158 *
    159159 * @param string $table_name Table name
    160  * @param string $col_name Column name
    161  * @param string $col_type Column type
    162  * @param bool $is_null Optional. Check is null.
    163  * @param mixed $key Optional. Key info.
    164  * @param mixed $default Optional. Default value.
    165  * @param mixed $extra Optional. Extra value.
     160 * @param string $col_name   Column name
     161 * @param string $col_type   Column type
     162 * @param bool   $is_null    Optional. Check is null.
     163 * @param mixed  $key        Optional. Key info.
     164 * @param mixed  $default    Optional. Default value.
     165 * @param mixed  $extra      Optional. Extra value.
    166166 * @return bool True, if matches. False, if not matching.
    167167 */
  • trunk/src/wp-admin/install.php

    r32642 r32654  
    5353 *
    5454 * @since 2.5.0
     55 *
     56 * @param string $body_classes
    5557 */
    5658function display_header( $body_classes = '' ) {
     
    8385 *
    8486 * @since 2.8.0
     87 *
     88 * @param string|null $error
    8589 */
    8690function display_setup_form( $error = null ) {
  • trunk/src/wp-admin/load-styles.php

    r28978 r32654  
    8282function wp_guess_url() {}
    8383
     84/**
     85 *
     86 * @param string $path
     87 * @return string
     88 */
    8489function get_file($path) {
    8590
  • trunk/src/wp-admin/menu.php

    r32643 r32654  
    171171
    172172// Add 'Editor' to the bottom of the Appearance menu.
    173 if ( ! is_multisite() )
     173if ( ! is_multisite() ) {
    174174        add_action('admin_menu', '_add_themes_utility_last', 101);
     175}
     176/**
     177 *
     178 */
    175179function _add_themes_utility_last() {
    176180        // Must use API on the admin_menu hook, direct modification is only possible on/before the _admin_menu hook
  • trunk/src/wp-admin/network.php

    r32642 r32654  
    158158 *
    159159 * @global bool $is_apache
     160 *
     161 * @param WP_Error $errors
    160162 */
    161163function network_step1( $errors = false ) {
     
    337339 *
    338340 * @global wpdb $wpdb
     341 *
     342 * @param WP_Error $errors
    339343 */
    340344function network_step2( $errors = false ) {
  • trunk/src/wp-admin/network/users.php

    r32333 r32654  
    1717        wp_die( __( 'You do not have permission to access this page.' ), 403 );
    1818
     19/**
     20 *
     21 * @param array $users
     22 */
    1923function confirm_delete_users( $users ) {
    2024        $current_user = wp_get_current_user();
  • trunk/src/wp-admin/plugins.php

    r32116 r32654  
    149149                        @ini_set('display_errors', true); //Ensure that Fatal errors are displayed.
    150150                        // Go back to "sandbox" scope so we get the same errors as before
     151                        /**
     152                         * @param string $plugin
     153                         */
    151154                        function plugin_sandbox_scrape( $plugin ) {
    152155                                wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin );
  • trunk/src/wp-admin/post.php

    r32642 r32654  
    6060                        }
    6161                } else {
    62                                 $message = 'draft' == $status ? 10 : 1;
     62                        $message = 'draft' == $status ? 10 : 1;
    6363                }
    6464
  • trunk/src/wp-admin/setup-config.php

    r32642 r32654  
    6565 * @since 2.3.0
    6666 *
    67  * @global string    $wp_version
    6867 * @global string    $wp_local_package
    6968 * @global WP_Locale $wp_locale
     69 *
     70 * @param string|array $body_classes
    7071 */
    7172function setup_config_display_header( $body_classes = array() ) {
    72         global $wp_version;
    7373        $body_classes = (array) $body_classes;
    7474        $body_classes[] = 'wp-core-ui';
  • trunk/src/wp-admin/update-core.php

    r32642 r32654  
    315315
    316316        $form_action = 'update-core.php?action=do-theme-upgrade';
    317 
    318317?>
    319318<h3><?php _e( 'Themes' ); ?></h3>
     
    382381 *
    383382 * @global WP_Filesystem_Base $wp_filesystem Subclass
     383 *
     384 * @param bool $reinstall
    384385 */
    385386function do_core_upgrade( $reinstall = false ) {
  • trunk/src/wp-admin/user-new.php

    r32116 r32654  
    1818
    1919if ( is_multisite() ) {
     20        /**
     21         *
     22         * @param string $text
     23         * @return string
     24         */
    2025        function admin_created_user_email( $text ) {
    2126                $roles = get_editable_roles();
  • trunk/src/wp-admin/widgets.php

    r32116 r32654  
    2222}
    2323
     24/**
     25 *
     26 * @param string $classes
     27 * @return string
     28 */
    2429function wp_widgets_access_body_class($classes) {
    2530        return "$classes widgets_access ";
Note: See TracChangeset for help on using the changeset viewer.