equal
deleted
inserted
replaced
125 |
125 |
126 return true; |
126 return true; |
127 } |
127 } |
128 |
128 |
129 /** |
129 /** |
130 * Retrieve the closest matching network for a domain and path. |
130 * Retrieves the closest matching network for a domain and path. |
131 * |
131 * |
132 * @since 3.9.0 |
132 * @since 3.9.0 |
133 * |
133 * |
134 * @internal In 4.4.0, converted to a wrapper for WP_Network::get_by_path() |
134 * @internal In 4.4.0, converted to a wrapper for WP_Network::get_by_path() |
135 * |
135 * |
188 } |
188 } |
189 |
189 |
190 $paths[] = '/'; |
190 $paths[] = '/'; |
191 |
191 |
192 /** |
192 /** |
193 * Determine a site by its domain and path. |
193 * Determines a site by its domain and path. |
194 * |
194 * |
195 * This allows one to short-circuit the default logic, perhaps by |
195 * This allows one to short-circuit the default logic, perhaps by |
196 * replacing it with a routine that is more optimal for your setup. |
196 * replacing it with a routine that is more optimal for your setup. |
197 * |
197 * |
198 * Return null to avoid the short-circuit. Return false if no site |
198 * Return null to avoid the short-circuit. Return false if no site |
493 $msg .= sprintf( |
493 $msg .= sprintf( |
494 /* translators: %s: Documentation URL. */ |
494 /* translators: %s: Documentation URL. */ |
495 __( 'Read the <a href="%s" target="_blank">Debugging a WordPress Network</a> article. Some of the suggestions there may help you figure out what went wrong.' ), |
495 __( 'Read the <a href="%s" target="_blank">Debugging a WordPress Network</a> article. Some of the suggestions there may help you figure out what went wrong.' ), |
496 __( 'https://wordpress.org/support/article/debugging-a-wordpress-network/' ) |
496 __( 'https://wordpress.org/support/article/debugging-a-wordpress-network/' ) |
497 ); |
497 ); |
498 $msg .= ' ' . __( 'If you’re still stuck with this message, then check that your database contains the following tables:' ) . '</p><ul>'; |
498 $msg .= ' ' . __( 'If you are still stuck with this message, then check that your database contains the following tables:' ) . '</p><ul>'; |
499 foreach ( $wpdb->tables( 'global' ) as $t => $table ) { |
499 foreach ( $wpdb->tables( 'global' ) as $t => $table ) { |
500 if ( 'sitecategories' === $t ) { |
500 if ( 'sitecategories' === $t ) { |
501 continue; |
501 continue; |
502 } |
502 } |
503 $msg .= '<li>' . $table . '</li>'; |
503 $msg .= '<li>' . $table . '</li>'; |
544 _deprecated_function( __FUNCTION__, '3.9.0' ); |
544 _deprecated_function( __FUNCTION__, '3.9.0' ); |
545 return $current_site; |
545 return $current_site; |
546 } |
546 } |
547 |
547 |
548 /** |
548 /** |
549 * Retrieve an object containing information about the requested network. |
549 * Retrieves an object containing information about the requested network. |
550 * |
550 * |
551 * @since 3.9.0 |
551 * @since 3.9.0 |
552 * @deprecated 4.7.0 Use `get_network()` |
552 * @deprecated 4.7.0 Use get_network() |
553 * @see get_network() |
553 * @see get_network() |
554 * |
554 * |
555 * @internal In 4.6.0, converted to use get_network() |
555 * @internal In 4.6.0, converted to use get_network() |
556 * |
556 * |
557 * @param object|int $network The network's database row or ID. |
557 * @param object|int $network The network's database row or ID. |