Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-inclu...
File: class-wp-network-query.php
[500] Fix | Delete
if ( $this->query_vars['count'] ) {
[501] Fix | Delete
return (int) $wpdb->get_var( $this->request );
[502] Fix | Delete
}
[503] Fix | Delete
[504] Fix | Delete
$network_ids = $wpdb->get_col( $this->request );
[505] Fix | Delete
[506] Fix | Delete
return array_map( 'intval', $network_ids );
[507] Fix | Delete
}
[508] Fix | Delete
[509] Fix | Delete
/**
[510] Fix | Delete
* Populates found_networks and max_num_pages properties for the current query
[511] Fix | Delete
* if the limit clause was used.
[512] Fix | Delete
*
[513] Fix | Delete
* @since 4.6.0
[514] Fix | Delete
*
[515] Fix | Delete
* @global wpdb $wpdb WordPress database abstraction object.
[516] Fix | Delete
*/
[517] Fix | Delete
private function set_found_networks() {
[518] Fix | Delete
global $wpdb;
[519] Fix | Delete
[520] Fix | Delete
if ( $this->query_vars['number'] && ! $this->query_vars['no_found_rows'] ) {
[521] Fix | Delete
/**
[522] Fix | Delete
* Filters the query used to retrieve found network count.
[523] Fix | Delete
*
[524] Fix | Delete
* @since 4.6.0
[525] Fix | Delete
*
[526] Fix | Delete
* @param string $found_networks_query SQL query. Default 'SELECT FOUND_ROWS()'.
[527] Fix | Delete
* @param WP_Network_Query $network_query The `WP_Network_Query` instance.
[528] Fix | Delete
*/
[529] Fix | Delete
$found_networks_query = apply_filters( 'found_networks_query', 'SELECT FOUND_ROWS()', $this );
[530] Fix | Delete
[531] Fix | Delete
$this->found_networks = (int) $wpdb->get_var( $found_networks_query );
[532] Fix | Delete
}
[533] Fix | Delete
}
[534] Fix | Delete
[535] Fix | Delete
/**
[536] Fix | Delete
* Used internally to generate an SQL string for searching across multiple columns.
[537] Fix | Delete
*
[538] Fix | Delete
* @since 4.6.0
[539] Fix | Delete
*
[540] Fix | Delete
* @global wpdb $wpdb WordPress database abstraction object.
[541] Fix | Delete
*
[542] Fix | Delete
* @param string $search Search string.
[543] Fix | Delete
* @param string[] $columns Array of columns to search.
[544] Fix | Delete
* @return string Search SQL.
[545] Fix | Delete
*/
[546] Fix | Delete
protected function get_search_sql( $search, $columns ) {
[547] Fix | Delete
global $wpdb;
[548] Fix | Delete
[549] Fix | Delete
$like = '%' . $wpdb->esc_like( $search ) . '%';
[550] Fix | Delete
[551] Fix | Delete
$searches = array();
[552] Fix | Delete
foreach ( $columns as $column ) {
[553] Fix | Delete
$searches[] = $wpdb->prepare( "$column LIKE %s", $like );
[554] Fix | Delete
}
[555] Fix | Delete
[556] Fix | Delete
return '(' . implode( ' OR ', $searches ) . ')';
[557] Fix | Delete
}
[558] Fix | Delete
[559] Fix | Delete
/**
[560] Fix | Delete
* Parses and sanitizes 'orderby' keys passed to the network query.
[561] Fix | Delete
*
[562] Fix | Delete
* @since 4.6.0
[563] Fix | Delete
*
[564] Fix | Delete
* @global wpdb $wpdb WordPress database abstraction object.
[565] Fix | Delete
*
[566] Fix | Delete
* @param string $orderby Alias for the field to order by.
[567] Fix | Delete
* @return string|false Value to used in the ORDER clause. False otherwise.
[568] Fix | Delete
*/
[569] Fix | Delete
protected function parse_orderby( $orderby ) {
[570] Fix | Delete
global $wpdb;
[571] Fix | Delete
[572] Fix | Delete
$allowed_keys = array(
[573] Fix | Delete
'id',
[574] Fix | Delete
'domain',
[575] Fix | Delete
'path',
[576] Fix | Delete
);
[577] Fix | Delete
[578] Fix | Delete
$parsed = false;
[579] Fix | Delete
if ( 'network__in' === $orderby ) {
[580] Fix | Delete
$network__in = implode( ',', array_map( 'absint', $this->query_vars['network__in'] ) );
[581] Fix | Delete
$parsed = "FIELD( {$wpdb->site}.id, $network__in )";
[582] Fix | Delete
} elseif ( 'domain_length' === $orderby || 'path_length' === $orderby ) {
[583] Fix | Delete
$field = substr( $orderby, 0, -7 );
[584] Fix | Delete
$parsed = "CHAR_LENGTH($wpdb->site.$field)";
[585] Fix | Delete
} elseif ( in_array( $orderby, $allowed_keys, true ) ) {
[586] Fix | Delete
$parsed = "$wpdb->site.$orderby";
[587] Fix | Delete
}
[588] Fix | Delete
[589] Fix | Delete
return $parsed;
[590] Fix | Delete
}
[591] Fix | Delete
[592] Fix | Delete
/**
[593] Fix | Delete
* Parses an 'order' query variable and cast it to 'ASC' or 'DESC' as necessary.
[594] Fix | Delete
*
[595] Fix | Delete
* @since 4.6.0
[596] Fix | Delete
*
[597] Fix | Delete
* @param string $order The 'order' query variable.
[598] Fix | Delete
* @return string The sanitized 'order' query variable.
[599] Fix | Delete
*/
[600] Fix | Delete
protected function parse_order( $order ) {
[601] Fix | Delete
if ( ! is_string( $order ) || empty( $order ) ) {
[602] Fix | Delete
return 'ASC';
[603] Fix | Delete
}
[604] Fix | Delete
[605] Fix | Delete
if ( 'ASC' === strtoupper( $order ) ) {
[606] Fix | Delete
return 'ASC';
[607] Fix | Delete
} else {
[608] Fix | Delete
return 'DESC';
[609] Fix | Delete
}
[610] Fix | Delete
}
[611] Fix | Delete
}
[612] Fix | Delete
[613] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function