Tagged: like_escape
- This topic has 1 reply, 2 voices, and was last updated 6 years, 7 months ago by
Steve.
Viewing 1 reply thread
-
AuthorPosts
-
-
June 10, 2015 at 3:11 pm #3855
justinMemberI am doing a wp_user_query on the front end and receive this notice when trying to retrieve the query. I actually have found the use of like_escape which is deprecated on line: 343 in file class-piklist-wordpress.php.
I assume that is what the other notices about undefined variables are about as well?
Notice: like_escape is deprecated since version 4.0! Use wpdb::esc_like() instead. in /home/micdri10/EXTREMESOUTHAMERICA.COM/wp-includes/functions.php on line 3391 Notice: Undefined variable: relation in /home/micdri10/EXTREMESOUTHAMERICA.COM/wp-content/plugins/piklist/includes/class-piklist-wordpress.php on line 379 Notice: Undefined variable: relation in /home/micdri10/EXTREMESOUTHAMERICA.COM/wp-content/plugins/piklist/includes/class-piklist-wordpress.php on line 402 Notice: Undefined variable: relation in /home/micdri10/EXTREMESOUTHAMERICA.COM/wp-content/plugins/piklist/includes/class-piklist-wordpress.php on line 435Just in case you do want to look at my code here it is: (it seems to be working fine, just get the notices.)
<div id="team-list"> <?php // Generate the query $mem_num = 9; //Total number of Team members to display $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; if($paged==1){ $offset = 0; }else{ $offset= ($paged-1)*$mem_num; } $user_query = new WP_User_Query( array( 'role' => 'aamrole_54e5f6d7814cd', 'offset' => $offset , 'number' => $mem_num )); $users = $user_query->get_results(); if ( !empty( $users)) { foreach($users as $user ) { $user_info = get_userdata($user->ID); echo '<li>' . $user_info->first_name . ' ' . $user_info->last_name . '</li>'; //. get_avatar( $user_info->user_email, 165 ) . '</li>' ; } } else { echo 'Error - No Team Members were Found. Please contact [email protected]'; } ?> </div> <?php $total_user = $user_query->total_users; $total_pages=ceil($total_user/$mem_num); echo paginate_links(array( 'base' => get_pagenum_link(1) . '%_%', 'format' => '?paged=%#%', 'current' => $paged, 'total' => $total_pages, 'prev_text' => __('« Previous'), 'next_text' => __('Next »'), 'type' => 'plain', )); ?> -
June 16, 2015 at 11:13 pm #3883
-
-
AuthorPosts
Viewing 1 reply thread
- You must be logged in to reply to this topic.