Make WordPress Core


Ignore:
Timestamp:
04/07/2014 08:58:11 PM (12 years ago)
Author:
DrewAPicture
Message:

Inline documentation improvements in wp-includes/ms-load.php for 3.9 functionality.

Clarifies some mixed type parameters, spacing and comment style, and language fixes.

See #27700.

File:
1 edited

Legend:

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

    r27439 r28006  
    118118 * @since 3.9.0
    119119 *
    120  * @param string $domain   Domain to check.
    121  * @param string $path     Path to check.
    122  * @param int    $segments Path segments to use. Defaults to null, or the full path.
     120 * @param string   $domain   Domain to check.
     121 * @param string   $path     Path to check.
     122 * @param int|null $segments Path segments to use. Defaults to null, or the full path.
    123123 * @return object|bool Network object if successful. False when no network is found.
    124124 */
     
    129129        $pieces = explode( '.', $domain );
    130130
    131         // It's possible one domain to search is 'com', but it might as well
    132         // be 'localhost' or some other locally mapped domain.
     131        /*
     132         * It's possible one domain to search is 'com', but it might as well
     133         * be 'localhost' or some other locally mapped domain.
     134         */
    133135        while ( array_shift( $pieces ) ) {
    134136                if ( $pieces ) {
     
    164166                 * @since 3.9.0
    165167                 *
    166                  * @param mixed $segments The number of path segments to consider. WordPress by default looks at
    167                  *                         one path segment. The function default of null only makes sense when you
    168                  *                         know the requested path should match a network.
    169                  * @param string $domain   The requested domain.
    170                  * @param string $path     The requested path, in full.
     168                 * @param int|null $segments The number of path segments to consider. WordPress by default looks at
     169                 *                           one path segment. The function default of null only makes sense when you
     170                 *                           know the requested path should match a network.
     171                 * @param string   $domain   The requested domain.
     172                 * @param string   $path     The requested path, in full.
    171173                 */
    172174                $segments = apply_filters( 'network_by_path_segments_count', $segments, $domain, $path );
     
    196198         * @since 3.9.0
    197199         *
    198          * @param string $domain   The requested domain.
    199          * @param string $path     The requested path, in full.
    200          * @param mixed  $segments The suggested number of paths to consult.
    201          *                         Default null, meaning the entire path was to be consulted.
    202          * @param array  $paths    The paths to search for, based on $path and $segments.
     200         * @param null|bool|object $network  Network value to return by path.
     201         * @param string           $domain   The requested domain.
     202         * @param string           $path     The requested path, in full.
     203         * @param int|null         $segments The suggested number of paths to consult.
     204         *                                   Default null, meaning the entire path was to be consulted.
     205         * @param array            $paths    The paths to search for, based on $path and $segments.
    203206         */
    204207        $pre = apply_filters( 'pre_get_network_by_path', null, $domain, $path, $segments, $paths );
     
    258261 * @since 3.9.0
    259262 *
    260  * @param object|int $network The network's DB row or ID.
     263 * @param object|int $network The network's database row or ID.
    261264 * @return object|bool Object containing network information if found, false if not.
    262265 */
     
    285288 * @since 3.9.0
    286289 *
    287  * @param string $domain   Domain to check.
    288  * @param string $path     Path to check.
    289  * @param int    $segments Path segments to use. Defaults to null, or the full path.
     290 * @param string   $domain   Domain to check.
     291 * @param string   $path     Path to check.
     292 * @param int|null $segments Path segments to use. Defaults to null, or the full path.
    290293 * @return object|bool Site object if successful. False when no site is found.
    291294 */
     
    300303         * @since 3.9.0
    301304         *
    302          * @param mixed $segments The number of path segments to consider. WordPress by default looks at
    303          *                         one path segment following the network path. The function default of
    304          *                         null only makes sense when you know the requested path should match a site.
    305          * @param string $domain   The requested domain.
    306          * @param string $path     The requested path, in full.
     305         * @param int|null $segments The number of path segments to consider. WordPress by default looks at
     306         *                           one path segment following the network path. The function default of
     307         *                           null only makes sense when you know the requested path should match a site.
     308         * @param string   $domain   The requested domain.
     309         * @param string   $path     The requested path, in full.
    307310         */
    308311        $segments = apply_filters( 'site_by_path_segments_count', $segments, $domain, $path );
     
    331334         * @since 3.9.0
    332335         *
    333          * @param string $domain   The requested domain.
    334          * @param string $path     The requested path, in full.
    335          * @param mixed  $segments The suggested number of paths to consult.
    336          *                         Default null, meaning the entire path was to be consulted.
    337          * @param array  $paths    The paths to search for, based on $path and $segments.
     336         * @param null|bool|object $site     Site value to return by path.
     337         * @param string           $domain   The requested domain.
     338         * @param string           $path     The requested path, in full.
     339         * @param int|null         $segments The suggested number of paths to consult.
     340         *                                   Default null, meaning the entire path was to be consulted.
     341         * @param array            $paths    The paths to search for, based on $path and $segments.
    338342         */
    339343        $pre = apply_filters( 'pre_get_site_by_path', null, $domain, $path, $segments, $paths );
     
    342346        }
    343347
    344         // @todo
    345         // get_blog_details(), caching, etc. Consider alternative optimization routes,
    346         // perhaps as an opt-in for plugins, rather than using the pre_* filter.
    347         // For example: The segments filter can expand or ignore paths.
    348         // If persistent caching is enabled, we could query the DB for a path <> '/'
    349         // then cache whether we can just always ignore paths.
     348        /*
     349         * @todo
     350         * get_blog_details(), caching, etc. Consider alternative optimization routes,
     351         * perhaps as an opt-in for plugins, rather than using the pre_* filter.
     352         * For example: The segments filter can expand or ignore paths.
     353         * If persistent caching is enabled, we could query the DB for a path <> '/'
     354         * then cache whether we can just always ignore paths.
     355         */
    350356
    351357        if ( count( $paths ) > 1 ) {
Note: See TracChangeset for help on using the changeset viewer.