Make WordPress Core

Changeset 32655


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

Add (more) missing doc blocks to wp-admin/includes/*.

See #32444.

Location:
trunk/src/wp-admin/includes
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-upgrader-skins.php

    r31506 r32655  
    2323        public $options = array();
    2424
     25        /**
     26         *
     27         * @param array $args
     28         */
    2529        public function __construct($args = array()) {
    2630                $defaults = array( 'url' => '', 'nonce' => '', 'title' => '', 'context' => false );
     
    4448        }
    4549
     50        /**
     51         *
     52         * @param bool   $error
     53         * @param string $context
     54         * @param bool   $allow_relaxed_file_ownership
     55         * @return type
     56         */
    4657        public function request_filesystem_credentials( $error = false, $context = false, $allow_relaxed_file_ownership = false ) {
    4758                $url = $this->options['url'];
     
    7485        }
    7586
     87        /**
     88         *
     89         * @param string|WP_Error $errors
     90         */
    7691        public function error($errors) {
    7792                if ( ! $this->done_header )
     
    89104        }
    90105
     106        /**
     107         *
     108         * @param string $string
     109         */
    91110        public function feedback($string) {
    92111                if ( isset( $this->upgrader->strings[$string] ) )
     
    155174        public $plugin_network_active = false;
    156175
    157         public function __construct($args = array()) {
     176        /**
     177         *
     178         * @param array $args
     179         */
     180        public function __construct( $args = array() ) {
    158181                $defaults = array( 'url' => '', 'plugin' => '', 'nonce' => '', 'title' => __('Update Plugin') );
    159182                $args = wp_parse_args($args, $defaults);
     
    211234        public $error = false;
    212235
     236        /**
     237         *
     238         * @param array $args
     239         */
    213240        public function __construct($args = array()) {
    214241                $defaults = array( 'url' => '', 'nonce' => '' );
     
    257284                // Nothing, This will be displayed within a iframe.
    258285        }
     286
     287        /**
     288         *
     289         * @param string|WP_Error $error
     290         */
    259291        public function error($error) {
    260292                if ( is_string($error) && isset( $this->upgrader->strings[$error] ) )
     
    282314        }
    283315
     316        /**
     317         *
     318         * @param string $title
     319         */
    284320        public function before($title = '') {
    285321                $this->in_loop = true;
     
    290326        }
    291327
     328        /**
     329         *
     330         * @param string $title
     331         */
    292332        public function after($title = '') {
    293333                echo '</p></div>';
     
    329369        }
    330370
     371        /**
     372         *
     373         * @param string $title
     374         */
    331375        public function before($title = '') {
    332376                parent::before($this->plugin_info['Title']);
    333377        }
    334378
     379        /**
     380         *
     381         * @param string $title
     382         */
    335383        public function after($title = '') {
    336384                parent::after($this->plugin_info['Title']);
     
    369417        }
    370418
     419        /**
     420         *
     421         * @param string $title
     422         */
    371423        public function before($title = '') {
    372424                parent::before( $this->theme_info->display('Name') );
    373425        }
    374426
     427        /**
     428         *
     429         * @param string $title
     430         */
    375431        public function after($title = '') {
    376432                parent::after( $this->theme_info->display('Name') );
     
    413469        public $type;
    414470
     471        /**
     472         *
     473         * @param array $args
     474         */
    415475        public function __construct($args = array()) {
    416476                $defaults = array( 'type' => 'web', 'url' => '', 'plugin' => '', 'nonce' => '', 'title' => '' );
     
    489549        public $type;
    490550
     551        /**
     552         *
     553         * @param array $args
     554         */
    491555        public function __construct($args = array()) {
    492556                $defaults = array( 'type' => 'web', 'url' => '', 'theme' => '', 'nonce' => '', 'title' => '' );
     
    573637        public $theme = '';
    574638
     639        /**
     640         *
     641         * @param array $args
     642         */
    575643        public function __construct($args = array()) {
    576644                $defaults = array( 'url' => '', 'theme' => '', 'nonce' => '', 'title' => __('Update Theme') );
     
    650718        public $display_footer_actions = true;
    651719
     720        /**
     721         *
     722         * @param array $args
     723         */
    652724        public function __construct( $args = array() ) {
    653725                $defaults = array( 'url' => '', 'nonce' => '', 'title' => __( 'Update Translations' ), 'skip_header_footer' => false );
     
    669741        }
    670742
     743        /**
     744         *
     745         * @param string|WP_Error $error
     746         */
    671747        public function error( $error ) {
    672748                echo '<div class="lp-error">';
     
    711787        protected $messages = array();
    712788
     789        /**
     790         *
     791         * @param bool   $error
     792         * @param string $context
     793         * @param bool   $allow_relaxed_file_ownership
     794         * @return bool
     795         */
    713796        public function request_filesystem_credentials( $error = false, $context = '', $allow_relaxed_file_ownership = false ) {
    714797                if ( $context ) {
  • trunk/src/wp-admin/includes/class-wp-upgrader.php

    r32653 r32655  
    10641064         *
    10651065         * @global WP_Filesystem_Base $wp_filesystem Subclass
     1066     *
     1067         * @param bool|WP_Error $removed
     1068         * @param string        $local_destination
     1069         * @param string        $remote_destination
     1070         * @param array         $plugin
     1071         * @return WP_Error|bool
    10661072         */
    10671073        public function delete_old_plugin($removed, $local_destination, $remote_destination, $plugin) {
     
    11671173         *
    11681174         * @since 3.4.0
     1175         *
     1176         * @param bool  $install_result
     1177         * @param array $hook_extra
     1178         * @param array $child_result
     1179         * @return type
    11691180         */
    11701181        public function check_parent_theme_filter( $install_result, $hook_extra, $child_result ) {
     
    12371248         *
    12381249         * @param array $actions Preview actions.
     1250         * @return array
    12391251         */
    12401252        public function hide_activate_preview_actions( $actions ) {
     
    15251537         *
    15261538         * @since 2.8.0
     1539         *
     1540         * @param bool|WP_Error  $return
     1541         * @param array          $theme
     1542         * @return bool|WP_Error
    15271543         */
    15281544        public function current_before($return, $theme) {
    1529 
    15301545                if ( is_wp_error($return) )
    15311546                        return $return;
     
    15491564         *
    15501565         * @since 2.8.0
     1566         *
     1567         * @param bool|WP_Error  $return
     1568         * @param array          $theme
     1569         * @return bool|WP_Error
    15511570         */
    15521571        public function current_after($return, $theme) {
     
    15811600         *
    15821601         * @global WP_Filesystem_Base $wp_filesystem Subclass
     1602         *
     1603         * @param bool   $removed
     1604         * @param string $local_destination
     1605         * @param string $remote_destination
     1606         * @param array  $theme
     1607         * @return bool
    15831608         */
    15841609        public function delete_old_theme( $removed, $local_destination, $remote_destination, $theme ) {
     
    16591684         *
    16601685         * @static
     1686         *
     1687         * @param false|WP_Upgrader $upgrader
    16611688         */
    16621689        public static function async_upgrade( $upgrader = false ) {
     
    18811908         *
    18821909         * @global WP_Filesystem_Base $wp_filesystem Subclass
     1910         *
     1911         * @param string|WP_Error $source
     1912         * @param string          $remote_source
    18831913         */
    18841914        public function check_package( $source, $remote_source ) {
     
    19121942         * @since 3.7.0
    19131943         *
    1914          * @param object The data for an update.
     1944         * @param object $update The data for an update.
    19151945         * @return string The name of the item being updated.
    19161946         */
     
    26212651         * @param string $type The type of update being checked: 'core', 'theme', 'plugin', 'translation'.
    26222652         * @param object $item The update offer.
     2653         *
     2654         * @return null|WP_Error
    26232655         */
    26242656        public function update( $type, $item ) {
     
    28592891         * @global string $wp_version
    28602892         *
    2861          * @param object $update_result The result of the core update. Includes the update offer and result.
     2893         * @param object|WP_Error $update_result The result of the core update. Includes the update offer and result.
    28622894         */
    28632895        protected function after_core_update( $update_result ) {
  • trunk/src/wp-admin/includes/dashboard.php

    r32653 r32655  
    169169}
    170170
     171/**
     172 *
     173 * @param type $dashboard
     174 * @param type $meta_box
     175 */
    171176function _wp_dashboard_control_callback( $dashboard, $meta_box ) {
    172177        echo '<form method="post" class="dashboard-widget-control-form">';
     
    496501 *
    497502 * @since 2.7.0
     503 *
     504 * @param array $drafts
    498505 */
    499506function wp_dashboard_recent_drafts( $drafts = false ) {
  • trunk/src/wp-admin/includes/export.php

    r32642 r32655  
    316316        }
    317317
     318        /**
     319         *
     320         * @param bool   $return_me
     321         * @param string $meta_key
     322         * @return boolean
     323         */
    318324        function wxr_filter_postmeta( $return_me, $meta_key ) {
    319325                if ( '_edit_lock' == $meta_key )
  • trunk/src/wp-admin/includes/import.php

    r32642 r32655  
    4646 * @global array $wp_importers
    4747 *
    48  * @param string $id Importer tag. Used to uniquely identify importer.
    49  * @param string $name Importer name and title.
    50  * @param string $description Importer description.
    51  * @param callback $callback Callback to run.
     48 * @param string   $id          Importer tag. Used to uniquely identify importer.
     49 * @param string   $name        Importer name and title.
     50 * @param string   $description Importer description.
     51 * @param callback $callback    Callback to run.
    5252 * @return WP_Error Returns WP_Error when $callback is WP_Error.
    5353 */
  • trunk/src/wp-admin/includes/menu.php

    r32642 r32655  
    195195unset($id, $data);
    196196
     197/**
     198 *
     199 * @param string $add
     200 * @param string $class
     201 * @return string
     202 */
    197203function add_cssclass($add, $class) {
    198204        $class = empty($class) ? $add : $class .= ' ' . $add;
     
    200206}
    201207
     208/**
     209 *
     210 * @param array $menu
     211 * @return array
     212 */
    202213function add_menu_classes($menu) {
    203 
    204214        $first = $lastorder = false;
    205215        $i = 0;
  • trunk/src/wp-admin/includes/nav-menu.php

    r32653 r32655  
    238238 */
    239239class Walker_Nav_Menu_Checklist extends Walker_Nav_Menu {
     240        /**
     241         *
     242         * @param array $fields
     243         */
    240244        public function __construct( $fields = false ) {
    241245                if ( $fields ) {
  • trunk/src/wp-admin/includes/plugin-install.php

    r32653 r32655  
    164164 *
    165165 * @since 2.7.0
     166 *
     167 * @param bool $type_selector
    166168 */
    167169function install_search_form( $type_selector = true ) {
     
    262264 *
    263265 * @since 3.0.0
     266 *
     267 * @param array|object $api
     268 * @param bool        $loop
     269 * @return type
    264270 */
    265271function install_plugin_install_status($api, $loop = false) {
  • trunk/src/wp-admin/includes/screen.php

    r32650 r32655  
    186186 *
    187187 * @param mixed $hook_name Optional. The hook name (also known as the hook suffix) used to determine the screen,
    188  *      or an existing screen object.
     188 *                             or an existing screen object.
    189189 */
    190190function set_current_screen( $hook_name = '' ) {
     
    388388         *
    389389         * @param string|WP_Screen $hook_name Optional. The hook name (also known as the hook suffix) used to determine the screen.
    390          *      Defaults to the current $hook_suffix global.
     390         *                                        Defaults to the current $hook_suffix global.
    391391         * @return WP_Screen Screen object.
    392392         */
    393393        public static function get( $hook_name = '' ) {
    394 
    395394                if ( $hook_name instanceof WP_Screen ) {
    396395                        return $hook_name;
     
    583582         *
    584583         * @param string $admin The admin to check against (network | user | site).
    585          * If empty any of the three admins will result in true.
    586          * @return boolean True if the screen is in the indicated admin, false otherwise.
    587          *
     584         *                      If empty any of the three admins will result in true.
     585         * @return bool True if the screen is in the indicated admin, false otherwise.
    588586         */
    589587        public function in_admin( $admin = null ) {
Note: See TracChangeset for help on using the changeset viewer.