public static function get_fields() {
		$menu_id    = self::get_current_menu_id();
		$icon_types = wp_list_pluck( Menu_Icons::get( 'types' ), 'name' );

		asort( $icon_types );

		$sections = array(
			'global' => array(
				'id'          => 'global',
				'title'       => __( 'Global', 'menu-icons' ),
				'description' => __( 'Global settings', 'menu-icons' ),
				'fields'      => array(
					array(
						'id'      => 'icon_types',
						'type'    => 'checkbox',
						'label'   => __( 'Icon Types', 'menu-icons' ),
						'choices' => $icon_types,
						'value'   => self::get( 'global', 'icon_types' ),
					),
				),
				'args'        => array(),
			),
		);

		if ( ! empty( $menu_id ) ) {
			$menu_term     = get_term( $menu_id, 'nav_menu' );
			$menu_key      = sprintf( 'menu_%d', $menu_id );
			$menu_settings = self::get_menu_settings( $menu_id );

			$sections['menu'] = array(
				'id'          => $menu_key,
				'title'       => __( 'Current Menu', 'menu-icons' ),
				'description' => sprintf(
					__( '"%s" menu settings', 'menu-icons' ),
					apply_filters( 'single_term_title', $menu_term->name )
				),
				'fields'      => self::get_settings_fields( $menu_settings ),
				'args'        => array( 'inline_description' => true ),
			);
		}

		return apply_filters( 'menu_icons_settings_sections', $sections, $menu_id );
	}
public static function get_fields() {
		$menu_id    = self::get_current_menu_id();
		$icon_types = wp_list_pluck( Menu_Icons::get( 'types' ), 'name' );

		asort( $icon_types );

		$sections = array(
			'global' => array(
				'id'          => 'global',
				'title'       => __( 'Global', 'menu-icons' ),
				'description' => __( 'Global settings', 'menu-icons' ),
				'fields'      => array(
					array(
						'id'      => 'icon_types',
						'type'    => 'checkbox',
						'label'   => __( 'Icon Types', 'menu-icons' ),
						'choices' => $icon_types,
						'value'   => self::get( 'global', 'icon_types' ),
					),
				),
				'args'        => array(),
			),
		);

		if ( ! empty( $menu_id ) ) {
			$menu_term     = get_term( $menu_id, 'nav_menu' );
			$menu_key      = sprintf( 'menu_%d', $menu_id );
			$menu_settings = self::get_menu_settings( $menu_id );

			$sections['menu'] = array(
				'id'          => $menu_key,
				'title'       => __( 'Current Menu', 'menu-icons' ),
				'description' => sprintf(
					__( '"%s" menu settings', 'menu-icons' ),
					apply_filters( 'single_term_title', $menu_term->name )
				),
				'fields'      => self::get_settings_fields( $menu_settings ),
				'args'        => array( 'inline_description' => true ),
			);
		}

		return apply_filters( 'menu_icons_settings_sections', $sections, $menu_id );
	}
public static function get_fields ( ) { $ menu_id = self :: get_current_menu_id ( ) ; $ icon_types = wp_list_pluck ( Menu_Icons :: get ( 'types' ) , 'name' ) ; asort ( $ icon_types ) ; $ sections = array ( 'global' => array ( 'id' => 'global' , 'title' => __ ( 'Global' , 'menu-icons' ) , 'description' => __ ( 'Global settings' , 'menu-icons' ) , 'fields' => array ( array ( 'id' => 'icon_types' , 'type' => 'checkbox' , 'label' => __ ( 'Icon Types' , 'menu-icons' ) , 'choices' => $ icon_types , 'value' => self :: get ( 'global' , 'icon_types' ) , ) , ) , 'args' => array ( ) , ) , ) ; if ( ! empty ( $ menu_id ) ) { $ menu_term = get_term ( $ menu_id , 'nav_menu' ) ; $ menu_key = sprintf ( 'menu_%d' , $ menu_id ) ; $ menu_settings = self :: get_menu_settings ( $ menu_id ) ; $ sections [ 'menu' ] = array ( 'id' => $ menu_key , 'title' => __ ( 'Current Menu' , 'menu-icons' ) , 'description' => sprintf ( __ ( '"%s" menu settings' , 'menu-icons' ) , apply_filters ( 'single_term_title' , $ menu_term -> name ) ) , 'fields' => self :: get_settings_fields ( $ menu_settings ) , 'args' => array ( 'inline_description' => true ) , ) ; } return apply_filters ( 'menu_icons_settings_sections' , $ sections , $ menu_id ) ; }
Get settings sections

@since  0.3.0
@uses   apply_filters() Calls 'menu_icons_settings_sections'.
@return array
Get settings sections