Make WordPress Core


Ignore:
Timestamp:
12/06/2014 09:23:52 PM (10 years ago)
Author:
DrewAPicture
Message:

Convert various uses of (optional) in core parameter descriptions to use the style prescribed in the inline documentation standards for PHP.

The style for marking parameters optional in inline PHP docs is: @param type $var Optional. Description. Accepts. Default., where Accepts can be omitted on a case-by-case basis.

Props coffee2code.
Fixes #30591.

File:
1 edited

Legend:

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

    r30656 r30753  
    25882588 *
    25892589 * Returns the 'home' option with the appropriate protocol, 'https' if
    2590  * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is
    2591  * overridden.
     2590 * {@see is_ssl()} and 'http' otherwise. If `$scheme` is 'http' or 'https',
     2591 * `is_ssl()` is overridden.
    25922592 *
    25932593 * @since 3.0.0
    25942594 *
    2595  * @param  string $path   (optional) Path relative to the home url.
    2596  * @param  string $scheme (optional) Scheme to give the home url context. Currently 'http', 'https', or 'relative'.
     2595 * @param  string $path   Optional. Path relative to the home url. Default empty.
     2596 * @param  string $scheme Optional. Scheme to give the home url context. Accepts
     2597 *                        'http', 'https', or 'relative'. Default null.
    25972598 * @return string Home url link with optional path appended.
    25982599*/
     
    26052606 *
    26062607 * Returns the 'home' option with the appropriate protocol, 'https' if
    2607  * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is
     2608 * {@see is_ssl()} and 'http' otherwise. If `$scheme` is 'http' or 'https',
     2609 * `is_ssl()` is
    26082610 * overridden.
    26092611 *
    26102612 * @since 3.0.0
    26112613 *
    2612  * @param  int $blog_id   (optional) Blog ID. Defaults to current blog.
    2613  * @param  string $path   (optional) Path relative to the home url.
    2614  * @param  string $scheme (optional) Scheme to give the home url context. Currently 'http', 'https', or 'relative'.
    2615  * @return string Home url link with optional path appended.
     2614 * @param  int         $blog_id     Optional. Blog ID. Default null (current blog).
     2615 * @param  string      $path        Optional. Path relative to the home URL. Default empty.
     2616 * @param  string|null $orig_scheme Optional. Scheme to give the home URL context. Accepts
     2617 *                                  'http', 'https', 'relative', or null. Default null.
     2618 * @return string Home URL link with optional path appended.
    26162619*/
    26172620function get_home_url( $blog_id = null, $path = '', $scheme = null ) {
     
    26722675 *
    26732676 * Returns the 'site_url' option with the appropriate protocol, 'https' if
    2674  * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is
    2675  * overridden.
     2677 * {@see is_ssl()} and 'http' otherwise. If `$scheme` is 'http' or 'https',
     2678 * `is_ssl()` is overridden.
    26762679 *
    26772680 * @since 3.0.0
    26782681 *
    2679  * @param int $blog_id (optional) Blog ID. Defaults to current blog.
    2680  * @param string $path Optional. Path relative to the site url.
    2681  * @param string $scheme Optional. Scheme to give the site url context. Currently 'http', 'https', 'login', 'login_post', 'admin', or 'relative'.
     2682 * @param int    $blog_id Optional. Blog ID. Default null (current site).
     2683 * @param string $path    Optional. Path relative to the site url. Default empty.
     2684 * @param string $scheme  Optional. Scheme to give the site url context. Accepts
     2685 *                        'http', 'https', 'login', 'login_post', 'admin', or
     2686 *                        'relative'. Default null.
    26822687 * @return string Site url link with optional path appended.
    26832688*/
     
    27242729
    27252730/**
    2726  * Retrieve the url to the admin area for a given site.
     2731 * Retrieves the url to the admin area for a given site.
    27272732 *
    27282733 * @since 3.0.0
    27292734 *
    2730  * @param int $blog_id (optional) Blog ID. Defaults to current blog.
    2731  * @param string $path Optional path relative to the admin url.
    2732  * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.
     2735 * @param int    $blog_id Optional. Blog ID. Default null (current site).
     2736 * @param string $path    Optional. Path relative to the admin url. Default empty.
     2737 * @param string $scheme  Optional. The scheme to use. Accepts 'http' or 'https',
     2738 *                        to force those schemes. Default 'admin', which obeys
     2739 *                        {@see force_ssl_admin()} and {@see is_ssl()}.
    27332740 * @return string Admin url link with optional path appended.
    27342741*/
     
    28972904
    28982905/**
    2899  * Retrieve the home url for the current network.
    2900  *
    2901  * Returns the home url with the appropriate protocol, 'https' if
    2902  * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is
     2906 * Retrieves the home url for the current network.
     2907 *
     2908 * Returns the home url with the appropriate protocol, 'https' {@see is_ssl()}
     2909 * and 'http' otherwise. If `$scheme` is 'http' or 'https', `is_ssl()` is
    29032910 * overridden.
    29042911 *
    29052912 * @since 3.0.0
    29062913 *
    2907  * @param  string $path   (optional) Path relative to the home url.
    2908  * @param  string $scheme (optional) Scheme to give the home url context. Currently 'http', 'https', or 'relative'.
     2914 * @param  string $path   Optional. Path relative to the home url. Default empty.
     2915 * @param  string $scheme Optional. Scheme to give the home url context. Accepts
     2916 *                        'http', 'https', or 'relative'. Default null.
    29092917 * @return string Home url link with optional path appended.
    29102918*/
Note: See TracChangeset for help on using the changeset viewer.