The Dynamic Options Pages module allows you to register and manage ACF Options Pages from your WordPress admin, in ACF > Options Pages menu.
All ACF settings can be set within the UI. See ACF Options Pages documentation.
The pro version allows developers to manually activate Options Pages individually using the “Active” switch in the sidebar.
It is possible to export and import Options Pages in a Json file using the ACF > Tools menu. Options Pages can also be exported in PHP format, to manually register them in the functions.php
file. Those tools are also available directly within the Dynamic Options Pages UI.
The Dynamic Options Pages UI use the acf_add_options_page()
function behind the scene. It is possible to change the settings in PHP using the acf/get_options_page
hook. Usage example:
add_filter('acf/get_options_page', 'my_acf_get_options_page', 10, 2);
function my_acf_get_options_page($page, $slug){
if($slug !== 'my-options')
return $page;
$page['page_title'] = 'My Options';
return $page;
}
ACF Extended use the native ACF setting show_admin
to determine if the module menu should be displayed or not. You can read more about that setting on the ACF article How to hide ACF menu from clients. Usage example:
add_filter('acf/settings/show_admin', '__return_false');
The Options Pages module is enabled by default. It can be enabled and disabled in the Settings UIPRO, or with the following code:
// Using acf/init
add_action('acf/init', 'my_acfe_modules');
function my_acfe_modules(){
// Disable Options Pages
acf_update_setting('acfe/modules/options_pages', false);
}
// Or using acfe/init
add_action('acfe/init', 'my_acfe_modules');
function my_acfe_modules(){
// Disable Options Pages
acfe_update_setting('modules/options_pages', false);
}