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/clone/wp-inclu...
File: class-wp-user-query.php
$_orderby = 'user_' . $orderby;
[1000] Fix | Delete
} elseif ( in_array( $orderby, array( 'user_login', 'user_nicename', 'user_email', 'user_url', 'user_registered' ), true ) ) {
[1001] Fix | Delete
$_orderby = $orderby;
[1002] Fix | Delete
} elseif ( 'name' === $orderby || 'display_name' === $orderby ) {
[1003] Fix | Delete
$_orderby = 'display_name';
[1004] Fix | Delete
} elseif ( 'post_count' === $orderby ) {
[1005] Fix | Delete
// @todo Avoid the JOIN.
[1006] Fix | Delete
$where = get_posts_by_author_sql( 'post' );
[1007] Fix | Delete
$this->query_from .= " LEFT OUTER JOIN (
[1008] Fix | Delete
SELECT post_author, COUNT(*) as post_count
[1009] Fix | Delete
FROM $wpdb->posts
[1010] Fix | Delete
$where
[1011] Fix | Delete
GROUP BY post_author
[1012] Fix | Delete
) p ON ({$wpdb->users}.ID = p.post_author)";
[1013] Fix | Delete
$_orderby = 'post_count';
[1014] Fix | Delete
} elseif ( 'ID' === $orderby || 'id' === $orderby ) {
[1015] Fix | Delete
$_orderby = 'ID';
[1016] Fix | Delete
} elseif ( 'meta_value' === $orderby || $this->get( 'meta_key' ) === $orderby ) {
[1017] Fix | Delete
$_orderby = "$wpdb->usermeta.meta_value";
[1018] Fix | Delete
} elseif ( 'meta_value_num' === $orderby ) {
[1019] Fix | Delete
$_orderby = "$wpdb->usermeta.meta_value+0";
[1020] Fix | Delete
} elseif ( 'include' === $orderby && ! empty( $this->query_vars['include'] ) ) {
[1021] Fix | Delete
$include = wp_parse_id_list( $this->query_vars['include'] );
[1022] Fix | Delete
$include_sql = implode( ',', $include );
[1023] Fix | Delete
$_orderby = "FIELD( $wpdb->users.ID, $include_sql )";
[1024] Fix | Delete
} elseif ( 'nicename__in' === $orderby ) {
[1025] Fix | Delete
$sanitized_nicename__in = array_map( 'esc_sql', $this->query_vars['nicename__in'] );
[1026] Fix | Delete
$nicename__in = implode( "','", $sanitized_nicename__in );
[1027] Fix | Delete
$_orderby = "FIELD( user_nicename, '$nicename__in' )";
[1028] Fix | Delete
} elseif ( 'login__in' === $orderby ) {
[1029] Fix | Delete
$sanitized_login__in = array_map( 'esc_sql', $this->query_vars['login__in'] );
[1030] Fix | Delete
$login__in = implode( "','", $sanitized_login__in );
[1031] Fix | Delete
$_orderby = "FIELD( user_login, '$login__in' )";
[1032] Fix | Delete
} elseif ( isset( $meta_query_clauses[ $orderby ] ) ) {
[1033] Fix | Delete
$meta_clause = $meta_query_clauses[ $orderby ];
[1034] Fix | Delete
$_orderby = sprintf( 'CAST(%s.meta_value AS %s)', esc_sql( $meta_clause['alias'] ), esc_sql( $meta_clause['cast'] ) );
[1035] Fix | Delete
}
[1036] Fix | Delete
[1037] Fix | Delete
return $_orderby;
[1038] Fix | Delete
}
[1039] Fix | Delete
[1040] Fix | Delete
/**
[1041] Fix | Delete
* Generate cache key.
[1042] Fix | Delete
*
[1043] Fix | Delete
* @since 6.3.0
[1044] Fix | Delete
*
[1045] Fix | Delete
* @global wpdb $wpdb WordPress database abstraction object.
[1046] Fix | Delete
*
[1047] Fix | Delete
* @param array $args Query arguments.
[1048] Fix | Delete
* @param string $sql SQL statement.
[1049] Fix | Delete
* @return string Cache key.
[1050] Fix | Delete
*/
[1051] Fix | Delete
protected function generate_cache_key( array $args, $sql ) {
[1052] Fix | Delete
global $wpdb;
[1053] Fix | Delete
[1054] Fix | Delete
// Replace wpdb placeholder in the SQL statement used by the cache key.
[1055] Fix | Delete
$sql = $wpdb->remove_placeholder_escape( $sql );
[1056] Fix | Delete
[1057] Fix | Delete
$key = md5( $sql );
[1058] Fix | Delete
$last_changed = wp_cache_get_last_changed( 'users' );
[1059] Fix | Delete
[1060] Fix | Delete
if ( empty( $args['orderby'] ) ) {
[1061] Fix | Delete
// Default order is by 'user_login'.
[1062] Fix | Delete
$ordersby = array( 'user_login' => '' );
[1063] Fix | Delete
} elseif ( is_array( $args['orderby'] ) ) {
[1064] Fix | Delete
$ordersby = $args['orderby'];
[1065] Fix | Delete
} else {
[1066] Fix | Delete
// 'orderby' values may be a comma- or space-separated list.
[1067] Fix | Delete
$ordersby = preg_split( '/[,\s]+/', $args['orderby'] );
[1068] Fix | Delete
}
[1069] Fix | Delete
[1070] Fix | Delete
$blog_id = 0;
[1071] Fix | Delete
if ( isset( $args['blog_id'] ) ) {
[1072] Fix | Delete
$blog_id = absint( $args['blog_id'] );
[1073] Fix | Delete
}
[1074] Fix | Delete
[1075] Fix | Delete
if ( $args['has_published_posts'] || in_array( 'post_count', $ordersby, true ) ) {
[1076] Fix | Delete
$switch = $blog_id && get_current_blog_id() !== $blog_id;
[1077] Fix | Delete
if ( $switch ) {
[1078] Fix | Delete
switch_to_blog( $blog_id );
[1079] Fix | Delete
}
[1080] Fix | Delete
[1081] Fix | Delete
$last_changed .= wp_cache_get_last_changed( 'posts' );
[1082] Fix | Delete
[1083] Fix | Delete
if ( $switch ) {
[1084] Fix | Delete
restore_current_blog();
[1085] Fix | Delete
}
[1086] Fix | Delete
}
[1087] Fix | Delete
[1088] Fix | Delete
return "get_users:$key:$last_changed";
[1089] Fix | Delete
}
[1090] Fix | Delete
[1091] Fix | Delete
/**
[1092] Fix | Delete
* Parses an 'order' query variable and casts it to ASC or DESC as necessary.
[1093] Fix | Delete
*
[1094] Fix | Delete
* @since 4.2.0
[1095] Fix | Delete
*
[1096] Fix | Delete
* @param string $order The 'order' query variable.
[1097] Fix | Delete
* @return string The sanitized 'order' query variable.
[1098] Fix | Delete
*/
[1099] Fix | Delete
protected function parse_order( $order ) {
[1100] Fix | Delete
if ( ! is_string( $order ) || empty( $order ) ) {
[1101] Fix | Delete
return 'DESC';
[1102] Fix | Delete
}
[1103] Fix | Delete
[1104] Fix | Delete
if ( 'ASC' === strtoupper( $order ) ) {
[1105] Fix | Delete
return 'ASC';
[1106] Fix | Delete
} else {
[1107] Fix | Delete
return 'DESC';
[1108] Fix | Delete
}
[1109] Fix | Delete
}
[1110] Fix | Delete
[1111] Fix | Delete
/**
[1112] Fix | Delete
* Makes private properties readable for backward compatibility.
[1113] Fix | Delete
*
[1114] Fix | Delete
* @since 4.0.0
[1115] Fix | Delete
* @since 6.4.0 Getting a dynamic property is deprecated.
[1116] Fix | Delete
*
[1117] Fix | Delete
* @param string $name Property to get.
[1118] Fix | Delete
* @return mixed Property.
[1119] Fix | Delete
*/
[1120] Fix | Delete
public function __get( $name ) {
[1121] Fix | Delete
if ( in_array( $name, $this->compat_fields, true ) ) {
[1122] Fix | Delete
return $this->$name;
[1123] Fix | Delete
}
[1124] Fix | Delete
[1125] Fix | Delete
wp_trigger_error(
[1126] Fix | Delete
__METHOD__,
[1127] Fix | Delete
"The property `{$name}` is not declared. Getting a dynamic property is " .
[1128] Fix | Delete
'deprecated since version 6.4.0! Instead, declare the property on the class.',
[1129] Fix | Delete
E_USER_DEPRECATED
[1130] Fix | Delete
);
[1131] Fix | Delete
return null;
[1132] Fix | Delete
}
[1133] Fix | Delete
[1134] Fix | Delete
/**
[1135] Fix | Delete
* Makes private properties settable for backward compatibility.
[1136] Fix | Delete
*
[1137] Fix | Delete
* @since 4.0.0
[1138] Fix | Delete
* @since 6.4.0 Setting a dynamic property is deprecated.
[1139] Fix | Delete
*
[1140] Fix | Delete
* @param string $name Property to check if set.
[1141] Fix | Delete
* @param mixed $value Property value.
[1142] Fix | Delete
*/
[1143] Fix | Delete
public function __set( $name, $value ) {
[1144] Fix | Delete
if ( in_array( $name, $this->compat_fields, true ) ) {
[1145] Fix | Delete
$this->$name = $value;
[1146] Fix | Delete
return;
[1147] Fix | Delete
}
[1148] Fix | Delete
[1149] Fix | Delete
wp_trigger_error(
[1150] Fix | Delete
__METHOD__,
[1151] Fix | Delete
"The property `{$name}` is not declared. Setting a dynamic property is " .
[1152] Fix | Delete
'deprecated since version 6.4.0! Instead, declare the property on the class.',
[1153] Fix | Delete
E_USER_DEPRECATED
[1154] Fix | Delete
);
[1155] Fix | Delete
}
[1156] Fix | Delete
[1157] Fix | Delete
/**
[1158] Fix | Delete
* Makes private properties checkable for backward compatibility.
[1159] Fix | Delete
*
[1160] Fix | Delete
* @since 4.0.0
[1161] Fix | Delete
* @since 6.4.0 Checking a dynamic property is deprecated.
[1162] Fix | Delete
*
[1163] Fix | Delete
* @param string $name Property to check if set.
[1164] Fix | Delete
* @return bool Whether the property is set.
[1165] Fix | Delete
*/
[1166] Fix | Delete
public function __isset( $name ) {
[1167] Fix | Delete
if ( in_array( $name, $this->compat_fields, true ) ) {
[1168] Fix | Delete
return isset( $this->$name );
[1169] Fix | Delete
}
[1170] Fix | Delete
[1171] Fix | Delete
wp_trigger_error(
[1172] Fix | Delete
__METHOD__,
[1173] Fix | Delete
"The property `{$name}` is not declared. Checking `isset()` on a dynamic property " .
[1174] Fix | Delete
'is deprecated since version 6.4.0! Instead, declare the property on the class.',
[1175] Fix | Delete
E_USER_DEPRECATED
[1176] Fix | Delete
);
[1177] Fix | Delete
return false;
[1178] Fix | Delete
}
[1179] Fix | Delete
[1180] Fix | Delete
/**
[1181] Fix | Delete
* Makes private properties un-settable for backward compatibility.
[1182] Fix | Delete
*
[1183] Fix | Delete
* @since 4.0.0
[1184] Fix | Delete
* @since 6.4.0 Unsetting a dynamic property is deprecated.
[1185] Fix | Delete
*
[1186] Fix | Delete
* @param string $name Property to unset.
[1187] Fix | Delete
*/
[1188] Fix | Delete
public function __unset( $name ) {
[1189] Fix | Delete
if ( in_array( $name, $this->compat_fields, true ) ) {
[1190] Fix | Delete
unset( $this->$name );
[1191] Fix | Delete
return;
[1192] Fix | Delete
}
[1193] Fix | Delete
[1194] Fix | Delete
wp_trigger_error(
[1195] Fix | Delete
__METHOD__,
[1196] Fix | Delete
"A property `{$name}` is not declared. Unsetting a dynamic property is " .
[1197] Fix | Delete
'deprecated since version 6.4.0! Instead, declare the property on the class.',
[1198] Fix | Delete
E_USER_DEPRECATED
[1199] Fix | Delete
);
[1200] Fix | Delete
}
[1201] Fix | Delete
[1202] Fix | Delete
/**
[1203] Fix | Delete
* Makes private/protected methods readable for backward compatibility.
[1204] Fix | Delete
*
[1205] Fix | Delete
* @since 4.0.0
[1206] Fix | Delete
*
[1207] Fix | Delete
* @param string $name Method to call.
[1208] Fix | Delete
* @param array $arguments Arguments to pass when calling.
[1209] Fix | Delete
* @return mixed Return value of the callback, false otherwise.
[1210] Fix | Delete
*/
[1211] Fix | Delete
public function __call( $name, $arguments ) {
[1212] Fix | Delete
if ( 'get_search_sql' === $name ) {
[1213] Fix | Delete
return $this->get_search_sql( ...$arguments );
[1214] Fix | Delete
}
[1215] Fix | Delete
return false;
[1216] Fix | Delete
}
[1217] Fix | Delete
}
[1218] Fix | Delete
[1219] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function