WP_Customize_Nav_Menu_Section::json()
Get section parameters for JS.
Method of the class: WP_Customize_Nav_Menu_Section{}
No Hooks.
Return
Array
. Exported parameters.
Usage
$WP_Customize_Nav_Menu_Section = new WP_Customize_Nav_Menu_Section(); $WP_Customize_Nav_Menu_Section->json();
Changelog
Since 4.3.0 | Introduced. |
WP_Customize_Nav_Menu_Section::json() WP Customize Nav Menu Section::json code WP 6.6.2
public function json() { $exported = parent::json(); $exported['menu_id'] = (int) preg_replace( '/^nav_menu\[(-?\d+)\]/', '$1', $this->id ); return $exported; }