WP_Customize_Nav_Menu_Section::json

Advertisement

Summery Summery

Get section parameters for JS.

Syntax Syntax

WP_Customize_Nav_Menu_Section::json()

Return Return

(array) Exported parameters.

Source Source

File: wp-includes/customize/class-wp-customize-nav-menu-section.php

	public function json() {
		$exported            = parent::json();
		$exported['menu_id'] = intval( preg_replace( '/^nav_menu\[(-?\d+)\]/', '$1', $this->id ) );

		return $exported;
	}

Advertisement

Changelog Changelog

Changelog
Version Description
4.3.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.