Make WordPress Core

Changeset 32672


Ignore:
Timestamp:
05/31/2015 03:17:50 AM (11 years ago)
Author:
wonderboymusic
Message:

Add doc blocks to functions that are missing them.
If the function has no need for @param or @return, do an archeaological dig to find @since.

See #32444.

Location:
trunk/src
Files:
17 edited

Legend:

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

    r32654 r32672  
    168168}
    169169
     170/**
     171 * @since 2.7.0
     172 */
    170173function enqueue_comment_hotkeys_js() {
    171174        if ( 'true' == get_user_option( 'comment_shortcuts' ) )
  • trunk/src/wp-admin/includes/dashboard.php

    r32655 r32672  
    356356}
    357357
     358/**
     359 * @since 3.1.0
     360 */
    358361function wp_network_dashboard_right_now() {
    359362        $actions = array();
     
    12481251}
    12491252
     1253/**
     1254 * @since 3.2.0
     1255 *
     1256 * @param array $classes
     1257 * @return array
     1258 */
    12501259function dashboard_browser_nag_class( $classes ) {
    12511260        $response = wp_check_browser_version();
  • trunk/src/wp-admin/includes/media.php

    r32653 r32672  
    15751575}
    15761576
     1577/**
     1578 * @since 3.5.0
     1579 *
     1580 * @param int   $attachment_id
     1581 * @param array $args
     1582 * @return array
     1583 */
    15771584function get_compat_media_markup( $attachment_id, $args = null ) {
    15781585        $post = get_post( $attachment_id );
  • trunk/src/wp-admin/includes/misc.php

    r32653 r32672  
    311311}
    312312
     313/**
     314 * @since 2.8.0
     315 *
     316 * @param string $content
     317 * @return array
     318 */
    313319function wp_doc_link_parse( $content ) {
    314320        if ( !is_string( $content ) || empty( $content ) )
     
    677683}
    678684
     685/**
     686 * @since 3.3.0
     687 */
    679688function _ipad_meta() {
    680689        if ( wp_is_mobile() ) {
  • trunk/src/wp-admin/includes/ms-deprecated.php

    r31679 r32672  
    6565}
    6666
     67/**
     68 * @deprecated 3.4.0
     69 * @see WP_Theme::get_allowed_on_network()
     70 */
    6771function get_site_allowed_themes() {
    6872        _deprecated_function( __FUNCTION__, '3.4', 'WP_Theme::get_allowed_on_network()' );
     
    7074}
    7175
     76/**
     77 * @deprecated 3.4.0
     78 * @see WP_Theme::get_allowed_on_site()
     79 */
    7280function wpmu_get_blog_allowedthemes( $blog_id = 0 ) {
    7381        _deprecated_function( __FUNCTION__, '3.4', 'WP_Theme::get_allowed_on_site()' );
     
    7583}
    7684
     85/**
     86 * @deprecated
     87 */
    7788function ms_deprecated_blogs_file() {}
  • trunk/src/wp-admin/includes/plugin-install.php

    r32655 r32672  
    131131}
    132132
     133/**
     134 * @since 2.7.0
     135 */
    133136function install_dashboard() {
    134137        ?>
  • trunk/src/wp-admin/includes/plugin.php

    r32653 r32672  
    16591659}
    16601660
     1661/**
     1662 * @since 2.3.0
     1663 *
     1664 * @param string $plugin_page
     1665 * @param string $parent_page
     1666 * @return string|null
     1667 */
    16611668function get_plugin_page_hook( $plugin_page, $parent_page ) {
    16621669        $hook = get_plugin_page_hookname( $plugin_page, $parent_page );
  • trunk/src/wp-admin/includes/theme-install.php

    r32654 r32672  
    136136}
    137137
     138/**
     139 * @since 2.8.0
     140 */
    138141function install_themes_upload() {
    139142?>
  • trunk/src/wp-admin/includes/update.php

    r32654 r32672  
    260260}
    261261
     262/**
     263 * @since 2.9.0
     264 *
     265 * @return array
     266 */
    262267function get_plugin_updates() {
    263268        $all_plugins = get_plugins();
     
    274279}
    275280
     281/**
     282 * @since 2.9.0
     283 */
    276284function wp_plugin_update_rows() {
    277285        if ( !current_user_can('update_plugins' ) )
     
    378386}
    379387
     388/**
     389 * @since 3.1.0
     390 */
    380391function wp_theme_update_rows() {
    381392        if ( !current_user_can('update_themes' ) )
  • trunk/src/wp-admin/update-core.php

    r32654 r32672  
    115115}
    116116
     117/**
     118 * @since 2.7.0
     119 */
    117120function dismissed_updates() {
    118121        $dismissed = get_core_updates( array( 'dismissed' => true, 'available' => false ) );
     
    306309}
    307310
     311/**
     312 * @since 2.9.0
     313 */
    308314function list_theme_updates() {
    309315        $themes = get_theme_updates();
     
    354360}
    355361
     362/**
     363 * @since 3.7.0
     364 */
    356365function list_translation_updates() {
    357366        $updates = wp_get_translation_updates();
     
    458467}
    459468
     469/**
     470 * @since 2.7.0
     471 */
    460472function do_dismiss_core_update() {
    461473        $version = isset( $_POST['version'] )? $_POST['version'] : false;
     
    469481}
    470482
     483/**
     484 * @since 2.7.0
     485 */
    471486function do_undismiss_core_update() {
    472487        $version = isset( $_POST['version'] )? $_POST['version'] : false;
  • trunk/src/wp-includes/compat.php

    r32650 r32672  
    196196
    197197if ( !function_exists('json_decode') ) {
     198        /**
     199         * @global Services_JSON $wp_json
     200         * @param string $string
     201         * @param bool   $assoc_array
     202         * @return object|array
     203         */
    198204        function json_decode( $string, $assoc_array = false ) {
    199205                global $wp_json;
     
    209215                return $res;
    210216        }
     217
     218        /**
     219         * @param object $data
     220         * @return array
     221         */
    211222        function _json_decode_object_helper($data) {
    212223                if ( is_object($data) )
  • trunk/src/wp-includes/locale.php

    r32608 r32672  
    192192        }
    193193
     194        /**
     195         * @since 3.8.0
     196         */
    194197        function rtl_src_admin_notice() {
    195198                echo '<div class="error"><p>' . 'The <code>build</code> directory of the develop repository must be used for RTL.' . '</p></div>';
  • trunk/src/wp-includes/pomo/entry.php

    r22349 r32672  
    6767        }
    6868
     69        /**
     70         * @param object $other
     71         */
    6972        function merge_with(&$other) {
    7073                $this->flags = array_unique( array_merge( $this->flags, $other->flags ) );
  • trunk/src/wp-includes/pomo/mo.php

    r30663 r32672  
    2828        }
    2929
     30        /**
     31         * @param string $filename
     32         * @return bool
     33         */
    3034        function export_to_file($filename) {
    3135                $fh = fopen($filename, 'wb');
     
    3640        }
    3741
     42        /**
     43         * @return string|false
     44         */
    3845        function export() {
    3946                $tmp_fh = fopen("php://temp", 'r+');
     
    4451        }
    4552
     53        /**
     54         * @param Translation_Entry $entry
     55         * @return bool
     56         */
    4657        function is_entry_good_for_export( $entry ) {
    4758                if ( empty( $entry->translations ) ) {
     
    5667        }
    5768
     69        /**
     70         * @param resource $fh
     71         * @return true
     72         */
    5873        function export_to_file_handle($fh) {
    5974                $entries = array_filter( $this->entries, array( $this, 'is_entry_good_for_export' ) );
     
    102117        }
    103118
     119        /**
     120         * @param Translation_Entry $entry
     121         * @return string
     122         */
    104123        function export_original($entry) {
    105124                //TODO: warnings for control characters
     
    110129        }
    111130
     131        /**
     132         * @param Translation_Entry $entry
     133         * @return string
     134         */
    112135        function export_translations($entry) {
    113136                //TODO: warnings for control characters
     
    115138        }
    116139
     140        /**
     141         * @return string
     142         */
    117143        function export_headers() {
    118144                $exported = '';
     
    123149        }
    124150
     151        /**
     152         * @param int $magic
     153         * @return string|false
     154         */
    125155        function get_byteorder($magic) {
    126156                // The magic is 0x950412de
     
    255285        }
    256286
     287        /**
     288         * @param int $count
     289         * @return string
     290         */
    257291        function select_plural_form($count) {
    258292                return $this->gettext_select_plural_form($count);
    259293        }
    260294
     295        /**
     296         * @return int
     297         */
    261298        function get_plural_forms_count() {
    262299                return $this->_nplurals;
  • trunk/src/wp-includes/pomo/streams.php

    r31829 r32672  
    102102        }
    103103
    104 
     104        /**
     105         * @return int
     106         */
    105107        function pos() {
    106108                return $this->_pos;
    107109        }
    108110
     111        /**
     112         * @return true
     113         */
    109114        function is_resource() {
    110115                return true;
    111116        }
    112117
     118        /**
     119         * @return true
     120         */
    113121        function close() {
    114122                return true;
     
    147155        }
    148156
     157        /**
     158         * @return bool
     159         */
    149160        function is_resource() {
    150161                return is_resource($this->_f);
    151162        }
    152163
     164        /**
     165         * @return bool
     166         */
    153167        function feof() {
    154168                return feof($this->_f);
    155169        }
    156170
     171        /**
     172         * @return bool
     173         */
    157174        function close() {
    158175                return fclose($this->_f);
    159176        }
    160177
     178        /**
     179         * @return string
     180         */
    161181        function read_all() {
    162182                $all = '';
     
    204224        }
    205225
     226        /**
     227         * @return int
     228         */
    206229        function length() {
    207230                return $this->strlen($this->_str);
    208231        }
    209232
     233        /**
     234         * @return string
     235         */
    210236        function read_all() {
    211237                return $this->substr($this->_str, $this->_pos, $this->strlen($this->_str));
  • trunk/src/wp-includes/pomo/translations.php

    r30663 r32672  
    112112        }
    113113
     114        /**
     115         * @return int
     116         */
    114117        function get_plural_forms_count() {
    115118                return 2;
     
    147150        }
    148151
     152        /**
     153         * @param object $other
     154         */
    149155        function merge_originals_with(&$other) {
    150156                foreach( $other->entries as $entry ) {
     
    279285        }
    280286
     287        /**
     288         *
     289         * @param string $header
     290         * @param string $value
     291         */
    281292        function set_header($header, $value) {
    282293        }
    283294
     295        /**
     296         *
     297         * @param array $headers
     298         */
    284299        function set_headers($headers) {
    285300        }
    286301
     302        /**
     303         * @param string $header
     304         * @return false
     305         */
    287306        function get_header($header) {
    288307                return false;
    289308        }
    290309
     310        /**
     311         * @param Translation_Entry $entry
     312         * @return false
     313         */
    291314        function translate_entry(&$entry) {
    292315                return false;
     
    301324        }
    302325
     326        /**
     327         *
     328         * @param int $count
     329         * @return bool
     330         */
    303331        function select_plural_form($count) {
    304332                return 1 == $count? 0 : 1;
    305333        }
    306334
     335        /**
     336         * @return int
     337         */
    307338        function get_plural_forms_count() {
    308339                return 2;
     
    319350        }
    320351
     352        /**
     353         * @param object $other
     354         */
    321355        function merge_with(&$other) {
    322356        }
  • trunk/src/wp-login.php

    r32116 r32672  
    242242}
    243243
     244/**
     245 * @since 3.0.0
     246 */
    244247function wp_shake_js() {
    245248        if ( wp_is_mobile() )
     
    256259}
    257260
     261/**
     262 * @since 3.7.0
     263 */
    258264function wp_login_viewport_meta() {
    259265        ?>
Note: See TracChangeset for help on using the changeset viewer.