acf_options_page::add_pagepublicACF 5.6.0

This function will store an options page settings

Method of the class: acf_options_page{}

No Hooks.

Returns

null. Nothing (null).

Usage

$acf_options_page = new acf_options_page();
$acf_options_page->add_page( $page );
$page(required)
.

Changelog

Since 5.6.0 Introduced.

acf_options_page::add_page() code ACF 6.8.8

function add_page( $page ) {

	// validate
	$page = $this->validate_page( $page );
	$slug = $page['menu_slug'];

	// bail early if already exists
	if ( isset( $this->pages[ $slug ] ) ) {
		return false;
	}

	// append
	$this->pages[ $slug ] = $page;

	// return
	return $page;
}