acf/options_page/settings

Description

This hook allows you to modify setting for the options page add-on. The settings available are:

  • title: the title which appears in the WP admin menu item. Defaults to ‘Options’
  • capability: the capability to view options page. Defaults to ‘edit_posts’
  • pages : an array of sub page titles. defaults to an empty array

Requirements

Parameters

  • $settings: an array holding the 3 settings as mentioned above

Usage

This example will change the menu item title to ‘Global’ and add 3 sub pages!

function my_acf_options_page_settings( $settings )
{
	$settings['title'] = 'Global';
	$settings['pages'] = array('Header', 'Sidebar', 'Footer');

	return $settings;
}

add_filter('acf/options_page/settings', 'my_acf_options_page_settings');

Hi all. Server maintenance scheduled this Sunday 28th May. Learn more