[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/customize/ -> class-wp-customize-nav-menu-section.php (source)

   1  <?php
   2  /**
   3   * Customize API: WP_Customize_Nav_Menu_Section class
   4   *
   5   * @package WordPress
   6   * @subpackage Customize
   7   * @since 4.4.0
   8   */
   9  
  10  /**
  11   * Customize Menu Section Class
  12   *
  13   * Custom section only needed in JS.
  14   *
  15   * @since 4.3.0
  16   *
  17   * @see WP_Customize_Section
  18   */
  19  class WP_Customize_Nav_Menu_Section extends WP_Customize_Section {
  20  
  21      /**
  22       * Control type.
  23       *
  24       * @since 4.3.0
  25       * @var string
  26       */
  27      public $type = 'nav_menu';
  28  
  29      /**
  30       * Get section parameters for JS.
  31       *
  32       * @since 4.3.0
  33       * @return array Exported parameters.
  34       */
  35  	public function json() {
  36          $exported            = parent::json();
  37          $exported['menu_id'] = (int) preg_replace( '/^nav_menu\[(-?\d+)\]/', '$1', $this->id );
  38  
  39          return $exported;
  40      }
  41  }


Generated : Sun Dec 22 08:20:01 2024 Cross-referenced by PHPXref