From d65e49c9f32ea3e6a1bf77a388c11eb641de8c25 Mon Sep 17 00:00:00 2001 From: markjaquith Date: Mon, 9 Jul 2012 05:03:53 +0000 Subject: [PATCH] Bunch of PHPDoc corrections and cleanups. props c3mdigital. props SergeyBiryukov. fixes #21149 git-svn-id: http://core.svn.wordpress.org/trunk@21241 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/bookmark-template.php | 3 +-- wp-includes/class-http.php | 2 +- wp-includes/formatting.php | 19 +++++++++---------- wp-includes/general-template.php | 2 +- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/wp-includes/bookmark-template.php b/wp-includes/bookmark-template.php index 2dc5b7b2e3..f42103e45f 100644 --- a/wp-includes/bookmark-template.php +++ b/wp-includes/bookmark-template.php @@ -42,7 +42,6 @@ * * @since 2.1.0 * @access private - * @usedby wp_list_bookmarks() * * @param array $bookmarks List of bookmarks to traverse * @param string|array $args Optional. Overwrite the defaults. @@ -189,7 +188,7 @@ function _walk_bookmarks($bookmarks, $args = '' ) { * @link http://codex.wordpress.org/Template_Tags/wp_list_bookmarks * * @since 2.1.0 - * @uses _list_bookmarks() Used to iterate over all of the bookmarks and return + * @uses _walk_bookmarks() Used to iterate over all of the bookmarks and return * the html * @uses get_terms() Gets all of the categories that are for links. * diff --git a/wp-includes/class-http.php b/wp-includes/class-http.php index 5efbf4cdcb..78706383b9 100644 --- a/wp-includes/class-http.php +++ b/wp-includes/class-http.php @@ -200,7 +200,7 @@ class WP_Http { * @param array $args Request arguments * @param string $url URL to Request * - * @return string|false Class name for the first transport that claims to support the request. False if no transport claims to support the request. + * @return string|bool Class name for the first transport that claims to support the request. False if no transport claims to support the request. */ public function _get_first_available_transport( $args, $url = null ) { $request_order = array( 'curl', 'streams', 'fsockopen' ); diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index f69c9382b5..6bd0a5082d 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -100,7 +100,7 @@ function wptexturize($text) { } // Transform into regexp sub-expression used in _wptexturize_pushpop_element - // Must do this everytime in case plugins use these filters in a context sensitive manner + // Must do this every time in case plugins use these filters in a context sensitive manner $no_texturize_tags = '(' . implode('|', apply_filters('no_texturize_tags', $default_no_texturize_tags) ) . ')'; $no_texturize_shortcodes = '(' . implode('|', apply_filters('no_texturize_shortcodes', $default_no_texturize_shortcodes) ) . ')'; @@ -141,8 +141,7 @@ function wptexturize($text) { * @param array $stack Array used as stack of opened tag elements * @param string $disabled_elements Tags to match against formatted as regexp sub-expression * @param string $opening Tag opening character, assumed to be 1 character long - * @param string $opening Tag closing character - * @return object + * @param string $closing Tag closing character */ function _wptexturize_pushpop_element($text, &$stack, $disabled_elements, $opening = '<', $closing = '>') { // Check if it is a closing tag -- otherwise assume opening tag @@ -264,7 +263,7 @@ function wpautop($pee, $br = true) { * @since 3.1.0 * @access private * @param array $matches preg_replace_callback matches array - * @returns string + * @return string */ function _autop_newline_preservation_helper( $matches ) { return str_replace("\n", "", $matches[0]); @@ -1009,7 +1008,7 @@ function sanitize_title_with_dashes($title, $raw_title = '', $context = 'display * @since 2.5.1 * * @param string $orderby Order by string to be checked. - * @return string|false Returns the order by clause if it is a match, false otherwise. + * @return string|bool Returns the order by clause if it is a match, false otherwise. */ function sanitize_sql_orderby( $orderby ){ preg_match('/^\s*([a-z0-9_]+(\s+(ASC|DESC))?(\s*,\s*|\s*$))+|^\s*RAND\(\s*\)\s*$/i', $orderby, $obmatches); @@ -1623,8 +1622,8 @@ function make_clickable( $text ) { * @since 3.4.0 * @access private * - * @param string $string The string to split - * @param int $goal The desired chunk length. + * @param string $string The string to split. + * @param int $goal The desired chunk length. * @return array Numeric array of chunks. */ function _split_str_by_whitespace( $string, $goal ) { @@ -1822,7 +1821,6 @@ function is_email( $email, $deprecated = false ) { * Convert to ASCII from email subjects. * * @since 1.2.0 - * @usedby wp_mail() handles charsets in email subjects * * @param string $string Subject line * @return string Converted string to ASCII @@ -1839,11 +1837,12 @@ function wp_iso_descrambler($string) { } /** - * Helper function to convert hex encoded chars to ascii + * Helper function to convert hex encoded chars to ASCII * * @since 3.1.0 * @access private - * @param array $match the preg_replace_callback matches array + * @param array $match The preg_replace_callback matches array + * @return array Converted chars */ function _wp_iso_convert( $match ) { return chr( hexdec( strtolower( $match[1] ) ) ); diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 666e0b70f6..a5af2f24ad 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -1050,7 +1050,6 @@ function wp_get_archives($args = '') { * Get number of days since the start of the week. * * @since 1.5.0 - * @usedby get_calendar() * * @param int $num Number of day. * @return int Days since the start of the week. @@ -1067,6 +1066,7 @@ function calendar_week_mod($num) { * no posts for the month, then it will not be displayed. * * @since 1.0.0 + * @uses calendar_week_mod() * * @param bool $initial Optional, default is true. Use initial calendar names. * @param bool $echo Optional, default is true. Set to false for return.