Support » Plugin: Dave's WordPress Live Search » Restricted pages shown in search popup

Viewing 1 replies (of 1 total)
  • Plugin Author Dana Ross

    (@csixty4)

    The Page Security plugin contains this code:

    //Do this only if user is not an admin, or if this is the blog page, category page, tag page, or feed (and isnt an admin page)
                if( !current_user_can('edit_others_posts') && ( is_home() || is_category() || is_tag() || is_tax() || is_feed() || is_author() || is_search() || is_archive() )  && !is_admin()) {

    An AJAX request is always run in an admin context:

    “Note 2: Both front-end and back-end Ajax requests use admin-ajax.php so is_admin() will always return true in your action handling code.” – http://codex.wordpress.org/AJAX_in_Plugins#Ajax_on_the_Viewer-Facing_Side

    Page Security’s author needs to modify the code so it still runs during AJAX calls (or at least this one), even though is_admin() is true.

Viewing 1 replies (of 1 total)
  • The topic ‘Restricted pages shown in search popup’ is closed to new replies.