acf_options_page::update_pagepublicACF 5.6.0

This function will update an options page settings

Method of the class: acf_options_page{}

No Hooks.

Returns

(Array).

Usage

$acf_options_page = new acf_options_page();
$acf_options_page->update_page( $slug, $data );
$slug
.
Default: ''
$data
.
Default: array()

Changelog

Since 5.6.0 Introduced.

acf_options_page::update_page() code ACF 6.8.8

function update_page( $slug = '', $data = array() ) {

	// vars
	$page = $this->get_page( $slug );

	// bail early if no page
	if ( ! $page ) {
		return false;
	}

	// loop
	$page = array_merge( $page, $data );

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

	// return
	return $page;
}