WordPress.org

Ready to get started?Download WordPress

Forums

Dave's WordPress Live Search
Bug Fix (2 posts)

  1. lag47
    Member
    Posted 3 years ago #

    To get rid of the has_cap notice and clean up the code a bit...

    DavesWordPressLiveSearch.php lines 152 thru 154:

    public static function admin_menu() {
            if (current_user_can('manage_options')) {
                add_options_page("Dave's WordPress Live Search Options", __('Live Search', 'mt_trans_domain'), 8, __FILE__, array('DavesWordPressLiveSearch', 'plugin_options'));
            }
        }

    should simply be:

    public static function admin_menu(){
            add_options_page("Dave's WordPress Live Search Options", __('Live Search', 'mt_trans_domain'), 'manage_options', __FILE__, array('DavesWordPressLiveSearch', 'plugin_options'));
        }

    specifically, 8 needs to become 'manage_options'

  2. Dave Ross
    Member
    Plugin Author

    Posted 2 years ago #

    Great catch. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic