Allow only Admin role to access plugin settings/options page

I have created a plugin, but it seems that all roles (Contributor, Author, Editor, Admin) except Subscriber have access to the settings/options page for my plugin.

How do I set permissions for only Admin to be able to access my plugin?

Thanks

Replay

Category: plugins Time: 2016-07-30 Views: 0

Related post

  • Can I dynamically create a link to my plugin settings/options page from my plugin description? 2011-02-03

    Currently, in my plugin description, I'm hardcoding... To customize options <a href="options-general.php?page=my-plugin-admin.php">click here</a> Is there a dynamic method to call the plugin options page? --------------Solutions-----

  • How to localize data array in plugin's option page 2013-08-29

    So i am localizing data saved in an array for my plugin's options, however the data is only localized in the front end, how can I localize data in the plugin's option page as well? The following is what I use to print the data in the front end to be

  • Best practices / settings to create "Read-Only" Admin role for auditors and similar 2015-10-09

    I am trying very diligently to remove as many over-privileged accounts/roles in our Active Directory and Windows (server and desktop) environment. This means retiring as many users as possible from Local Admin and Domain admin roles. (This includes o

  • How can I allow the Editor Role to change Theme Settings? 2011-03-24

    I've just setup a new Blog for a friend and thought it's better to not give him Administrator Access right away as a pre-caution. I created a new user as Editor therefore. But then I saw that this user can not change the Theme Settings like Backgroun

  • Allow non-admin users to access plug-in 2015-08-26

    I want users who are not Administrator to be able to use my Calendar plugin, but it is not available on the dashboard except to Administrator. --------------Solutions------------- from Codex function add_theme_caps(){ global $pagenow; if ( 'themes.ph

  • Allow only Admin to delete a file? 2016-02-10

    I am writing a C# application and I want to set (at application start) the permissions so that only the Administrator can delete a file which the application uses. All other users should not be able to delete it or modify its permissions. The file sh

  • Allow only 5 countries to access my page may lead to get lost or removed from search engines? 2012-05-04

    Because my resource are limited, I need to cut off strangers (inc. USA) for visiting my page. People from the middle of Europe are allowed (Germany, France, Hungary, Poland etc) are allowed. If they are strangers, they will see only a message that th

  • Defined user role to access plugin's pages 2015-08-07

    I Have two plugin installed Job Manager and Events and i want to defined User roles to access These plugin's created pages (Plugin Pages). --------------Solutions------------- You can use Advanced Access Manager for access control on pages but you ne

  • Letting only Admin role pass all the validation of required fields when saving contents 2012-06-25

    Is there anyway I can let admin role (uid=1) to save the contents of some content type without validating required fields? --------------Solutions------------- You could probably use hook_form_alter and check if the current user is uid=1 then make ea

  • How should I use register_setting, add_settings_section, & add_settings_field in my plugin's options page? 2012-01-26

    I'm working on a settings section for my plugin, and after reading over Wordpress's documentation which is in ROGUH DRAFT status, and also the Creating Options Pages - which is also in "transition", I've been left with questions about how to cor

  • How to run a function on plugin's options page? 2013-09-03

    I am writing a plugin that syncs data from a third party service to custom post types in wordpress via HTTP/SOAP. There will be the option to run it on an interval (using wP_cron functions) but I also want to include a 'Sync' button to be able to man

  • How do I handle multiple Submit buttons in plugin's option page? 2013-05-11

    I'm developing my first plugin for WordPress and I'm getting a grasp of the whole hook system. I'm now stuck on a (probably) small issue, that I could possibly circumvent, but I'm afraid of coming out with a "hack", more than a real solution. Wh

  • Add Custom Script in Other Plugin's Options page 2014-08-25

    I am trying to put a custom inline JavaScript is an options page created by a plugin. The page URL is like this wp-admin/admin.php?page=psbg. This is the code I am using to output my script at the head. function add_scripts() { $current_screen = get_

  • Allowing only certain roles to see certain content within a view 2012-02-16

    I am trying to make a martial arts site, where there is a feature allowing a member to log in, and view the techniques of his specific belt. If he is a black belt, he can view all of the techniques, but people of a lower belt can only view techniques

  • How to allow only Admins or Logged In Users to post links in comments? 2012-09-24

    I know how to disable HTML in comments, but I'd like the ability to only have Admins be able to post links, or only Logged In users if need be, to have the ability to post links. Is this possible? I am currently using this plugin. I wrote the author

  • How to allow only admin or site owners to edit web parts? 2015-04-15

    I am creating a sharepoint site in which I have a separate group that only contributes by adding documents to the library. But creating a contribute permission group is allowing the user to edit the web part. Also, I created a separate permission lev

  • Only admin should run wordpress plugin shortcode 2016-07-08

    I have created a simple plugin that locks down content for users not logged in and it is working fine. However any user on a multi-author site could use the same short code in his post to lock down content too. I do not want this to happen. How may I

  • How can I allow only one user to access an external drive? 2013-01-02

    In OS X Mountain Lion, I have an external encrypted HD (Mac OS, journaled and encrypted) and I want to have it only accessible for one user (or a group). Is this possible or do I have to unmount the drive every time I close or change my session? ----

  • How can I allow only authorized browsers to access a website? 2014-04-18

    I have a website and I want it to be accessible only by authorized clients/browsers (ex. with a certficate). The idea is that the users can only access the webpage in their office's computers (situated in different geographical areas, and they're dif

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 2.466 (s). 13 q(s)