• Resolved luciche

    (@luciche)


    Hi, first off great plugin, works very well and I haven’t any issues with it. I want to keep it to myself that I am using this plugin and I managed to hide it from the menu (from functions.php) but it can still be accessed using the specific link … ?page=ag-custom-admin . I was wondering how can I hide the AG Custom Admin Settings, from functions.php or someting, so it can only be accessed when I remove the specific code. Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    This is not supported out of the box, but we have created this especially for you. Please go ahead and add this to your theme’s functions file:

    function secure_agca() {
    	if(is_admin()){
    		$page = isset($_REQUEST['page'])?$_REQUEST['page']:'';
    		if($page == 'ag-custom-admin/plugin.php'){
    			$password = isset($_REQUEST['pwd'])?$_REQUEST['pwd']:'';
    			if($password != 'my_password'){
    				wp_die( __( 'Sorry, you are not allowed to access this page.' ) );
    			}
    		}
    	}
    }
    add_action( 'admin_init', 'secure_agca' );

    Change ‘my_password’ to your password, and open the following link in browser (with changed password). Basically, you would need to add “&pwd=my_password” at the end of the link. Make sure it’s added right after “plugin.php”.

    http://<YOUR_SITE_DOMAIN>/wp-admin/tools.php?page=ag-custom-admin/plugin.php&pwd=my_password

    If you are satisfied with the results, please consider contributing and supporting us by giving a donation, or at least sharing or liking our page on Facebook. Thank you!

    https://www.facebook.com/ag.custom.admin/

    Thread Starter luciche

    (@luciche)

    Thanks. I made a paypal donation Transaction ID: 0CY228546M2023537

    Thank you so much! We really appreciate your support and hope you’ll keep using AGCA in future!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Hide Settings page’ is closed to new replies.