WordPress.org

Make WordPress Core

Ticket #27003: 27003-docs-cleanup.patch

File 27003-docs-cleanup.patch, 1.7 KB (added by TobiasBg, 6 years ago)

Docs fixes and cleanup.

  • src/wp-includes/ms-load.php

    diff --git src/wp-includes/ms-load.php src/wp-includes/ms-load.php
    index efe5376..865e39f 100644
    function get_network_by_path( $domain, $path, $segments = null ) { 
    280280 *
    281281 * @since 3.9.0
    282282 *
    283  * @param int $network_id The network's DB row or ID.
    284  * @return mixed Object containing network information if found, false if not.
     283 * @param object|int $network The network's DB row or ID.
     284 * @return object|bool Object containing network information if found, false if not.
    285285 */
    286286function wp_get_network( $network ) {
    287287        global $wpdb;
    function wpmu_current_site() { 
    315315function get_site_by_path( $domain, $path, $segments = null ) {
    316316        global $wpdb;
    317317
    318         $path_segments = array_filter( explode( '/', trim( $path, "/" ) ) );
     318        $path_segments = array_filter( explode( '/', trim( $path, '/' ) ) );
    319319
    320320        /**
    321321         * Filter the number of path segments to consider when searching for a site.
    322322         *
    323323         * @since 3.9.0
    324324         *
    325 
    326325         * @param mixed  $segments The number of path segments to consider. WordPress by default looks at
    327326         *                         one path segment following the network path. The function default of
    328327         *                         null only makes sense when you know the requested path should match a site.
    function get_site_by_path( $domain, $path, $segments = null ) { 
    331330         */
    332331        $segments = apply_filters( 'site_by_path_segments_count', $segments, $domain, $path );
    333332
    334         if ( null !== $segments && count($path_segments ) > $segments ) {
     333        if ( null !== $segments && count( $path_segments ) > $segments ) {
    335334                $path_segments = array_slice( $path_segments, 0, $segments );
    336335        }
    337336