Skip to content

Commit

Permalink
Enhanced error message. wpsharks/s2member#161
Browse files Browse the repository at this point in the history
  • Loading branch information
JasWSInc committed May 28, 2014
1 parent bd917c3 commit 115ac4f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion s2member-pro/includes/templates/members/member-list.php
Expand Up @@ -10,6 +10,10 @@
/** @var $pagination array */
$query = $member_list_query["query"];
$pagination = $member_list_query["pagination"];

if(!empty($_REQUEST[$s_var]))
$s_val = trim(stripslashes($_REQUEST[$s_var]));
else $s_val = ""; // No query yet.
?>
<div class="ws-plugin--s2member-list-wrapper">
<div class="ws-plugin--s2member-list-container">
Expand Down Expand Up @@ -93,8 +97,12 @@
</ul>
<?php endif; ?>

<?php elseif($attr["enable_list_search"] && !empty($_REQUEST[$s_var])): ?>
<?php elseif($attr["enable_list_search"] && $s_val): ?>
<p><?php echo _x('Sorry, your search returned 0 results.', "s2member-front", "s2member"); ?></p>

<?php elseif(!$attr["enable_list_search"] && $s_val): ?>
<p><?php echo _x('Sorry, search is not allowed here. The shortcode attribute `enable_list_search` is not enabled by the site owner.', "s2member-front", "s2member"); ?></p>

<?php else: /* Generic message in this case. */ ?>
<p><?php echo _x('Sorry, there are no users to list at this time.', "s2member-front", "s2member"); ?></p>
<?php endif; ?>
Expand Down

0 comments on commit 115ac4f

Please sign in to comment.