Make WordPress Core

Changeset 30674


Ignore:
Timestamp:
11/30/2014 11:23:37 PM (9 years ago)
Author:
wonderboymusic
Message:

Improve various @param docs.

See #30224.

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

Legend:

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

    r30656 r30674  
    198198 * @param int|string $bytes    Number of bytes. Note max integer size for integers.
    199199 * @param int        $decimals Optional. Precision of number of decimal places. Default 0.
    200  * @return bool|string False on failure. Number string on success.
     200 * @return string|false False on failure. Number string on success.
    201201 */
    202202function size_format( $bytes, $decimals = 0 ) {
     
    642642 * @global string $previousday The day of the previous post in the loop.
    643643 *
    644  * @return int|bool 1|true when new day, 0|false if not a new day.
     644 * @return int 1 when new day, 0 if not a new day.
    645645 */
    646646function is_new_day() {
     
    843843 *
    844844 * @param string $uri URI/URL of web page to retrieve.
    845  * @return bool|string HTTP content. False on failure.
     845 * @return false|string HTTP content. False on failure.
    846846 */
    847847function wp_remote_fopen( $uri ) {
     
    13281328 * @since 2.0.4
    13291329 *
    1330  * @param string $actionurl URL to add nonce action.
    1331  * @param string $action    Optional. Nonce action name. Default -1.
    1332  * @param string $name      Optional. Nonce name. Default '_wpnonce'.
     1330 * @param string     $actionurl URL to add nonce action.
     1331 * @param int|string $action    Optional. Nonce action name. Default -1.
     1332 * @param string     $name      Optional. Nonce name. Default '_wpnonce'.
    13331333 * @return string Escaped URL with nonce action added.
    13341334 */
     
    13581358 * @since 2.0.4
    13591359 *
    1360  * @param string $action  Optional. Action name. Default -1.
    1361  * @param string $name    Optional. Nonce name. Default '_wpnonce'.
    1362  * @param bool   $referer Optional. Whether to set the referer field for validation. Default true.
    1363  * @param bool   $echo    Optional. Whether to display or return hidden form field. Default true.
     1360 * @param int|string $action  Optional. Action name. Default -1.
     1361 * @param string     $name    Optional. Nonce name. Default '_wpnonce'.
     1362 * @param bool       $referer Optional. Whether to set the referer field for validation. Default true.
     1363 * @param bool       $echo    Optional. Whether to display or return hidden form field. Default true.
    13641364 * @return string Nonce field HTML markup.
    13651365 */
     
    14271427 * @since 2.0.4
    14281428 *
    1429  * @return string|bool False on failure. Referer URL on success.
     1429 * @return false|string False on failure. Referer URL on success.
    14301430 */
    14311431function wp_get_referer() {
     
    14481448 * @since 2.0.4
    14491449 *
    1450  * @return string|bool False if no original referer or original referer if set.
     1450 * @return string|false False if no original referer or original referer if set.
    14511451 */
    14521452function wp_get_original_referer() {
     
    19191919 * @since 2.0.0
    19201920 *
    1921  * @param string $name       Filename.
    1922  * @param null   $deprecated Never used. Set to null.
    1923  * @param mixed  $bits       File content
    1924  * @param string $time       Optional. Time formatted in 'yyyy/mm'. Default null.
     1921 * @param string       $name       Filename.
     1922 * @param null|string  $deprecated Never used. Set to null.
     1923 * @param mixed        $bits       File content
     1924 * @param string       $time       Optional. Time formatted in 'yyyy/mm'. Default null.
    19251925 * @return array
    19261926 */
  • trunk/src/wp-includes/functions.wp-scripts.php

    r30541 r30674  
    2222 * @since 2.6.0
    2323 *
    24  * @param array|bool $handles Optional. Scripts to be printed. Default 'false'.
     24 * @param string|bool|array $handles Optional. Scripts to be printed. Default 'false'.
    2525 * @return array On success, a processed array of WP_Dependencies items; otherwise, an empty array.
    2626 */
  • trunk/src/wp-includes/functions.wp-styles.php

    r29840 r30674  
    2020 * @since 2.6.0
    2121 *
    22  * @param array|bool $handles Styles to be printed. Default 'false'.
     22 * @param string|bool|array $handles Styles to be printed. Default 'false'.
    2323 * @return array On success, a processed array of WP_Dependencies items; otherwise, an empty array.
    2424 */
     
    237237 * @param string $key    Name of data point for which we're storing a value.
    238238 *                       Accepts 'conditional', 'rtl' and 'suffix', 'alt' and 'title'.
    239  * @param mixed  $data   String containing the CSS data to be added.
     239 * @param mixed  $value  String containing the CSS data to be added.
    240240 * @return bool True on success, false on failure.
    241241 */
  • trunk/src/wp-includes/general-template.php

    r30656 r30674  
    18591859 * @param  string      $d    Optional. PHP date format defaults to the date_format option if not specified.
    18601860 * @param  int|WP_Post $post Optional. Post ID or WP_Post object. Default current post.
    1861  * @return string|bool Date the current post was written. False on failure.
     1861 * @return false|string Date the current post was written. False on failure.
    18621862 */
    18631863function get_the_date( $d = '', $post = null ) {
     
    19771977 *                          to the value specified in the time_format option. Default empty.
    19781978 * @param int|WP_Post $post WP_Post object or ID. Default is global $post object.
    1979  * @return string|int|bool Formatted date string or Unix timestamp. False on failure.
     1979 * @return false|string Formatted date string or Unix timestamp. False on failure.
    19801980 */
    19811981function get_the_time( $d = '', $post = null ) {
     
    20152015 * @param int|WP_Post $post      WP_Post object or ID. Default is global $post object.
    20162016 * @param bool        $translate Whether to translate the time string. Default false.
    2017  * @return string|int|bool Formatted date string or Unix timestamp. False on failure.
     2017 * @return false|string Formatted date string or Unix timestamp. False on failure.
    20182018 */
    20192019function get_post_time( $d = 'U', $gmt = false, $post = null, $translate = false ) {
     
    21022102 * @param int|WP_Post $post      WP_Post object or ID. Default is global $post object.
    21032103 * @param bool        $translate Whether to translate the time string. Default false.
    2104  * @return string|int|bool Formatted date string or Unix timestamp. False on failure.
     2104 * @return false|string Formatted date string or Unix timestamp. False on failure.
    21052105 */
    21062106function get_post_modified_time( $d = 'U', $gmt = false, $post = null, $translate = false ) {
  • trunk/src/wp-includes/http.php

    r30443 r30674  
    382382 * @since 3.4.0
    383383 *
    384  * @param string Origin URL. If not provided, the value of get_http_origin() is used.
    385  * @return bool True if the origin is allowed. False otherwise.
     384 * @param null|string $origin Origin URL. If not provided, the value of get_http_origin() is used.
     385 * @return bool|null True if the origin is allowed. False otherwise.
    386386 */
    387387function is_allowed_http_origin( $origin = null ) {
     
    442442 * @since 3.5.2
    443443 *
    444  * @return mixed URL or false on failure.
     444 * @param string $url
     445 * @return false|string URL or false on failure.
    445446 */
    446447function wp_http_validate_url( $url ) {
  • trunk/src/wp-includes/l10n.php

    r30542 r30674  
    390390 *
    391391 * @since 2.8.0
     392 * @param string $singular
     393 * @param string $plural
     394 * @param string $context
     395 * @param string|null $domain
     396 * @return array
    392397 */
    393398function _nx_noop( $singular, $plural, $context, $domain = null ) {
     
    701706 *
    702707 * @param string $domain Text domain. Unique identifier for retrieving translated strings.
    703  * @return Translations A Translations instance.
     708 * @return NOOP_Translations A Translations instance.
    704709 */
    705710function get_translations_for_domain( $domain ) {
  • trunk/src/wp-includes/media.php

    r30660 r30674  
    20382038 * @param int $width Image width
    20392039 * @param int $height Image height
    2040  * @return image resource
     2040 * @return resource resource
    20412041 */
    20422042function wp_imagecreatetruecolor($width, $height) {
     
    20542054 * @since 2.9.0
    20552055 * @see WP_Embed::register_handler()
     2056 *
     2057 * @global WP_Embed $wp_embed
     2058 * @param string   $id
     2059 * @param string   $regex
     2060 * @param callable $callback
     2061 * @param int      $priority
    20562062 */
    20572063function wp_embed_register_handler( $id, $regex, $callback, $priority = 10 ) {
     
    20652071 * @since 2.9.0
    20662072 * @see WP_Embed::unregister_handler()
     2073 *
     2074 * @global WP_Embed $wp_embed
     2075 * @param string $id
     2076 * @param int    $priority
    20672077 */
    20682078function wp_embed_unregister_handler( $id, $priority = 10 ) {
     
    21362146 * @param string $url The URL that should be embedded.
    21372147 * @param array $args Additional arguments and parameters.
    2138  * @return bool|string False on failure or the embed HTML on success.
     2148 * @return false|string False on failure or the embed HTML on success.
    21392149 */
    21402150function wp_oembed_get( $url, $args = '' ) {
  • trunk/src/wp-includes/meta.php

    r30655 r30674  
    15401540 * @since 3.1.3
    15411541 *
    1542  * @param string $meta_key Meta key
     1542 * @param string      $meta_key Meta key
     1543 * @param string|null $meta_type
    15431544 * @return bool True if the key is protected, false otherwise.
    15441545 */
     
    15961597 * @param string|array $sanitize_callback A function or method to call when sanitizing the value of $meta_key.
    15971598 * @param string|array $auth_callback Optional. A function or method to call when performing edit_post_meta, add_post_meta, and delete_post_meta capability checks.
    1598  * @param array $args Arguments
    15991599 */
    16001600function register_meta( $meta_type, $meta_key, $sanitize_callback, $auth_callback = null ) {
  • trunk/src/wp-includes/ms-functions.php

    r30577 r30674  
    20252025 * @param int $old_value
    20262026 * @param int $value The new public value
    2027  * @return bool
    20282027 */
    20292028function update_blog_public( $old_value, $value ) {
Note: See TracChangeset for help on using the changeset viewer.