Plugin Author
YOP
(@yourownprogrammer)
Hi akhtarali441,
Edit inc/yop_poll_model.php and in
public static function get_yop_polls_filter_search right after $sql_search = ‘ ) ‘;
add
global $current_user;
$user_roles = $current_user->roles;
$user_role = array_shift($user_roles);
if ($user_role != ‘administrator’)
$sql_search .= ‘AND poll_author = ‘ . $current_user->ID;
This way the users will be able to see only their own polls (except for the admins who can view all polls).
Regards,
YOP Team
Thanks A lot ..Again very very thanks to you..
I have another question if i want to Filter the Polls According to This week, last week, this month, last month what would i do..
please also help me in this post.. thanks in advance
Plugin Author
YOP
(@yourownprogrammer)
Hey akhtarali441,
We will look into this and try to make this option available in the future.
Best wishes,
YOP Team