acf_set_options_page_capability()

Overview

This function is used in combination with the Options Page Add-on to change the capability of the main options page title. This function is to be used inside your functions.php file and must be run before the ‘init’ action.

The term ‘capability’ refers to the user roles and permissions that grant access to the options page. You can learn more about capability settings here

Requirements

Parameters

<?php acf_set_options_page_capability( $capability ); ?>
  • $capability: {string} (required) the name for the parent Options Page menu capability. Defaults to ‘edit_posts’

Usage

functions.php

<?php 

/*
*  Change the Options Page capability to 'manage_options'
*/

if( function_exists('acf_set_options_page_capability') ) {
    acf_set_options_page_capability( 'manage_options' );
}
?>

Related