NextCode - to Create Admin Option

Version: 1.0.0

Quick Start #back to top

  • Item Name : NextCode - Option Framework for Theme and Plugin.
  • Item Version : v1.0.0
  • Author : ThemeDev
  1. Download the installable WordPress plugin zip.
  2. Upload and activate plugin from WordPressPluginsAdd New
  3. Open your current theme functions.php file and paste this code.

// load NextCode Fremwrok
if( did_action('nextcode/loaded') ){
	// load framework
	include_once( NEXTCODE_DIR . 'inc/ncode.php' );

	// your options code here

	NCOPT::create_admin(
		'admin_option', // id must be unque
		[
			'framework_title' => esc_html__('Demo NextCode', 'nextcode'),
			'framework_class' => '', // custom class
			'framework_logo' => '', // logo url here
			
			'options_key' => 'admin_options_key',
			'menu_title' => esc_html__('Demo NextCode', 'nextcode'),
			'menu_slug'  => 'admin_options',
			'menu_type'  => 'menu',
			'menu_capability' => 'manage_options',
			'menu_icon' => null,
			'menu_position' => 32,

			'display_style' => 'left', // left, top
			'theme' => 'white', // white, dark

		]
	);

	
	NCOPT::create_section(
		'admin_option', // admin key
		[
			'id'    => 'general',
			'title'   => esc_html__( 'General', 'text-domain' ),
			'icon'     => 'icon icon-pencil',
			'priority'     => 1,
			'fields' => [
			
				[
					'id'    => 'site_name_heading',
					'type'    => 'heading',
					'content'   => esc_html__( 'General options settings', 'text-domain' ),
					'sub_content'   => esc_html__( 'Set your general theme options and control theme settings.', 'text-domain' ),
				],
		
				[
					'id'    => 'site_name',
					'type'    => 'text',
					'title'   => esc_html__( 'Site title', 'text-domain' ),
					'desc'       => esc_html__( 'Set your websites name. Which you want to set title.', 'text-domain' ),
					'default'    => get_option('blogname'),
					'attr' => [
						'class' => '',
						'placeholder' => 'Site name...',
					],
					'action' => [
						[
							'type' => 'option', // option, post, user, term
							'key' => 'blogname', // option key, post meta key, user meta key, terms key
							'id' => '', // post id, user id, terms id
							'target_value' => [ // set target field
								'section' => 'general', // set section id
								'field' => 'site_name' // set fileds id
							], 
						]
					],
				
				],
				
				[
					'id'    => 'site_details',
					'type'    => 'text',
					'title'   => esc_html__( 'Tagline', 'text-domain' ),
					'desc'       => esc_html__( 'Set your websites Tagline. Which you want to set Tagline.', 'text-domain' ),
					'default'    => get_option('blogdescription'),
					'attr' => [
						'class' => '',
						'placeholder' => 'Site name...',
					],
					'action' => [
						[
							'type' => 'option', // option, post, user, terms
							'key' => 'blogdescription', // option key, post meta key, user meta key, terms key
							'id' => '', // post id, user id, terms id
							'target_value' => [ // set target field
								'section' => 'general', // set section id
								'field' => 'site_details', // set fileds id
							], 
						]
					],
				
				],
			
				[
					'id'    => 'frontpage',
					'type'    => 'select',
					'title'   => esc_html__( 'Frontpage Settings', 'text-domain' ),
					'desc'       => esc_html__( 'Select which page to display on your Frontpage. If left blank the Blog will be displayed.', 'text-domain' ),
					'default'    => get_option('page_on_front'),
					'options' => 'page',
					
				],
				
				[
					'id'    => 'logo_image',
					'type'    => 'upload',
					'title'   => esc_html__( 'Logo', 'text-domain' ),
					'desc'       => esc_html__( 'Upload a logo image, or enter the URL or ID of an image if its already uploaded. The themes default logo gets applied if the input field is left blank.', 'text-domain' ),
					'default'    => get_option('general_main_logo'),
					'preview' => true,
					'action' => [
						[
							'type' => 'option', // option, post, user, terms
							'key' => 'general_main_logo', // option key, post meta key, user meta key, terms key
							'id' => '', // post id, user id, terms id
							'target_value' => [ // set target field
								'section' => 'general', // set section id
								'field' => 'logo_image', // set fileds id
							], 
						]
					],
				],
				[
					'id'    => 'favicon_image',
					'type'    => 'upload',
					'title'   => esc_html__( 'Favicon', 'text-domain' ),
					'desc'       => esc_html__( 'Specify a favicon for your site. Accepted formats: .ico, .png, .gif', 'text-domain' ),
					'default'    => [
						'url' => '',
						'id' => ''
					],
					
					'preview' => true,
					'action' => [
						[
							'type' => 'option', // option, post, user, terms
							'key' => 'site_icon', // option key, post meta key, user meta key, terms key
							'id' => '', // post id, user id, terms id
							'target_value' => [ // set target field
								'section' => 'general', // set section id
								'field' => 'favicon_image_id', // set fileds id
							], 
						]
					],
				],

			]
		]
	);

}

Installation #back to top

Using as Plugin

  1. Download the installable WordPress plugin zip.
  2. Upload and active plugin from WordPressPluginsAdd New
  3. After activation, next step is to configure your settings. You can do it from here configurations

Using as Theme

  1. Download the installable WordPress plugin zip.
  2. Extract plugin zip inside theme folder under your theme directory. for eg. /wp-content/themes/theme-name/inc/nextcode-framework or anywhere.
  3. Paste the below code inside your theme functions.php file.

/**
*
* .
* ├── wp-content
* |   ├── themes
* |   |   ├── theme-name
* |   |   |   ├── style.css
* |   |   |   ├── screenshot.png
* |   |   |   ├── functions.php <--------- Open via Text Editor
* |   |   |   ├── ..
* |   |   |   ├── ...
*
*/
Basic CONFIG

// load NextCode Fremwrok
if( did_action('nextcode/loaded') ){
	// load framework
	include_once( NEXTCODE_DIR . 'inc/ncode.php' );
}

// load NextCode Fremwrok
if( did_action('nextcode/loaded') ){
	// load framework
	include_once( NEXTCODE_DIR . 'inc/ncode.php' );

	// your options code here

	NCOPT::create_admin(
		'admin_option', // id must be unque
		[
			'framework_title' => esc_html__('Demo NextCode', 'nextcode'),
			'framework_class' => '', // custom class
			'framework_logo' => '', // logo url here
			
			'options_key' => 'admin_options_key',
			'menu_title' => esc_html__('Demo NextCode', 'nextcode'),
			'menu_slug'  => 'admin_options',
			'menu_type'  => 'menu',
			'menu_capability' => 'manage_options',
			'menu_icon' => null,
			'menu_position' => 32,

			'display_style' => 'left', // left, top
			'theme' => 'white', // white, dark

		]
	);

	
	NCOPT::create_section(
		'admin_option', // admin key
		[
			'id'    => 'general',
			'title'   => esc_html__( 'General', 'text-domain' ),
			'icon'     => 'icon icon-pencil',
			'priority'     => 1,
			'fields' => [
			
				[
					'id'    => 'site_name_heading',
					'type'    => 'heading',
					'content'   => esc_html__( 'General options settings', 'text-domain' ),
					'sub_content'   => esc_html__( 'Set your general theme options and control theme settings.', 'text-domain' ),
				],
		
				[
					'id'    => 'site_name',
					'type'    => 'text',
					'title'   => esc_html__( 'Site title', 'text-domain' ),
					'desc'       => esc_html__( 'Set your websites name. Which you want to set title.', 'text-domain' ),
					'default'    => get_option('blogname'),
					'attr' => [
						'class' => '',
						'placeholder' => 'Site name...',
					],
					'action' => [
						[
							'type' => 'option', // option, post, user, term
							'key' => 'blogname', // option key, post meta key, user meta key, terms key
							'id' => '', // post id, user id, terms id
							'target_value' => [ // set target field
								'section' => 'general', // set section id
								'field' => 'site_name' // set fileds id
							], 
						]
					],
				
				],
				
				[
					'id'    => 'site_details',
					'type'    => 'text',
					'title'   => esc_html__( 'Tagline', 'text-domain' ),
					'desc'       => esc_html__( 'Set your websites Tagline. Which you want to set Tagline.', 'text-domain' ),
					'default'    => get_option('blogdescription'),
					'attr' => [
						'class' => '',
						'placeholder' => 'Site name...',
					],
					'action' => [
						[
							'type' => 'option', // option, post, user, terms
							'key' => 'blogdescription', // option key, post meta key, user meta key, terms key
							'id' => '', // post id, user id, terms id
							'target_value' => [ // set target field
								'section' => 'general', // set section id
								'field' => 'site_details', // set fileds id
							], 
						]
					],
				
				],
			
				[
					'id'    => 'frontpage',
					'type'    => 'select',
					'title'   => esc_html__( 'Frontpage Settings', 'text-domain' ),
					'desc'       => esc_html__( 'Select which page to display on your Frontpage. If left blank the Blog will be displayed.', 'text-domain' ),
					'default'    => get_option('page_on_front'),
					'options' => 'page',
					
				],
				
				[
					'id'    => 'logo_image',
					'type'    => 'upload',
					'title'   => esc_html__( 'Logo', 'text-domain' ),
					'desc'       => esc_html__( 'Upload a logo image, or enter the URL or ID of an image if its already uploaded. The themes default logo gets applied if the input field is left blank.', 'text-domain' ),
					'default'    => get_option('general_main_logo'),
					'preview' => true,
					'action' => [
						[
							'type' => 'option', // option, post, user, terms
							'key' => 'general_main_logo', // option key, post meta key, user meta key, terms key
							'id' => '', // post id, user id, terms id
							'target_value' => [ // set target field
								'section' => 'general', // set section id
								'field' => 'logo_image', // set fileds id
							], 
						]
					],
				],
				[
					'id'    => 'favicon_image',
					'type'    => 'upload',
					'title'   => esc_html__( 'Favicon', 'text-domain' ),
					'desc'       => esc_html__( 'Specify a favicon for your site. Accepted formats: .ico, .png, .gif', 'text-domain' ),
					'default'    => [
						'url' => '',
						'id' => ''
					],
					
					'preview' => true,
					'action' => [
						[
							'type' => 'option', // option, post, user, terms
							'key' => 'site_icon', // option key, post meta key, user meta key, terms key
							'id' => '', // post id, user id, terms id
							'target_value' => [ // set target field
								'section' => 'general', // set section id
								'field' => 'favicon_image_id', // set fileds id
							], 
						]
					],
				],

			]
		]
	);

}
Demo Preview:

Configurations #back to top

Admin Option

CONFIG EXAMPLES - Admin Settings

$noption_key = '__themeoptions_nextland';
$menu_slug = 'text-domain';

// add setup menu
NCOPT::create_admin(
	$menu_slug,
	[
		// setup framework
		'framework_title' => esc_html__('NextLand options', 'text-domain'),
		'framework_class' => '',
		'framework_logo' => 'https://themedev.net/wp-content/uploads/2020/02/themedev.png',
		'options_key' => $noption_key,
		'css_render' => 'nextland-custom', // css render - handle name

		// setup menu
		'menu_title' => esc_html__('Theme options', 'text-domain'),
		'menu_slug'  => $menu_slug,
		'menu_type'  => 'menu',
		'menu_capability' => 'manage_options',
		'menu_icon' => null,
		'menu_position' => 30,

		// setup themes for display layout
		'theme' => 'white', // white, dark
		'display_style' => 'left', // top, left
	]
);

// general settings


NCOPT::create_section(
	$menu_slug,
	[
		'id'    => 'general',
		'title'   => esc_html__( 'General', 'text-domain' ),
		'icon'     => 'icon icon-pencil',
		'priority'     => 1,
		'fields' => [
			// heading
			[
				'id'    => 'site_name_heading',
				'type'    => 'heading',
				'content'   => esc_html__( 'General options settings', 'text-domain' ),
				'sub_content'   => esc_html__( 'Set your general theme options and control theme settings.', 'text-domain' ),
			],
		
			// site name
			[
				'id'    => 'site_name',
				'type'    => 'text',
				'title'   => esc_html__( 'Site title', 'text-domain' ),
				'desc'       => esc_html__( 'Set your websites name. Which you want to set title.', 'text-domain' ),
				'default'    => get_option('blogname'),
				'attr' => [
					'class' => '',
					'placeholder' => 'Site name...',
				],
				'action' => [
					[
						'type' => 'option', // option, post, user, term
						'key' => 'blogname', // option key, post meta key, user meta key, terms key
						'id' => '', // post id, user id, terms id
						'target_value' => [ // set target field
							'section' => 'general', // set section id
							'field' => 'site_name' // set fileds id
						], 
					]
				],
			
			],
			// site details
			[
				'id'    => 'site_details',
				'type'    => 'text',
				'title'   => esc_html__( 'Tagline', 'text-domain' ),
				'desc'       => esc_html__( 'Set your websites Tagline. Which you want to set Tagline.', 'text-domain' ),
				'default'    => get_option('blogdescription'),
				'attr' => [
					'class' => '',
					'placeholder' => 'Site name...',
				],
				'action' => [
					[
						'type' => 'option', // option, post, user, terms
						'key' => 'blogdescription', // option key, post meta key, user meta key, terms key
						'id' => '', // post id, user id, terms id
						'target_value' => [ // set target field
							'section' => 'general', // set section id
							'field' => 'site_details', // set fileds id
						], 
					]
				],
			
			],
			// frontpage settings
			[
				'id'    => 'frontpage',
				'type'    => 'select',
				'title'   => esc_html__( 'Frontpage Settings', 'text-domain' ),
				'desc'       => esc_html__( 'Select which page to display on your Frontpage. If left blank the Blog will be displayed.', 'text-domain' ),
				'default'    => get_option('page_on_front'),
				'options' => 'page',
				
			],
			// blog settings
			[
				'id'    => 'logo_image',
				'type'    => 'upload',
				'title'   => esc_html__( 'Logo', 'text-domain' ),
				'desc'       => esc_html__( 'Upload a logo image, or enter the URL or ID of an image if its already uploaded. The themes default logo gets applied if the input field is left blank.', 'text-domain' ),
				'default'    => get_option('general_main_logo'),
				'preview' => true,
				'action' => [
					[
						'type' => 'option', // option, post, user, terms
						'key' => 'general_main_logo', // option key, post meta key, user meta key, terms key
						'id' => '', // post id, user id, terms id
						'target_value' => [ // set target field
							'section' => 'general', // set section id
							'field' => 'logo_image', // set fileds id
						], 
					]
				],
			],
			[
				'id'    => 'favicon_image',
				'type'    => 'upload',
				'title'   => esc_html__( 'Favicon', 'text-domain' ),
				'desc'       => esc_html__( 'Specify a favicon for your site. Accepted formats: .ico, .png, .gif', 'text-domain' ),
				'default'    => [
					'url' => '',
					'id' => ''
				],
				
				'preview' => true,
				'action' => [
					[
						'type' => 'option', // option, post, user, terms
						'key' => 'site_icon', // option key, post meta key, user meta key, terms key
						'id' => '', // post id, user id, terms id
						'target_value' => [ // set target field
							'section' => 'general', // set section id
							'field' => 'favicon_image_id', // set fileds id
						], 
					]
				],
			],


		]
	]
);

// general style
NCOPT::create_section(
	$menu_slug,
	[
		'parent'    => 'general',
		'id'    => 'general_style',
		'title'   => esc_html__( 'Style', 'text-domain' ),
		'icon'     => 'icon icon-magic-wand',
		'priority' => 1,
		'fields' => [
			[
				'id'    => 'general_sty_heading',
				'type'    => 'heading',
				'content'   => esc_html__( 'Body Styles', 'text-domain' ),
				'sub_content'   => esc_html__( 'Set your general theme styles (body, main menu & top menu).', 'text-domain' ),
			],
			
		[
				'id'      => 'body_back_color',
				'parent_filed' => 'general_sty_heading',
				'type'    => 'background',
				'title'   => 'Background',
				'default' => '',
				'output' => [
					'selector' => 'body',
				],

			],
			[
				'id'      => 'body_back_font',
				'parent_filed' => 'general_sty_heading',
				'type'    => 'typography',
				'title'   => 'Typography',
				'default' => '',
				'output' => [
					'selector' => 'body',
				],

			],
			[
				'id'    => 'header_sty_heading',
				'type'    => 'heading',
				'content'   => esc_html__( 'Header Styles', 'text-domain' ),
				'sub_content'   => esc_html__( 'Set your general theme styles (body, main menu & top menu).', 'text-domain' ),
			],
			[
					'id'      => 'header_font_color',
					'parent_filed' => 'header_sty_heading',
					'type'    => 'color',
					'title'   => 'Font Color',
					'default' => '#333',
					'output' => [
						'selector' => 'body',
					],
			],
			[
				'id'      => 'header_backcolor',
				'parent_filed' => 'header_sty_heading',
				'type'    => 'background',
				'title'   => 'Background',
				'default' => '',
				'output' => [
					'selector' => ['.nextland-header-area'],
				],
				
			],
			[
				'id'      => 'header_borders',
				'parent_filed' => 'header_sty_heading',
				'type'    => 'borders',
				'title'   => 'Border',
				'default' => '',
				'output' => [
					'selector' => ['.nextland-header-area'],
				],
				
			],
			[
				'id'      => 'header_shadow',
				'parent_filed' => 'header_sty_heading',
				'type'    => 'box-shadow',
				'title'   => 'Shadow',
				'default' => '',
				'output' => [
					'selector' => ['.nextland-header-area'],
					'render' => 'box-shadow',
				],
				
			],

			[
				'id'      => 'header_dimensions',
				'parent_filed' => 'header_sty_heading',
				'type'    => 'dimensions',
				'title'   => 'Daimentions',
				'default' => '',
				'output' => [
					'selector' => '.nextland-header-area',
					'render' => 'padding',
					'selectors' => [
						'.nextland-header-area' => 'margin: {{TOP}}px {{RIGHT}}{{UNIT}} {{BOTTOM}}px {{LEFT}}px;',
						'.header' => 'border-radius: {{TOP}}{{UNIT}} {{BOTTOM}}px {{LEFT}}px {{RIGHT}}px;',
					],
				],
				
			],
		
		]
	]
);
Admin Settings Preview:
Get an option value

$sitename = ncode_get_options( 'option key here' , ['general', 'site_name'], '');
echo $sitename;
Or,

$options = get_option( 'option key here' ); // unique id of the framework
echo $options['general']['site_name']; // id of the field
echo $options['general']['site_details']; // id of the field
Admin Arguments
Name Type Default Description
key string nextland Set unique admin option key.
framework_title string Text to display in the framework header.
framework_class string To add external class.
framework_logo string Logo to display in the framework header.
options_key string To set a unique key for option data.
css_render string Set a handler for css render.
menu_title string On-screen name text for the menu.
menu_slug string Slug name to refer to this menu by (must be unique).
menu_type string menu Menu type. for eg. menu submenu.
menu_capability string manage_options Capability required for this menu to be displayed to the user.
menu_icon string URL to the icon to be used for this menu. for eg. "dashicons-chart-pie".
menu_position number Position in the menu.
menu_hidden bool false Flag to display menu in the admin panel.
menu_parent string Slug name for the parent menu (menu_type must be submenu).
sub_menu_title string Add sub menu title in the admin bar.
show_sub_menu bool true Flag to display sub menus in the admin bar.
plugin_action_links bool true To display settings link.
footer_text string Text to display in the footer of the framework.
footer_after string Content to display after of the framework footer.
footer_credit string Text to display in footer of the framework.
theme string white To display theme color (white or dark).
display_style string left To display theme layout (left or top).
SECTION Arguments
Name Type Description
key string Set key of admin option.
parent string Slug id for the parent section.
id string A unique slug ID.
title string Title of the section.
icon string Icon of the section.
priority number The priority within the context where the tabs should show.
fields array Associative array containing fields for the field sets.
Filters
Name Description
ncode_{$key}_args Get Arguments for this filter
ncode_{$key}_sections Get Section for this filter
ncode_{$key}_sub_sections Get Sub Section for this filter
ncode_{$key}_tabs Get Tabs for this filter
ncode_{$key}_fields, ncode_{$key}_pre_fields Get Fields for this filter
ncode_{$key}_actions Get Actions Params for this filter
ncode_{$key}_outputs Get Outputs Params for this filter
ncode_{$key}_save_before Save Before Options Data
Actions
Name Description
ncode_{$key}_save_before Save Before Options Data
ncode_{$key}_save_after Save After Options Data

Custom PostType

CONFIG EXAMPLES - Post Type Settings

// create custom post type
NCOPT::create_posttype(
	'nextcourse', // posttype id - (must be unique)
	[
		// custom post type data
		'label'                 => 'Course',
		'description'           => 'Custom PostType Course',
		'labels'                => [
			'name'               => 'Courses',
			'singular_name'      => 'Course',
			'menu_name'          => 'My Courses',
			'name_admin_bar'     => 'Courses',
			'add_new'            => 'New Course',
			'add_new_item'       => 'New Course',
			'new_item'           => 'New Course',
			'edit_item'          => 'Edit Course',
			'view_item'          => 'View Course',
			'all_items'          => 'All Courses',
			'search_items'       => 'Search Courses',
			'parent_item_colon'  => 'Parent Courses:',
			'not_found'          => 'No Courses found.',
			'not_found_in_trash' => 'No Courses found in Trash.',
		],
		'capability_type'       => 'page',
	]
);	

NCOPT::create_posttype(
	'nextcourse', // posttype id - (must be unique)
	[
		// custom post type data
		'label'                 => 'Course',
		'description'           => 'Custom PostType Course',
		'labels'                => [
			'name'               => 'Courses',
			'singular_name'      => 'Course',
			'menu_name'          => 'My Courses',
			'name_admin_bar'     => 'Courses',
			'add_new'            => 'New Course',
			'add_new_item'       => 'New Course',
			'new_item'           => 'New Course',
			'edit_item'          => 'Edit Course',
			'view_item'          => 'View Course',
			'all_items'          => 'All Courses',
			'search_items'       => 'Search Courses',
			'parent_item_colon'  => 'Parent Courses:',
			'not_found'          => 'No Courses found.',
			'not_found_in_trash' => 'No Courses found in Trash.',
		],
		'supports'              => array( 'title', 'thumbnail', 'editor'),
		'taxonomies'            => array( 'category', 'post_tag' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-text-page',
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => true,
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'capability_type'       => 'page',
	]
);
PostType Preview:
Arguments
Name Type Default Description
key string nextcourse Unique id for custom post type.
label string Course Set label name.
description string Custom PostType Course To add description for custom post type.
labels array Add various labels for custom post type.
Filters
Name Description
ncode_{$key}_args_posttype Get Arguments for this filter

Sub Menu for PostType

CONFIG EXAMPLES - Sub Menu Settings

// add sub menu
NCOPT::create_submenu_posttype(
	'nxcourse_settings', // sub menu id - (must be unique)
	[
		'post_type' => 'nextcourse', // select posttype, where you added sub menu

		// menu data
		'name' => 'Settings',
		'menu_capability' => 'manage_options',
		'options_key' => 'nxcourse_settings_key',
		'css_render' => 'nextland-custom', // css render - handle name

	]
);


// add sub menu
NCOPT::create_submenu_posttype(
	'nxcourse_settings', // sub menu id - (must be unique)
		[
			'post_type' => 'nextcourse', // select posttype, where you added sub menu

			// menu data
			'name' => 'Settings',
			'menu_capability' => 'manage_options',
			'theme' => 'white', // white, dark
			'display_style' => 'top',
			'options_key' => 'nxcourse_settings_key',
			'css_render' => 'nextland-custom', // css render - handle name

		]
	);

// section render
NCOPT::create_section(
	'nxcourse_settings',
	[
		'id'    => 'general_college',
		'title'   => esc_html__( 'General', 'text-domain' ),
		'icon'     => 'icon icon-pencil',
		'priority'     => 1,
		'fields' => [
		
			[
				'id'    => 'college_id',
				'type'    => 'text',
				'title'   => esc_html__( 'ID', 'text-domain' ),
				'desc'       => esc_html__( 'Set College ID. Example: 10002020', 'text-domain' ),
				'default'    => '',
				'attr' => [
					'placeholder' => '10002020',
				],
			],

		]
	]
);
Sub Menu Preview:
Arguments
Name Type Default Description
key string nxcourse_settings Unique id for sub menu.
post_type string nextcourse Set custom post type id.
name string Settings Set sub menu for custom post type.
menu_capability string manage_options Capability required for this menu to be displayed to the user.
theme string white To display theme color (white or dark).
display_style string top, left To display theme layout.
options_key string nxcourse_settings_key To set a unique key for option data.
css_render string nextland-custom Set a handler for css render.
SECTION Arguments
Name Type Description
key string Set sub menu key.
parent string Slug id for the parent section.
id string A unique slug ID.
title string Title of the section.
icon string Icon of the section.
priority number The priority within the context where the tabs should show.
fields array Associative array containing fields for the field sets.
Filters
Name Description
ncode_{$key}_args_submenu Get Arguments for this filter
ncode_{$key}_sections_submenu Get Section for this filter
ncode_{$key}_sub_sections_submenu Get Sub Section for this filter
ncode_{$key}_tabs_submenu Get Tabs for this filter
ncode_{$key}_fields_submenu, ncode_{$key}_pre_fields_submenu Get Fields for this filter
ncode_{$key}_actions_submenu Get Actions Params for this filter_submenu
ncode_{$key}_outputs_submenu Get Outputs Params for this filter
ncode_{$key}_save_before_submenu Save Before Options Data
Actions
Name Description
ncode_{$key}_save_before_submenu Save Before Options Data
ncode_{$key}_save_after_submenu Save After Options Data

Taxonomy Option

CONFIG EXAMPLES - Taxonomy Settings
	
NCOPT::create_taxonomy(
	'nxcollege', // texonomy id - (must be unique)
	[ 
		'post_type' => ['nextcourse'], // support posttype - supprt multiple custom posttype
		'taxonomy_meta_key' => 'nxcollege_keys',
		
		// texonomy data
		'hierarchical' => true,
		'labels' => [
			'name' => 'Colleges',
			'singular_name' => 'Colleges',
			'search_items' =>  'Search Colleges',
			'all_items' => 'All Colleges',
			'menu_name' => 'Colleges',
		],
	]
);	
	
NCOPT::create_taxonomy(
	'nxcollege', // texonomy id - (must be unique)
	[ 
		'post_type' => ['nextcourse'], // support posttype - supprt multiple custom posttype
		'taxonomy_meta_key' => 'nxcollege_keys',
		
		// texonomy data
		'hierarchical' => true,
		'labels' => [
			'name' => 'Colleges',
			'singular_name' => 'Colleges',
			'search_items' =>  'Search Colleges',
			'all_items' => 'All Colleges',
			'parent_item' => 'Parent Colleges',
			'parent_item_colon' => 'Parent Colleges:',
			'edit_item' => 'Edit Colleges',
			'update_item' => 'Update Colleges',
			'add_new_item' => 'Add New Colleges',
			'new_item_name' => 'New Colleges',
			'menu_name' => 'Colleges',
		],
		'show_ui' => true,
		'show_admin_column' => true,
		'query_var' => true,
		'rewrite' => [ 'slug' => 'nx-colleges' ],
		
	]
);

NCOPT::create_section(
	'nxcollege',
	[
		'id'    => 'general_college',
		'title'   => esc_html__( 'General', 'text-domain' ),
		'icon'     => 'icon icon-pencil',
		'priority'     => 1,
		'fields' => [
		
			[
				'id'    => 'college_id',
				'type'    => 'text',
				'title'   => esc_html__( 'ID', 'text-domain' ),
				'desc'       => esc_html__( 'Set College ID. Example: 10002020', 'text-domain' ),
				'default'    => '',
				'attr' => [
					'placeholder' => '10002020',
				],
			],

			[
				'id'    => 'college_unions',
				'type'    => 'text',
				'title'   => esc_html__( 'Student Unions', 'text-domain' ),
				'default'    => '',
				'desc'       => esc_html__( 'Set Student Unions Website. Example: https//:www.example.gov.uk', 'text-domain' ),
				
				'attr' => [
					'placeholder' => 'http://www.example.org.uk/',
				],
			],

		]
	]
);		
Taxonomy Preview:
Arguments
Name Type Default Description
key string nxcollege Unique key for Taxonomy.
post_type string nextcourse Set custom post type id.
taxonomy_meta_key string nxcollege_keys Set sub menu for custom post type.
labels array Add various labels for custom post type.
theme string white To display theme color (white or dark).
display_style string top To display theme layout.
SECTION Arguments
Name Type Description
key string Set sub menu key.
parent string Slug id for the parent section.
id string A unique slug ID.
title string Title of the section.
icon string Icon of the section.
priority number The priority within the context where the tabs should show.
fields array Associative array containing fields for the field sets.
Filters
Name Description
ncode_{$key}_args_taxonomy Get Arguments for this filter
ncode_{$key}_sections_taxonomy Get Section for this filter
ncode_{$key}_sub_sections_taxonomy Get Sub Section for this filter
ncode_{$key}_tabs_taxonomy Get Tabs for this filter
ncode_{$key}_fields_taxonomy, ncode_{$key}_pre_fields_taxonomy Get Fields for this filter
ncode_{$key}_actions_taxonomy Get Actions Params for this filter_taxonomy
ncode_{$key}_outputs_taxonomy Get Outputs Params for this filter
ncode_{$key}_save_before_taxonomy Save Before Options Data
Actions
Name Description
ncode_{$key}_save_before_taxonomy Save Before Options Data
ncode_{$key}_save_after_taxonomy Save After Options Data

Metabox Option

CONFIG EXAMPLES - Metabox Settings

NCOPT::create_metabox(
	'nxcouse_metabox', // metabox id (must be unique)
	[
		'post_type' => [ 'nextcourse' ], // support posttype - supprt multiple custom posttype
		'post_meta_key' => 'nxcouse_metabox_key',
		'css_render' => 'nextland-custom', // css render - handle name
		'save_data_type' => 'unserialize',
		
		// metabox data
		'name' => 'Course Details',
		'position' => 'normal', // side, normal
		'priority' => 'high', // high, low
	]
);

NCOPT::create_metabox(
	'nxcouse_metabox', // metabox id (must be unique)
	[
		'post_type' => [ 'nextcourse' ], // support posttype - supprt multiple custom posttype
		'post_meta_key' => 'nxcouse_metabox_key',
		'save_data_type' => 'unserialize',
		
		// metabox data
		'name' => 'Course Details',
		'position' => 'normal', // side, normal
		'priority' => 'high', // high, low

		'display_style' => 'top',
		'theme' => 'white',
	]
);

NCOPT::create_section(
	'nxcouse_metabox',
	[
		'id'    => 'general_course',
		'title'   => esc_html__( 'General', 'text-domain' ),
		'icon'     => 'icon icon-pencil',
		'priority'     => 1,
		'fields' => [
		
			
			[
				'id'    => 'course_id',
				'type'    => 'text',
				'title'   => esc_html__( 'Course Id', 'text-domain' ),
				'desc'       => esc_html__( 'Set your Course Id must be unique. Example: 1010101', 'text-domain' ),
				'default'    => '',
				'attr' => [
				'placeholder' => 'Set unique Course id',
				],
			],
			[
				'id'    => 'course_length',
				'type'    => 'select',
				'title'   => esc_html__( 'Course Length', 'text-domain' ),
				'desc'       => esc_html__( 'Set your Course Length. Example: 4 year course', 'text-domain' ),
				'default'    => '4 year course',
				'options' => [
					'6 month course' => '6 month course',
					'1 year course' => '1 year course',
					'2 year course' => '2 year course',
					'3 year course' => '3 year course',
					'4 year course' => '4 year course',
					'5 year course' => '5 year course',
					'6 year course' => '6 year course',
					'7 year course' => '7 year course',
					'8 year course' => '8 year course',
					'more' => 'More',
				]
			
			],

			
			[
				'id'    => 'course_qualification',
				'type'    => 'text',
				'title'   => esc_html__( 'Course qualification', 'text-domain' ),
				'desc'       => esc_html__( 'Set your Course qualification. Example: Masters Degree', 'text-domain' ),
				'default'    => '',
				'attr' => [
					'placeholder' => 'Masters Degree',
				],
			],

			[
				'id'    => 'course_fees',
				'type'    => 'text',
				'title'   => esc_html__( 'Course Fees', 'text-domain' ),
				'desc'       => esc_html__( 'Set your Course fees. Example: $3000', 'text-domain' ),
				'default'    => '',
				'attr' => [
					'placeholder' => '$3000',
				],
			],
		
		]
	]
);
MetaBox Preview:
Arguments
Name Type Default Description
key string nxcouse_metabox Unique key for Metabox.
post_type string nextcourse Set custom post type id.
post_meta_key string Set meta key for Metabox.
css_render string nextland-custom Set a handler for css render.
save_data_type string unserialize To save the data type (serialize or unserialize).
name string Course Details Set the name for Metabox .
position string normal Set the direction of position (side, normal).
priority string high The priority within the context where the tabs should show (low, high).
display_style string top To display theme layout(top, left).
theme string white To display theme color (white or dark).
SECTION Arguments
Name Type Description
key string Set sub menu key.
parent string Slug id for the parent section.
id string A unique slug ID.
title string Title of the section.
icon string Icon of the section.
priority number The priority within the context where the tabs should show.
fields array Associative array containing fields for the field sets.
Filters
Name Description
ncode_{$key}_args_metabox Get Arguments for this filter
ncode_{$key}_sections_metabox Get Section for this filter
ncode_{$key}_sub_sections_metabox Get Sub Section for this filter
ncode_{$key}_tabs_metabox Get Tabs for this filter
ncode_{$key}_fields_metabox, ncode_{$key}_pre_fields_metabox Get Fields for this filter
ncode_{$key}_actions_metabox Get Actions Params for this filter_metabox
ncode_{$key}_outputs_metabox Get Outputs Params for this filter
ncode_{$key}_save_before_metabox Save Before Options Data
Actions
Name Description
ncode_{$key}_save_before_metabox Save Before Options Data
ncode_{$key}_save_after_metabox Save After Options Data

Nav Menu Option

CONFIG EXAMPLES - Nav Menu Settings

NCOPT::create_nav(
	'nxnav', // menu id - (must be unique)
	[ 
		'nav_meta_key'   => 'nxnav_keys',
		'css_render'     => 'nextland-custom', // css render - handle name
		'save_data_type' => 'serialize',
		'fields' => [

				[
					'id'      => 'menu_icon',
					'type'    => 'icon',
					'title'   => esc_html__( 'Icon', 'text-domain' ),
					'desc'    => esc_html__( 'Set icon for menu', 'text-domain' ),
					'default' => '',
				
				],

		]
	]
);
Nav Preview:
Arguments
Name Type Default Description
key string nxnav Unique key for Metabox.
nav_meta_key string nxnav_keys Set meta key for Nav Menu.
css_render string nextland-custom Set a handler for css render.
save_data_type string serialize To save the data type (unserialize or serialize).
fields array Set various fields or labels Nav Menu .
Filters
Name Description
ncode_{$key}_args_navs Get Arguments for this filter
ncode_{$key}_sections_navs Get Section for this filter
ncode_{$key}_sub_sections_navs Get Sub Section for this filter
ncode_{$key}_tabs_navs Get Tabs for this filter
ncode_{$key}_fields_navs, ncode_{$key}_pre_fields_navs Get Fields for this filter
ncode_{$key}_actions_navs Get Actions Params for this filter_navs
ncode_{$key}_outputs_navs Get Outputs Params for this filter
ncode_{$key}_save_before_navs Save Before Options Data
Actions
Name Description
ncode_{$key}_save_before_navs Save Before Options Data
ncode_{$key}_save_after_navs Save After Options Data

Profile Option

CONFIG EXAMPLES - Profile Settings

NCOPT::create_profile(
	'nxprofile', // profile id - (must be unique)
	[ 
		'profile_meta_key' => 'nxprofiles_keys',
		'save_data_type' => 'serialize',
	]
);

NCOPT::create_profile(
	'nxprofile', // profile id - (must be unique)
	[ 
		'profile_meta_key' => 'nxprofiles_keys',
		'css_render' => 'nextland-custom', // css render - handle name
		'save_data_type' => 'serialize',
	]
);


NCOPT::create_section(
	'nxprofile',
	[
		'id'    => 'additional_course',
		'title'   => esc_html__( 'Additional', 'text-domain' ),
		'icon'     => 'icon icon-pencil',
		'priority'     => 1,
		'fields' => [
		
			
		
			[
				'id'    => 'study_mode',
				'type'    => 'select',
				'title'   => esc_html__( 'Study mode', 'text-domain' ),
				'desc'       => esc_html__( 'Set your Study mode. Example: fulltime', 'text-domain' ),
				'default'    => '4 year course',
				'options' => [
					'FullTime' => 'Full time',
					'PartTime' => 'Part time',
					'Distance learning' => 'Distance learning',
				]
			
			],

			[
				'id'    => 'placement_year',
				'type'    => 'switcher',
				'title'   => esc_html__( 'Placement year', 'text-domain' ),
				'desc'       => esc_html__( 'Enable switch to display as Placement year "YES". If left blank "No" Placement year will be displayed', 'text-domain' ),
				'default'    => 'no',
			
			],

			[
				'id'    => 'fundation_year',
				'type'    => 'switcher',
				'title'   => esc_html__( 'Foundation year', 'text-domain' ),
				'desc'       => esc_html__( 'Enable switch to display as Foundation year "YES". If left blank "No" Foundation year will be displayed', 'text-domain' ),
				'default'    => 'no',
			
			],

			[
				'id'    => 'abroad_year',
				'type'    => 'switcher',
				'title'   => esc_html__( 'Study abroad year', 'text-domain' ),
				'desc'       => esc_html__( 'Enable switch to display as abroad year "YES". If left blank "No" abroad year will be displayed', 'text-domain' ),
				'default'    => 'no',
			
			],

			[
				'id'    => 'locations',
				'type'    => 'text',
				'title'   => esc_html__( 'Locations', 'text-domain' ),
				'desc'       => esc_html__( 'Set your Location. Example: Bedford Square', 'text-domain' ),
				'default'    => '',
				'attr' => [
					'placeholder' => 'Set location',
				],
			],
			
		
		]
	]
);
Profile Preview:
Arguments
Name Type Default Description
key string nxprofile Unique key for Profile.
profile_meta_key string nxprofiles_keys Set meta key for Profile.
css_render string nextland-custom Set a handler for css render.
save_data_type string serialize To save the data type (unserialize or serialize).
SECTION Arguments
Name Type Description
key string Set sub menu key.
parent string Slug id for the parent section.
id string A unique slug ID.
title string Title of the section.
icon string Icon of the section.
priority number The priority within the context where the tabs should show.
fields array Associative array containing fields for the field sets.
Filters
Name Description
ncode_{$key}_args_profile Get Arguments for this filter
ncode_{$key}_sections_profile Get Section for this filter
ncode_{$key}_sub_sections_profile Get Sub Section for this filter
ncode_{$key}_tabs_profile Get Tabs for this filter
ncode_{$key}_fields_profile, ncode_{$key}_pre_fields_profile Get Fields for this filter
ncode_{$key}_actions_profile Get Actions Params for this filter
ncode_{$key}_outputs_profile Get Outputs Params for this filter
ncode_{$key}_save_before_profile Save Before Options Data
Actions
Name Description
ncode_{$key}_save_before_profile Save Before Options Data
ncode_{$key}_save_after_profile Save After Options Data

Widget Option

CONFIG EXAMPLES - Widget Settings

NCOPT::create_widget( 
	'ncode_widget_example_1', 
	[
		'title'       => 'NextCode Widget Example 1',
		'classname'   => '',
		'description' => 'A description for widget example 1',
		'fields' => [
		]
	]
);
if ( ! function_exists( 'ncode_widget_example_1' ) ) {
    function ncode_widget_example_1( $args, $instance ) {
  
      echo $args['before_widget'];
  
      if ( ! empty( $instance['title'] ) ) {
        echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ) . $args['after_title'];
      }
  
	  // your code

      echo $args['after_widget'];
  
    }
}

NCOPT::create_widget( 
	'ncode_widget_example_1', 
	[
		'title'       => 'NextCode Widget Example 1',
		'classname'   => '',
		'description' => 'A description for widget example 1',
		'callback' => 'ncode_widget_example_callback', // callback function 
		'fields' => [

			[
				'id'    => 'menu_icon',
				'type'    => 'icon',
				'title'   => esc_html__( 'Icons', 'text-domain' ),
				'default'    => '',
			
			],

			[
				'id'    => 'menu_text',
				'type'    => 'text',
				'title'   => esc_html__( 'Name', 'text-domain' ),
				'desc'       => esc_html__( 'Set your Location. Example: Bedford Square', 'text-domain' ),
				'default'    => '',
			
			],
			[
				'id' => 'reitem',
				'type'  => 'repeater',
				'title' => 'Group',
				'content' => 'Group',
				'fields' => [
					[
						'id' => 'relink',
						'type'  => 'text',
						'title' => 'Link 2',
					],
				
				],
				'title_field' => 'relink',
			],

		],
		'defaults' => [ 'menu_text' => 'title', 'menu_icon' => ''],
	]
);
if ( ! function_exists( 'ncode_widget_example_callback' ) ) {
    function ncode_widget_example_1( $args, $instance ) {
  
      echo $args['before_widget'];
  
      if ( ! empty( $instance['title'] ) ) {
        echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ) . $args['after_title'];
      }
  
	  // your code
	  echo $instance['menu_text'];
	  
      echo $args['after_widget'];
  
    }
}
Widgets Preview:
Arguments
Name Type Default Description
key string ncode_widget_example_1 Unique key for Widgets.
title string NextCode Widget Example 1 Set title for Widget.
classname string Set a class name for widget.
description string A description for widget example 1 To set the description.
fields array [] To set various labels.
Filters
Name Description
ncode_{$key}_args_widget Get Arguments for this filter
ncode_{$key}_sections_widget Get Section for this filter
ncode_{$key}_sub_sections_widget Get Sub Section for this filter
ncode_{$key}_tabs_widget Get Tabs for this filter
ncode_{$key}_fields_widget, ncode_{$key}_pre_fields_widget Get Fields for this filter

Comment Option

CONFIG EXAMPLES - Comment Settings

NCOPT::create_commentMetabox(
	'nxcouse_metabox_comment', // metabox id (must be unique)
	[
		'post_meta_key' => 'nxcouse_metabox_key',
		'save_data_type' => 'unserialize',
		
		// metabox data
		'name' => 'Course Details',
		'position' => 'normal', // side, normal
		'priority' => 'high', // high, low

		'display_style' => 'top', // top, left
		'theme' => 'white', // white, dark
	]
);
// enter section code

NCOPT::create_commentMetabox(
	'nxcouse_metabox_comment', // metabox id (must be unique)
	[
		'post_meta_key' => 'nxcouse_metabox_key',
		'save_data_type' => 'unserialize',
		
		// metabox data
		'name' => 'Course Details',
		'position' => 'normal', // side, normal
		'priority' => 'high', // high, low

		'display_style' => 'top', // top, left
		'theme' => 'white', // white, dark
	]
);
NCOPT::create_section(
	'nxcouse_metabox_comment',
	[
		'id'    => 'general_course',
		'title'   => esc_html__( 'General', 'nextland' ),
		'icon'     => 'icon icon-pencil',
		'priority'     => 1,
		'fields' => [
			[
				'id'    => 'text_comment',
				'type'    => 'text',
				'title'   => esc_html__( 'Comments', 'nextland' ),
				'desc'       => esc_html__( '', 'nextland' ),
				'default'    => '',
				
			],
			
		]
	]
);
Comments Preview:
Arguments
Name Type Default Description
key string Unique key for Comment.
title string Set title for Comment.
classname string Set a class name for Comment.
description string A description for Comment example 1 To set the description.
fields array [] To set various labels.
Filters
Name Description
ncode_{$key}_args_comment Get Arguments for this filter
ncode_{$key}_sections_comment Get Section for this filter
ncode_{$key}_sub_sections_comment Get Sub Section for this filter
ncode_{$key}_tabs_comment Get Tabs for this filter
ncode_{$key}_fields_comment, ncode_{$key}_pre_fields_comment Get Fields for this filter

Shortcode Option

CONFIG EXAMPLES - Shortcode Settings

NCOPT::create_shortcode( 
	'ncode_shortcode_apply', 
	[
		'title'       => 'Application form',
		'classname'   => 'neapply-forms',
		'description' => 'Are you planning to study abroad and looking for free help, please fill in your details below.',
		'fields' => [

			[
				'id'    => 'fname',
				'type'    => 'text',
				'title'   => esc_html__( 'First Name', 'nextland' ),
				'attr' => [
					'placeholder' => 'David',
				],
			],
			[
				'id'    => 'lname',
				'type'    => 'text',
				'title'   => esc_html__( 'Last Name', 'nextland' ),
				'attr' => [
					'placeholder' => 'Beckham',
				],
			],
			[
				'id'    => 'email',
				'type'    => 'text',
				'title'   => esc_html__( 'Email', 'nextland' ),
				'attr' => [
					'placeholder' => 'example@email.com',
				],
			],
			
			[
				'id'    => 'message',
				'type'    => 'textarea',
				'title'   => esc_html__( 'Want to tell us anything else?', 'nextland' ),
				'attr' => [
					'placeholder' => '',
				],
			],

			[
				'id'    => 'data_security',
				'type'    => 'checkbox',
				'title'   => '',
				'desc' => esc_html__( 'I confirm that I allow for my data to be processed by InterGreat Education Group Ltd. for the purpose of study abroad consultation according to InterGreat\'s', 'nextland' ),
				'options' => [
					'1' => ' Data Privacy'
				],
				'default' => '1',
			],

		],
		'params' => [ 'class' => 'custom-class', 'button-id' => ''],
		'form' => [ 'action' => '', 'class' => 'ncourse-applynow-submit', 'id' => 'apply-cource', 'method' => 'POST', 'enctype' => 'multipart/form-data', 'data-nonce' => wp_create_nonce( 'ncode_shortcode_apply' ), 'data-keys' => 'ncode_shortcode_apply'],
		'submit' => [ 'name' => 'submit-application',  'type' => 'submit', 'value' => 'Apply Now'],
	]
);

// Outputs - insert shortcode any where
do_shortcode('[ncode_shortcode_apply]');

NCOPT::create_shortcode( 
	'ncode_shortcode_apply', 
	[
		'title'       => 'Application form',
		'classname'   => 'neapply-forms',
		'description' => 'Are you planning to study abroad and looking for free help, please fill in your details below.',
		'callback' => 'ncode_shortcode_apply_callback', // callback function 
		'fields' => [

			[
				'id'    => 'fname',
				'type'    => 'text',
				'title'   => esc_html__( 'First Name', 'nextland' ),
				'attr' => [
					'placeholder' => 'David',
				],
			],
			[
				'id'    => 'lname',
				'type'    => 'text',
				'title'   => esc_html__( 'Last Name', 'nextland' ),
				'attr' => [
					'placeholder' => 'Beckham',
				],
			],
			[
				'id'    => 'email',
				'type'    => 'text',
				'title'   => esc_html__( 'Email', 'nextland' ),
				'attr' => [
					'placeholder' => 'example@email.com',
				],
			],
			[
				'id'    => 'message',
				'type'    => 'textarea',
				'title'   => esc_html__( 'Want to tell us anything else?', 'nextland' ),
				'attr' => [
					'placeholder' => '',
				],
			],

			[
				'id'    => 'data_security',
				'type'    => 'checkbox',
				'title'   => '',
				'desc' => esc_html__( 'I confirm that I allow for my data to be processed by InterGreat Education Group Ltd. for the purpose of study abroad consultation according to InterGreat\'s', 'nextland' ),
				'options' => [
					'1' => ' Data Privacy'
				],
				'default' => '1',
			],

		],
		'params' => [ 'class' => 'custom-class', 'button-id' => ''],
		'form' => [ 'action' => '', 'class' => 'ncourse-applynow-submit', 'id' => 'apply-cource', 'method' => 'POST', 'enctype' => 'multipart/form-data', 'data-nonce' => wp_create_nonce( 'ncode_shortcode_apply' ), 'data-keys' => 'ncode_shortcode_apply'],
		'submit' => [ 'name' => 'submit-application',  'type' => 'submit', 'value' => 'Apply Now'],
	]
);

// calback function
if ( ! function_exists( 'ncode_shortcode_apply_callback' ) ) {
	function ncode_shortcode_apply_callback( $content, $args, $keys ) {
		echo $content;
	}
}


// Outputs - insert shortcode any where
do_shortcode('[ncode_shortcode_apply]');
Shortcode Preview:
Arguments
Name Type Default Description
key string Unique key for Shortcode.
title string Set title for Shortcode.
classname string Set a class name for Shortcode.
description string A description for Shortcode example 1 To set the description.
fields array [] To set various labels.
Filters
Name Description
ncode_{$key}_args_shortcode Get Arguments for this filter
ncode_{$key}_sections_shortcode Get Section for this filter
ncode_{$key}_sub_sections_shortcode Get Sub Section for this filter
ncode_{$key}_tabs_shortcode Get Tabs for this filter
ncode_{$key}_fields_shortcode, ncode_{$key}_pre_fields_shortcode Get Fields for this filter

Multistep Form

CONFIG EXAMPLES - Multistep Settings

NCOPT::create_shortcode( 
	'ncode_shortcode_apply_mul', 
	[
		'title'       => 'Application form',
		'classname'   => 'neapply-forms',
		'description' => 'Are you planning to study abroad and looking for free help, please fill in your details below.',
		
		'params' => [ 'class' => 'custom-class', 'button-id' => ''],
		'form' => [ 'action' => '', 'class' => 'ncourse-applynow-submit', 'id' => 'apply-cource', 'method' => 'POST', 'enctype' => 'multipart/form-data', 'data-nonce' => wp_create_nonce( 'ncode_shortcode_apply' ), 'data-keys' => 'ncode_shortcode_apply'],
		'submit' => [ 'name' => 'submit-application',  'type' => 'submit', 'value' => 'Apply Now'],
		'multistep' => true,
		'display_style' => 'top',
		'theme' => 'white'
	]
);

NCOPT::create_section(
    'ncode_shortcode_apply_mul',
    [
        'id'    => 'personal',
        'title'   => esc_html__( 'Information', 'nextcourse' ),
        'icon'     => 'icon iconpencil',
        'priority'     => 1,
        'fields' => [
            [
                'id'    => 'personal_heading',
                'type'    => 'heading',
                'content'   => esc_html__( 'SETP 1', 'text-domain' ),
                'sub_content'   => esc_html__( 'PROVIDE YOUR INFORMATION', 'text-domain' ),
            ],
            [
                'id'    => 'fname',
                'type'    => 'text',
                'title'   => esc_html__( 'Given Names', 'nextcourse' ),
                'attr' => [
                    'placeholder' => '',
                ],
            ],
            [
                'id'    => 'lname',
                'type'    => 'text',
                'title'   => esc_html__( 'Family Name', 'nextcourse' ),
                'attr' => [
                    'placeholder' => '',
                ],
            ],
            
            [
                'id'       => 'datebirth',
                'type'     => 'date',
                'title'    => esc_html__( 'Date of Birth', 'nextcourse' ),
                'date_format' => 'Y-m-d',
                'attr' => [
                    'placeholder' => 'Date of Birth',
                ],
            ],
            
            [
                'id'    => 'mobile',
                'type'    => 'text',
                'title'   => esc_html__( 'Mobile Number', 'nextcourse' ),
                'attr' => [
                    'placeholder' => '',
                ],
            ],
            [
                'id'    => 'email',
                'type'    => 'text',
                'title'   => esc_html__( 'Email Address', 'nextcourse' ),
                'attr' => [
                    'placeholder' => '',
                ],
            ],

        ]
    ]
);

NCOPT::create_section(
    'ncode_shortcode_apply_mul',
    [
        'id'    => 'academic',
        'title'   => esc_html__( 'Academic Qualification', 'nextcourse' ),
        'icon'     => 'icon iconpencil',
        'priority'     => 1,
        'fields' => [
            [
                'id'    => 'academic_heading',
                'type'    => 'heading',
                'content'   => esc_html__( 'SETP 2', 'text-domain' ),
                'sub_content'   => esc_html__( 'LATEST ACADEMIC QUALIFICATION 1', 'text-domain' ),
            ],
            
            [
                'id'    => 'study_gpa',
                'type'    => 'text',
                'title'   => esc_html__( 'GPA', 'nextcourse' ),
                'attr' => [
                    'placeholder' => '',
                ],
            ],

            [
                'id'    => 'study_year',
                'type'    => 'text',
                'title'   => esc_html__( 'Year', 'nextcourse' ),
                'attr' => [
                    'placeholder' => '',
                ],
            ],
            [
                'id'    => 'study_ins',
                'type'    => 'text',
                'title'   => esc_html__( 'Institution', 'nextcourse' ),
                'attr' => [
                    'placeholder' => '',
                ],
            ],
            

        ]
    ]
);

NCOPT::create_section(
    'ncode_shortcode_apply_mul',
    [
        'id'    => 'goal',
        'title'   => esc_html__( 'Study Goal', 'nextcourse' ),
        'icon'     => 'icon iconpencil',
        'priority'     => 1,
        'fields' => [
            [
                'id'    => 'goal_heading',
                'type'    => 'heading',
                'content'   => esc_html__( 'SETP 3', 'text-domain' ),
                'sub_content'   => esc_html__( 'STUDY GOAL', 'text-domain' ),
            ],
            [
                'id'    => 'program_name',
                'type'    => 'text',
                'title'   => esc_html__( 'Program Name', 'nextcourse' ),
                'attr' => [
                    'placeholder' => '',
                ],
            ],
            
        ]
    ]
);

NCOPT::create_section(
    'ncode_shortcode_apply_mul',
    [
        'id'    => 'others_infor',
        'title'   => esc_html__( 'Other Info', 'nextcourse' ),
        'icon'     => 'icon iconpencil',
        'priority'     => 1,
        'fields' => [
            [
                'id'    => 'other_heading',
                'type'    => 'heading',
                'content'   => esc_html__( 'SETP 4', 'text-domain' ),
                'sub_content'   => esc_html__( 'OTHER DETAILS', 'text-domain' ),
            ],
            
            [
                'id'    => 'test_score',
                'type'    => 'text',
                'title'   => esc_html__( 'English Language Test Score', 'nextcourse' ),
                'attr' => [
                    'placeholder' => '',
                ],
            ],
           
            [
                'id'    => 'messege',
                'type'    => 'textarea',
                'title'   => esc_html__( 'Comments', 'nextcourse' ),
                'attr' => [
                    'placeholder' => '',
                ],
            ],
            [
                'id'    => 'data_security',
                'type'    => 'checkbox',
                'title'   => '',
                'desc' => esc_html__( 'I confirm that I allow for my data to be processed by InterGreat Education Group Ltd. for the purpose of study abroad consultation according to InterGreat\'s', 'nextcourse' ),
                'options' => [
                    '1' => ' Data Privacy'
                ],
                'default' => '1',
            ],

        ]
    ]
);

// Outputs - insert shortcode any where
do_shortcode('[ncode_shortcode_apply_mul]');

NCOPT::create_shortcode( 
	'ncode_shortcode_apply_mul', 
	[
		//'title'       => 'Application form',
		'classname'   => 'neapply-forms',
		//'description' => 'Are you planning to study abroad and looking for free help, please fill in your details below.',
		'callback' => 'ncode_shortcode_apply_callback_multi', // callback function 
		
		'params' => [ 'class' => 'custom-class', 'button-id' => ''],
		'form' => [ 'action' => '', 'class' => 'ncourse-applynow-submit', 'id' => 'apply-cource', 'method' => 'POST', 'enctype' => 'multipart/form-data', 'data-nonce' => wp_create_nonce( 'ncode_shortcode_apply' ), 'data-keys' => 'ncode_shortcode_apply'],
		'submit' => [ 'name' => 'submit-application',  'type' => 'submit', 'value' => 'Apply Now', 'pre-enable' => true, 'pre-text' => 'Back', 'next-text' => 'Back', 'submit-text' => 'Back'],
		'multistep' => true,
		'display_style' => 'top',
		'theme' => 'white'
	]
);

NCOPT::create_section(
    'ncode_shortcode_apply_mul',
    [
        'id'    => 'personal',
        'title'   => esc_html__( 'Information', 'nextcourse' ),
        'icon'     => 'icon iconpencil',
        'priority'     => 1,
        'fields' => [
            [
                'id'    => 'personal_heading',
                'type'    => 'heading',
                'content'   => esc_html__( 'SETP 1', 'text-domain' ),
                'sub_content'   => esc_html__( 'PROVIDE YOUR INFORMATION', 'text-domain' ),
            ],
            [
                'id'    => 'fname',
                'type'    => 'text',
                'title'   => esc_html__( 'Given Names', 'nextcourse' ),
                'attr' => [
                    'placeholder' => '',
                ],
            ],
            [
                'id'    => 'lname',
                'type'    => 'text',
                'title'   => esc_html__( 'Family Name', 'nextcourse' ),
                'attr' => [
                    'placeholder' => '',
                ],
            ],
            
            [
                'id'       => 'datebirth',
                'type'     => 'date',
                'title'    => esc_html__( 'Date of Birth', 'nextcourse' ),
                'date_format' => 'Y-m-d',
                'attr' => [
                    'placeholder' => 'Date of Birth',
                ],
            ],
            
            [
                'id'    => 'mobile',
                'type'    => 'text',
                'title'   => esc_html__( 'Mobile Number', 'nextcourse' ),
                'attr' => [
                    'placeholder' => '',
                ],
            ],
            [
                'id'    => 'email',
                'type'    => 'text',
                'title'   => esc_html__( 'Email Address', 'nextcourse' ),
                'attr' => [
                    'placeholder' => '',
                ],
            ],

        ]
    ]
);

NCOPT::create_section(
    'ncode_shortcode_apply_mul',
    [
        'id'    => 'academic',
        'title'   => esc_html__( 'Academic Qualification', 'nextcourse' ),
        'icon'     => 'icon iconpencil',
        'priority'     => 1,
        'fields' => [
            [
                'id'    => 'academic_heading',
                'type'    => 'heading',
                'content'   => esc_html__( 'SETP 2', 'text-domain' ),
                'sub_content'   => esc_html__( 'LATEST ACADEMIC QUALIFICATION 1', 'text-domain' ),
            ],
            
            [
                'id'    => 'study_gpa',
                'type'    => 'text',
                'title'   => esc_html__( 'GPA', 'nextcourse' ),
                'attr' => [
                    'placeholder' => '',
                ],
            ],

            [
                'id'    => 'study_year',
                'type'    => 'text',
                'title'   => esc_html__( 'Year', 'nextcourse' ),
                'attr' => [
                    'placeholder' => '',
                ],
            ],
            [
                'id'    => 'study_ins',
                'type'    => 'text',
                'title'   => esc_html__( 'Institution', 'nextcourse' ),
                'attr' => [
                    'placeholder' => '',
                ],
            ],
            

        ]
    ]
);

NCOPT::create_section(
    'ncode_shortcode_apply_mul',
    [
        'id'    => 'goal',
        'title'   => esc_html__( 'Study Goal', 'nextcourse' ),
        'icon'     => 'icon iconpencil',
        'priority'     => 1,
        'fields' => [
            [
                'id'    => 'goal_heading',
                'type'    => 'heading',
                'content'   => esc_html__( 'SETP 3', 'text-domain' ),
                'sub_content'   => esc_html__( 'STUDY GOAL', 'text-domain' ),
            ],
            [
                'id'    => 'program_name',
                'type'    => 'text',
                'title'   => esc_html__( 'Program Name', 'nextcourse' ),
                'attr' => [
                    'placeholder' => '',
                ],
            ],
            
        ]
    ]
);

NCOPT::create_section(
    'ncode_shortcode_apply_mul',
    [
        'id'    => 'others_infor',
        'title'   => esc_html__( 'Other Info', 'nextcourse' ),
        'icon'     => 'icon iconpencil',
        'priority'     => 1,
        'fields' => [
            [
                'id'    => 'other_heading',
                'type'    => 'heading',
                'content'   => esc_html__( 'SETP 4', 'text-domain' ),
                'sub_content'   => esc_html__( 'OTHER DETAILS', 'text-domain' ),
            ],
            
            [
                'id'    => 'test_score',
                'type'    => 'text',
                'title'   => esc_html__( 'English Language Test Score', 'nextcourse' ),
                'attr' => [
                    'placeholder' => '',
                ],
            ],
           
            [
                'id'    => 'messege',
                'type'    => 'textarea',
                'title'   => esc_html__( 'Comments', 'nextcourse' ),
                'attr' => [
                    'placeholder' => '',
                ],
            ],
            [
                'id'    => 'data_security',
                'type'    => 'checkbox',
                'title'   => '',
                'desc' => esc_html__( 'I confirm that I allow for my data to be processed by InterGreat Education Group Ltd. for the purpose of study abroad consultation according to InterGreat\'s', 'nextcourse' ),
                'options' => [
                    '1' => ' Data Privacy'
                ],
                'default' => '1',
            ],

        ]
    ]
);
// calback function
if ( ! function_exists( 'ncode_shortcode_apply_callback_multi' ) ) {
	function ncode_shortcode_apply_callback_multi( $content, $args, $keys ) {
		echo $content;
	}
}


// Outputs - insert shortcode any where
do_shortcode('[ncode_shortcode_apply_mul]');
Multistep Preview:
Arguments
Name Type Default Description
multistep bool true Enable Multistep

Fields #back to top

Accordion

CONFIG EXAMPLES

array(
	'id'            => 'opt-accordion-1',
	'type'          => 'accordion',
	'title'         => 'Accordion',
	'accordions'          => array(
		array(
			'title'     => 'Tab 1',
			'fields'    => array(
				array(
					'id'    => 'opt-text-1',
					'type'  => 'text',
					'title' => 'Text 1',
				),
				array(
					'id'    => 'opt-text-2',
					'type'  => 'text',
					'title' => 'Text 2',
				),
			)
		),
		array(
			'title'     => 'Tab 2',
			'fields'    => array(
				array(
					'id'    => 'opt-color-1',
					'type'  => 'color',
					'title' => 'Color 1',
				),
				array(
					'id'    => 'opt-color-2',
					'type'  => 'color',
					'title' => 'Color 2',
				),
			)
		),
	),
)

array(
	'id'            => 'opt-accordion-2',
	'type'          => 'accordion',
	'title'         => 'Accordion',
	'accordions'          => array(
		array(
			'title'     => 'Tab 1',
			'fields'    => array(
				array(
					'id'    => 'opt-text-1',
					'type'  => 'text',
					'title' => 'Text 1',
				),
				array(
					'id'    => 'opt-text-2',
					'type'  => 'text',
					'title' => 'Text 2',
				),
			)
		),
		array(
			'title'     => 'Tab 2',
			'fields'    => array(
				array(
					'id'    => 'opt-color-1',
					'type'  => 'color',
					'title' => 'Color 1',
				),
				array(
					'id'    => 'opt-color-2',
					'type'  => 'color',
					'title' => 'Color 2',
				),
			)
		),
	),

	'default'       => array(
		'opt-text-1'  => 'This is text 1 value',
		'opt-text-2'  => 'This is text 2 value',
		'opt-color-1' => '#555',
		'opt-color-2' => '#999',
	)
)
Accordion Preview:
Arguments
Name Type Default Description
id string A unique ID. This ID will be used to get the value.
type string accordion Type of the field.
title string Title of the field.
default array [] Default value from database, if the option doesn't exist.
Extras
accordions array [] An associative array containing fields for the fieldsets.
target_toggle array [] An associative array containing fields for the fieldsets.

Background

CONFIG EXAMPLES

array(
	'id'       => 'opt-back-1',
	'type'     => 'background',
	'title'    => 'Background',
	'output' => [
		'selector' => 'body .example',	
	],
)

array(
	'id'       => 'opt-back-2',
	'type'     => 'background',
	'title'    => 'Background',
	'background_image' => true,
	'background_gradient' => true,
	'default' => [
		'color' => '',
		'location' => '0',
		'color2' => '',
		'location2' => '',
		'angle' => '0',
		'type' => 'linear',
		'position' => '',
		'image' => '',
	],
	'output' => [
		'selector' => 'body .example',	
	],
)
Background Preview:
Arguments
Name Type Default Description
id string A unique ID. This ID will be used to get the value.
type string background Type of the field.
title string Title of the field.
default array [] Default value from database, if the option doesn't exist.
Extras
background_image bool true Flag to display background image of the field.
background_gradient bool true Flag to display background gradient of the field.
output array [] An associative array containing fields for the fieldsets.
target_toggle array [] An associative array containing fields for the fieldsets.
Filters
Name Description
ncode_fields_background_image_options Background Images Options
ncode_fields_background_options Gradient Background Options
ncode_fields_background_type Background Type

Backup

CONFIG EXAMPLES

array(
	'id'    => 'export_import',
	'type'    => 'backup',
	'title'   => esc_html__( 'Export & Import', 'text-domain' ),
	'desc'       => esc_html__( 'If you want to take backup your option you can backup here.', 'text-domain' ),
)
Backup Preview:
Arguments
Name Type Default Description
id string A unique ID. This ID will be used to get the value.
type string backup Type of the field.
title string Title of the field.
desc string Description of the field.

Border

CONFIG EXAMPLES

array(
	'id'          => 'opt-border-4',
	'type'        => 'border',
	'title'       => 'Border',
	'output' => [
		'selector' => 'body .example',
	],
	
)

array(
	'id'          => 'opt-border-4',
	'type'        => 'border',
	'title'       => 'Border',
	'output' => [
		'selector' => ['body .example', 'body .example1'],
	],
	'default'     => array(
		'top'       => '10',
		'right'     => '20',
		'bottom'    => '10',
		'left'      => '20',
		'unit'      => '%',
	),
	'size_units' => [ 'px', '%', 'em' ],
	'dimensions'     => array(
		'top'       => 'TOP',
		'right'     => 'RIGHT',
		'bottom'    => 'BOTTOM',
		'left'      => 'LEFT',
	),
	'allowed_dimensions' => ['top','bottom'],
	'radius_options' => true,
)
Border Preview:
Arguments
Name Type Default Description
id string opt-border-4 A unique ID. This ID will be used to get the value.
type string border Type of the field.
title string Border Title of the field.
default array [] Default value from database, if the option doesn't exist.
Extras
radius_options bool true Flag to display Border Radius of the field
size_units array ['px', '%', 'em'] Set units.
dimensions array Modify Dimensions Text.
output array [] An associative array containing fields for the fieldsets.
target_toggle array [] An associative array containing fields for the fieldsets.
Filters
Name Description
ncode_fields_border_style Set Border type
ncode_fields_border_radius_dimensions Border Radius Dimensions

Box Shadow

CONFIG EXAMPLES

array(
	'id'       => 'opt-shadow-1',
	'type'     => 'shadow',
	'title'    => 'Shadow',
	'output' => [
		'selector' => 'body .example',
		
	],
)

array(
'id'       => 'opt-shadow-2',
'type'     => 'shadow',
'title'    => 'Shadow',
'default' => [
	'color' => '',
	'horizontal' => '',
	'vertical' => '',
	'blur' => '10',
	'spread' => '',
	'type' => 'no-shadow',
],
'output' => [
	'selector' => 'body .example',
	
],

)

Box Shadow Preview:
Arguments
Name Type Default Description
id string opt-shadow-3 A unique ID. This ID will be used to get the value.
type string shadow Type of the field.
title string Shadow 2 Title of the field.
default array [] Default value from database, if the option doesn't exist.
Extras
output array [] An associative array containing fields for the fieldsets.
target_toggle array [] An associative array containing fields for the fieldsets.
Filters
Name Description
ncode_fields_shadow_options Set shadow type

Checkbox / Radio

CONFIG EXAMPLES

array(
	'id'      => 'opt-checkbox-1',
	'type'    => 'checkbox',
	'title'   => 'Checkbox',
	'options'    => array(
		'option-1' => 'Option 1',
		'option-2' => 'Option 2',
		'option-3' => 'Option 3',
	),
)

array(
	'id'      => 'opt-checkbox-2',
	'type'    => 'checkbox',
	'title'   => 'Checkbox',
	'multiple' => false,
	'options'    => array(
		'option-1' => 'Option 1',
		'option-2' => 'Option 2',
		'option-3' => 'Option 3',
	),
	'default'    => array( 'option-1', 'option-3' )
)
Checkbox Preview:
Arguments
Name Type Default Description
id string opt-checkbox-1 A unique ID. This ID will be used to get the value.
type string checkbox Type of the field.
title string Checkbox Title of the field.
Extras
default array [] Default value from database, if the option doesn't exist.
multiple bool false Set multiple checkbox (true or false).
options array [] An array of object containing key/value pairs representing the options or use a predefined options.
target_toggle array [] An associative array containing fields for the fieldsets.

Choose

CONFIG EXAMPLES

array(
	'id'      => 'opt-choose-0',
	'type'    => 'choose',
	'title'   => 'Choose',
	'options'		 => [
		'left'		 => [
			'title'	 =>esc_html__( 'Left', 'nextcode' ),
			'icon'	 => 'fa fa-align-left',
		],
		'center'	 => [
			'title'	 =>esc_html__( 'Center', 'nextcode' ),
			'icon'	 => 'fa fa-align-center',
		],
		'right'		 => [
			'title'	 =>esc_html__( 'Right', 'nextcode' ),
			'icon'	 => 'fa fa-align-right',
		],
		'justify'	 => [
			'title'	 =>esc_html__( 'Justified', 'nextcode' ),
			'icon'	 => 'fa fa-align-justify',
		],
	],
)

array(
	'id'      => 'opt-choose-2',
	'type'    => 'choose',
	'title'   => 'Choose',
	'options'		 => [
		'left'		 => [
			'title'	 =>esc_html__( 'Left', 'nextcode' ),
			'icon'	 => 'fa fa-align-left',
		],
		'center'	 => [
			'title'	 =>esc_html__( 'Center', 'nextcode' ),
			'icon'	 => 'fa fa-align-center',
		],
		'right'		 => [
			'title'	 =>esc_html__( 'Right', 'nextcode' ),
			'icon'	 => 'fa fa-align-right',
		],
		'justify'	 => [
			'title'	 =>esc_html__( 'Justified', 'nextcode' ),
			'icon'	 => 'fa fa-align-justify',
		],
	],
	'default'		 => 'center',
)
Choose Preview:
Arguments
Name Type Default Description
id string opt-choose-0 A unique ID. This ID will be used to get the value.
type string choose Type of the field.
title string Choose Title of the field.
Extras
default string center Default value from database, if the option doesn't exist.
options array [] An array of object containing key/value pairs representing the options or use a predefined options.
target_toggle array [] An associative array containing fields for the fieldsets.

Code Editor

CONFIG EXAMPLES

[
	'id'    => 'custom_css_code',
	'type'    => 'code-editor',
	'title'   => esc_html__( 'Custom Css', 'nextcode' ),
	'desc'       => esc_html__( 'Write custom css here with css selector. this css will be applied in all pages and post', 'nextcode' ),
	'settings' => array(
		'mode'        => 'css',
		'theme'       => 'dracula',
		'tabSize'     => 4,
		'smartIndent' => true,
		'autocorrect' => true,
	),
]
Code Editor Preview:
Arguments
Name Type Default Description
id string custom_css_code A unique ID. This ID will be used to get the value.
type string code-editor Type of the field.
title string Title of the field.
desc string Description of the field.
Extras
settings array [] To set the setting option.
target_toggle array [] An associative array containing fields for the fieldsets.

Color

CONFIG EXAMPLES

array(
	'id'    => 'opt-color-1',
	'type'  => 'color',
	'title' => 'Color',
)


array(
	'id'    => 'opt-color-2',
	'type'  => 'color',
	'title' => 'Color',
	'default'=> '#000000',
)

Color Preview:
Arguments
Name Type Default Description
id string opt-color-1 A unique ID. This ID will be used to get the value.
type string color Type of the field.
title string Color 1 Title of the field.

Date

CONFIG EXAMPLES

array(
	'id'       => 'opt-date-1',
	'type'     => 'date',
	'title'    => 'Date 2',
	'date_format' => 'Y-m-d',
	
)

array(
	'id'       => 'opt-date-1',
	'type'     => 'date',
	'title'    => 'Date 2',
	'date_format' => 'Y-m-d',
	'enable_time' => true,
	'no_calendar' => false,
	'alt_format' => 'Y-m-d',
	'min_date' => '',
	'max_date' => '',
	'mode' => '',
	'min_time' => '',
	'max_time' => '',
)
Date Preview:
Arguments
Name Type Default Description
id string opt-date-3 A unique ID. This ID will be used to get the value.
type string date Type of the field.
title string Date 2 Title of the field.
date_format string Y-m-d Set the date format (Y for year, m for month and d for day).
Extras
enable_time bool true Switch to enable the time (true or false).
no_calendar bool false Set the value(true or false).
alt_format string Y-m-d To change the format.
min_date string Set the minimum value for date.
max_date string Set the maximum value for date.
mode string Set the mode for date.
min_time string Set the minimum value for date.
max_time string Set the maximum value for date.

Dimensions

CONFIG EXAMPLES

array(
	'id'          => 'opt-spacing-1',
	'type'        => 'dimensions',
	'title'       => 'Spacing - dimensions',
	'output' => [
		'selector' => 'body .example',
		'render' => 'margin',
	],
	
)


array(
	'id'          => 'opt-spacing-2',
	'type'        => 'dimensions',
	'title'       => 'Spacing - dimensions',
	'output' => [
		'selector' => 'body .example',
		'render' => 'margin',
		'selectors' => [ //set css out selectors for multiple
			'body .example' => 'margin',
			'body .example' => 'padding',
		],
	],
	'default'     => array(
		'top'       => '10',
		'right'     => '20',
		'bottom'    => '10',
		'left'      => '20',
		'unit'      => '%',
	),
	'size_units' => [ 'px', '%', 'em' ],
	'dimensions'     => array(
		'top'       => 'TOP',
		'right'     => 'RIGHT',
		'bottom'    => 'BOTTOM',
		'left'      => 'LEFT',
	),
	'allowed_dimensions' => ['top','bottom']
)

Dimension Preview:
Arguments
Name Type Default Description
id string opt-spacing-4 A unique ID. This ID will be used to get the value.
type string dimensions Type of the field.
title string Spacing - dimensions Title of the field.
Extras
output array [] An associative array containing fields for the fieldsets.
default array [] Default value from database, if the option doesn't exist.
target_toggle array [] An associative array containing fields for the fieldsets.
size_units array [] Set the size units with px', '%', 'em.
dimensions array [] Set the dimension with Top, Right, Left, Bottom.
allowed_dimensions array [] Set the dimension with Top, Bottom.

Fieldset

CONFIG EXAMPLES

array(
	'id'     => 'opt-fieldset-1',
	'type'   => 'fieldset',
	'title'  => 'Fieldset',
	'fields' => array(
		array(
			'id'    => 'opt-text',
			'type'  => 'text',
			'title' => 'Text',
		),
		array(
			'id'    => 'opt-color',
			'type'  => 'textarea',
			'title' => 'Details',
		),
		array(
			'id'    => 'opt-switcher',
			'type'  => 'switcher',
			'title' => 'Switcher',
		),
	),
)


array(
	'id'     => 'opt-fieldset-1',
	'type'   => 'fieldset',
	'title'  => 'Fieldset',
	'fields' => array(
		array(
			'id'    => 'opt-text',
			'type'  => 'text',
			'title' => 'Text',
		),
		array(
			'id'    => 'opt-color',
			'type'  => 'textarea',
			'title' => 'Details',
		),
		array(
			'id'    => 'opt-switcher',
			'type'  => 'switcher',
			'title' => 'Switcher',
		),
	),
	'default'    => [
		[
			'opt-text' => 'Text 1',
			'opt-color' => '#ffffff',
			'opt-switcher' => 'Yes',
		],
	],
)

Fieldset Preview:
Arguments
Name Type Default Description
id string opt-fieldset-1 A unique ID. This ID will be used to get the value.
type string fieldset Type of the field.
title string Fieldset Title of the field.
fields array [] To set vairous fileds/labels option.
Extras
default array [] Set the default value.

Gallery

CONFIG EXAMPLES

array(
	'id'          => 'opt-gallery-3',
	'type'        => 'gallery',
	'title'       => 'Gallery',
)


array(
	'id'          => 'opt-gallery-3',
	'type'        => 'gallery',
	'title'       => 'Gallery',
	'add_title'   => 'Add',
	'edit_title'  => 'Edit',
	'clear_title' => 'Remove',
)

Gallery Preview:
Arguments
Name Type Default Description
id string opt-gallery-3 A unique ID. This ID will be used to get the value.
type string gallery Type of the field.
title string Gallery Title of the field.
add_title string Add To add to title of the fields.
edit_title string Edit To edit to title of the fields.
clear_title string Remove To remove/clear to title of the fields.

Group

CONFIG EXAMPLES

[
	'id'    => 'follow_data1',
	'type'    => 'group',
	'title'   => esc_html__( 'Follow Data', 'nextcode' ),
	'fields' => [
	
		[
			'id' => 'linkgroup',
			'type'  => 'text',
			'title' => 'Link',
		],
	
		[
			'id' => 'reitem',
			'type'  => 'repeater',
			'title' => 'Group',
			'content' => 'Group',
			'fields' => [
				[
					'id' => 'relink',
					'type'  => 'text',
					'title' => 'Link 2',
				],
				[
					'id' => 'icons',
					'type'  => 'icon',
					'title' => 'Icons',
				],
			
			],
			'title_field' => 'relink',
		],
	],
	'title_field' => 'linkgroup',
]


[
	'id'    => 'follow_data1',
	'type'    => 'group',
	'title'   => esc_html__( 'Follow Data', 'nextcode' ),
	'fields' => [
	
		[
			'id' => 'linkgroup',
			'type'  => 'text',
			'title' => 'Link',
		],
	
		[
			'id' => 'reitem',
			'type'  => 'repeater',
			'title' => 'Group',
			'content' => 'Group',
			'fields' => [
				[
					'id' => 'relink',
					'type'  => 'text',
					'title' => 'Link 2',
				],
				[
					'id' => 'icons',
					'type'  => 'icon',
					'title' => 'Icons',
				],
			
			],
			'title_field' => 'relink',
		],
	],
	'title_field' => 'linkgroup',
	'default'    => [
		[
			'linkgroup' => 'https://www.facebook.com',
		],
		[
			'linkgroup' => 'https://www.twitter.com',
		]
	],
	
]

Group Preview:
Arguments
Name Type Default Description
id string follow_data1 A unique ID. This ID will be used to get the value.
type string group Type of the field.
title string Title of the field.
fields array [] To set vairous fileds/labels option.
Extras
default array [] An associative array containing fields for the fieldsets.
title_field string linkgroup An associative array containing fields for the fieldsets.
target_toggle array [] An associative array containing fields for the fieldsets.

Heading

CONFIG EXAMPLES

[
	'id'    => 'site_name_heading',
	'type'    => 'heading',
	'content'   => esc_html__( 'General options settings', 'text-domain' ),
	'sub_content'   => esc_html__( 'Set your general theme options and control theme settings.', 'text-domain' ),
]

Heading Preview:
Arguments
Name Type Default Description
id string site_name_heading A unique ID. This ID will be used to get the value.
type string heading Type of the field.
content string Title of the field.
sub_content string To set the sub content of the fields.

Icon

CONFIG EXAMPLES

[
	'id' => 'icons',
	'type'  => 'icon',
	'title' => 'Icons',
]


[
	'id' => 'icons',
	'type'  => 'icon',
	'title' => 'Icons',
	'button_title' => 'Add Icom',
	'remove_title' => 'Remove Icom',
	'default' => '',
]

Icon Preview:
Arguments
Name Type Default Description
id string icons A unique ID. This ID will be used to get the value.
type string icon Type of the field.
title string Icons Title of the field.
Extras
default array An associative array containing fields for the fieldsets.
button_title string Add Icon Set the button title.
remove_title string Remove Icon Set the button title.

Image Select

CONFIG EXAMPLES

[
	'id'    => 'header_style',
	'type'    => 'image_select',
	'title'   => esc_html__( 'Header Style', 'text-domain' ),
	'options' => [
		'standard' => __('Standard or Link', 'text-domain'),
		'offcanvas' => __('OffCanvas  or Link', 'text-domain'),
		'responsive' => __('Responsive  or Link', 'text-domain'),
	],
]


[
	'id'    => 'header_style',
	'type'    => 'image_select',
	'title'   => esc_html__( 'Header Style', 'text-domain' ),
	'options' => [
		'standard' => __('Standard or Link', 'text-domain'),
		'offcanvas' => __('OffCanvas or Link', 'text-domain'),
		'responsive' => __('Responsive or Link', 'text-domain'),
	],
	'default'    => 'standard',
	'multiple' => false,
]

Image Select Preview:
Arguments
Name Type Default Description
id string header_style A unique ID. This ID will be used to get the value.
type string image_select Type of the field.
title string Title of the field.
options array [] Set the option value.
Extras
default string standard An associative array containing fields for the fieldsets.
multiple bool false Set multiple checkbox (true or false).

Link

CONFIG EXAMPLES

[
	'id'    => 'college_website',
	'type'    => 'link',
	'title'   => esc_html__( 'Website', 'text-domain' ),
]

[
	'id'    => 'college_website',
	'type'    => 'link',
	'title'   => esc_html__( 'Website', 'text-domain' ),
	'default'    => [ 
		'url' => '',
		'new-window' => '',
		'no-follow' => '',
	],
]
Link Preview:
Arguments
Name Type Default Description
id string college_website A unique ID. This ID will be used to get the value.
type string link Type of the field.
title string Title of the field.
default array [] An associative array containing fields for the link.

Media

CONFIG EXAMPLES

array(
	'id'      => 'opt-medai-2',
	'type'     => 'media',
	'title'    => 'Media',
)


array(
	'id'      => 'opt-medai-2',
	'type'     => 'media',
	'title'    => 'Media',
	'placeholder'  => 'http://',
	'button_icon' => 'fas fa-cloud-upload-alt',
	'remove_icon' => 'fas fa-trash-restore',
	'preview' => false,
	'default' => [
		'url' => '',
		'id' => ''
	]
)

Media Preview:
Arguments
Name Type Default Description
id string opt-medai-2 A unique ID. This ID will be used to get the value.
type string media Type of the field.
title string Media Title of the field.
Extras
placeholder string http:// To fill up the placeholder.
button_icon string fas fa-cloud-upload-alt To set the button icon.
remove_icon string fas fa-trash-restore To remove the icon from the field.
default array [] An associative array containing fields for the fieldsets.

Number

CONFIG EXAMPLES

array(
	'id'      => 'opt-slider-1',
	'type'    => 'number',
	'title'   => 'Number',
)

array(
	'id'      => 'opt-slider-2',
	'type'    => 'number',
	'title'   => 'Number',
	'min'     => 50,
	'max'     => 500,
	'step'    => 5,
	'unit'    => 'px',
	'default' => 25,
)
Number Preview:
Arguments
Name Type Default Description
id string opt-slider-4 A unique ID. This ID will be used to get the value.
type string number Type of the field.
title string Number Title of the field.
Extras string Number Title of the field.
min string 50 Set the minimum value from 50.
max string 500 Set the maximum value within 500.
step string 5 Set the step value as number.
unit string px Set the unit with pixels.
default string 25 An associative array containing fields for the fieldsets.

Repeater

CONFIG EXAMPLES

[
	'id'    => 'contact_data',
	'type'    => 'repeater',
	'title'   => esc_html__( 'Contact Data', 'text-domain' ),
	'group_name'  => '',
	'fields' => [
	
		[
			'id' => 'link',
			'type'  => 'text',
			'title' => 'Text',
		],
		
		[
			'id' => 'icon',
			'type'  => 'icon',
			'title' => 'Icons',
		],
	],
	'title_field' => 'link',
]

[
	'id'    => 'contact_data',
	'type'    => 'repeater',
	'title'   => esc_html__( 'Contact Data', 'text-domain' ),
	'group_name'  => '',
	'fields' => [
	
		[
			'id' => 'link',
			'type'  => 'text',
			'title' => 'Text',
		],
		
		[
			'id' => 'icon',
			'type'  => 'icon',
			'title' => 'Icons',
		],
	],
	'title_field' => 'link',
	'default'    => [
		[
			'link' => 'https://www.facebook.com',
			'icon' => 'fa fa facebook',
		],
		[
			'link' => 'https://www.twitter.com',
			'icon' => 'fa fa twitter',
		]
	],
]
Repeater Preview:
Arguments
Name Type Default Description
id string contact_data A unique ID. This ID will be used to get the value.
type string repeater Type of the field.
title string Title of the field.
group_name string Set the group name.
fields array Set the various fields or labels.
Extras
default array [] Set the default value.
title_field string link Set the Tab Heading.

Select

CONFIG EXAMPLES

array(
	'id'          => 'opt-select-1',
	'type'        => 'select',
	'title'       => 'Select',
	'placeholder' => 'Select an option',
	'options'     => array(
		'option-1'  => 'Option 1',
		'option-2'  => 'Option 2',
		'option-3'  => 'Option 3',
	),
	'default'     => 'option-2'
),
	  

array(
	'id'           => 'opt-select-2',
	'type'         => 'select',
	'title'        => 'Select',
	'placeholder'  => 'Select an option',
	'options'      => array(
		'Group 1'    => array(
		'option-1' => 'Option 1',
		'option-2' => 'Option 2',
		'option-3' => 'Option 3',
		),
		'Group 2'    => array(
		'option-4' => 'Option 4',
		'option-5' => 'Option 5',
		'option-6' => 'Option 6',
		),
	),
	'default'      => array( 'option-2', 'option-5' )
)

array(
	'id'          => 'opt-select-3',
	'type'        => 'select',
	'title'       => 'Select',
	'chosen'      => true,
	'placeholder' => 'Select an option',
	'options'     => array(
		'option-1'  => 'Option 1',
		'option-2'  => 'Option 2',
		'option-3'  => 'Option 3',
		'option-4'  => 'Option 4',
		'option-5'  => 'Option 5',
		'option-6'  => 'Option 6',
	),
	'default'     => 'option-3'
)
	  

array(
	'id'          => 'opt-select-4',
	'type'        => 'select',
	'title'       => 'Select',
	'chosen'      => true,
	'multiple'    => true,
	'placeholder' => 'Select an option',
	'options'     => array(
		'option-1'  => 'Option 1',
		'option-2'  => 'Option 2',
		'option-3'  => 'Option 3',
		'option-4'  => 'Option 4',
		'option-5'  => 'Option 5',
		'option-6'  => 'Option 6',
	),
	'default'     => 'option-3'
)
	  

// Select with pages
array(
	'id'          => 'opt-select-10',
	'type'        => 'select',
	'title'       => 'Select with pages',
	'placeholder' => 'Select a page',
	'options'     => 'pages',
	'query_args'  => array(
	'posts_per_page' => -1 // for get all pages (also it's same for posts).
	)
),

// Select with posts
array(
	'id'          => 'opt-select-11',
	'type'        => 'select',
	'title'       => 'Select with posts',
	'placeholder' => 'Select a post',
	'options'     => 'posts',
),

// Select with categories
array(
	'id'          => 'opt-select-12',
	'type'        => 'select',
	'title'       => 'Select with categories',
	'placeholder' => 'Select a category',
	'options'     => 'categories',
),

// Select with CPT (custom post type) pages
array(
	'id'          => 'opt-select-13',
	'type'        => 'select',
	'title'       => 'Selec with CPT (custom post type) pages',
	'placeholder' => 'Select a page',
	'options'     => 'post_types',
	'query_args'  => array(
		'post_type' => 'your_post_type_name',
	),
),

// Select with CPT (custom post type) categories
array(
	'id'          => 'opt-select-14',
	'type'        => 'select',
	'title'       => 'Selec with CPT (custom post type) category',
	'placeholder' => 'Select a category',
	'options'     => 'categories',
	'query_args'  => array(
		'taxonomy'  => 'your_taxonomy_name',
	),
),

	// Available Options
	'options' => 'pages',
	'options' => 'posts',
	'options' => 'categories',
	'options' => 'tags',
	'options' => 'menus',
	'options' => 'users',
	'options' => 'sidebars',
	'options' => 'roles',
	'options' => 'post_types',

Select Preview 1:
Select Preview 2:
Arguments
Name Type Default Description
id string opt-select-2 A unique ID. This ID will be used to get the value.
type string select Type of the field.
title string Select Title of the field.
placeholder string Select an option Fill up the placeholder field.
multiple bool true Set multiple value for the respective fields(true or false).
chosen bool true Set multiple value for the respective fields(true or false).
ajax bool false Set multiple value for the respective fields(true or false).
options array An array of object containing key/value pairs representing the options or use a predefined options.
default array Default value from database, if the option doesn't exist.

Slider

CONFIG EXAMPLES

array(
	'id'      => 'opt-slider-3',
	'type'    => 'slider',
	'title'   => 'Slider',
)

array(
	'id'      => 'opt-slider-3',
	'type'    => 'slider',
	'title'   => 'Slider',
	'min'     => 50,
	'max'     => 500,
	'step'    => 5,
	'unit'    => '%',
	'default' => 25,
)
Slider Preview:
Arguments
Name Type Default Description
id string opt-slider-3 A unique ID. This ID will be used to get the value.
type string slider Type of the field.
title string Slider Title of the field.
Extras
min string 50 Set the minimum value from 50.
max string 500 Set the maximum value within 500.
step string 5 Set the step value as number.
unit string px Set the unit with pixels.
default string 25 An associative array containing fields for the fieldsets.

Sortable

CONFIG EXAMPLES

array(
	'id'        => 'opt-sportable-1',
	'type'      => 'sortable',
	'title'     => 'Sortable',
	'fields'    => array(

		array(
			'id'    => 'text-1',
			'type'  => 'text',
			'title' => 'Text 1'
		),

		array(
			'id'    => 'text-2',
			'type'  => 'text',
			'title' => 'Text 2'
		),

	),
)
Sortable Preview:
Arguments
Name Type Default Description
id string opt-sportable-1 A unique ID. This ID will be used to get the value.
type string sortable Type of the field.
title string Sortable Title of the field.
fields array [] Set various fields or labels.

Sorter

CONFIG EXAMPLES

array(
	'id'             => 'opt-sorter-2',
	'type'           => 'sorter',
	'title'          => 'Sorter',
	'default'        => array(
	'enabled'      => array(
		'option-1'   => 'Option 1',
		'option-2'   => 'Option 2',
		'option-3'   => 'Option 3',
	),
	'disabled'     => array(
		'option-4'   => 'Option 4',
		'option-5'   => 'Option 5',
	),
	),
	'enabled_title'  => 'Activated',
	'disabled_title' => 'Deativated',
)
Sorter Preview:
Arguments
Name Type Default Description
id string opt-sorter-2 A unique ID. This ID will be used to get the value.
type string sorter Type of the field.
title string Sorter Title of the field.
default array [] Default value from database, if the option doesn't exist.

Spinner

CONFIG EXAMPLES

array(
	'id'      => 'opt-spinner-3',
	'type'    => 'spinner',
	'title'   => 'Spinner',
)

array(
	'id'      => 'opt-spinner-3',
	'type'    => 'spinner',
	'title'   => 'Spinner',
	'min'     => 0,
	'max'     => 100,
	'step'    => 10,
	'unit'    => 'px',
	'default' => 25,
)
Spinner Preview:
Arguments
Name Type Default Description
id string opt-spinner-3 A unique ID. This ID will be used to get the value.
type string spinner Type of the field.
title string Spinner Title of the field.
min string 50 Set the minimum value from 0.
max string 500 Set the maximum value within 100.
step string 10 Set the step value as number.
unit string px Set the unit with pixels.
default string 25 An associative array containing fields for the fieldsets.

Switcher

CONFIG EXAMPLES

array(
	'id'    => 'opt-switcher',
	'type'  => 'switcher',
	'title' => 'Switcher',
)

array(
	'id'    => 'opt-switcher',
	'type'  => 'switcher',
	'title' => 'Switcher',
	'label_on' => 'ON',
	'label_off' => 'OFF',
	'return_value' => 'yes',
	'default' => '',
)
Switcher Preview:
Arguments
Name Type Default Description
id string opt-switcher A unique ID. This ID will be used to get the value.
type string switcher Type of the field.
title string Switcher Title of the field.
Extras
label_on string ON Put the label on of switch
label_off string OFF Put the label off of switch
return_value string yes Get the return value of switch
default string Get the default value for the switcher

Tabs

CONFIG EXAMPLES

array(
	'id'            => 'opt-tabbed-2',
	'type'          => 'tabs',
	'title'         => 'Tabbed',
	'tabs'          => array(
	array(
		'title'     => 'Tab 1',
		'icon'      => 'fa fa-heart',
		'fields'    => array(
			array(
				'id'    => 'opt-text-1',
				'type'  => 'text',
				'title' => 'Text 1',
			),
			array(
				'id'    => 'opt-text-2',
				'type'  => 'text',
				'title' => 'Text 2',
			),
		)
	),
	array(
		'title'     => 'Tab 2',
		'icon'      => 'fa fa-star',
		'fields'    => array(
			array(
				'id'    => 'opt-color-1',
				'type'  => 'color',
				'title' => 'Color 1',
			),
			array(
				'id'    => 'opt-color-2',
				'type'  => 'color',
				'title' => 'Color 2',
			),
		)
	),
	),
)

array(
	'id'            => 'opt-tabbed-2',
	'type'          => 'tabs',
	'title'         => 'Tabbed',
	'tabs'          => array(
	array(
		'title'     => 'Tab 1',
		'icon'      => 'fa fa-heart',
		'fields'    => array(
			array(
				'id'    => 'opt-text-1',
				'type'  => 'text',
				'title' => 'Text 1',
			),
			array(
				'id'    => 'opt-text-2',
				'type'  => 'text',
				'title' => 'Text 2',
			),
		)
	),
	array(
		'title'     => 'Tab 2',
		'icon'      => 'fa fa-star',
		'fields'    => array(
			array(
				'id'    => 'opt-color-1',
				'type'  => 'color',
				'title' => 'Color 1',
			),
			array(
				'id'    => 'opt-color-2',
				'type'  => 'color',
				'title' => 'Color 2',
			),
		)
	),
	),

	'default'       => array(
		'opt-text-1'  => 'This is text 1 value',
		'opt-text-2'  => 'This is text 2 value',
		'opt-color-1' => '#555',
		'opt-color-2' => '#999',
		)
)
Tabs Preview:
Arguments
Name Type Default Description
id string opt-tabbed-2 A unique ID. This ID will be used to get the value.
type string tabs Type of the field.
title string Tabbed Title of the field.
tabs array [] Description of the field.
Extras array [] Description of the field.
default array An associative array containing fields for the fieldsets.

Text

CONFIG EXAMPLES

array(
	'id'    => 'opt-text-1',
	'type'  => 'text',
	'title' => 'Text 1',
)

array(
	'id'    => 'opt-text-1',
	'type'  => 'text',
	'title' => 'Text 1',
	'default' => '',
)
Text Preview:
Arguments
Name Type Default Description
id string opt-text-1 A unique ID. This ID will be used to get the value.
type string text Type of the field.
title string Text 1 Title of the field.
Extras
default string Set the default value of the field.

Text Area

CONFIG EXAMPLES

array(
	'id'    => 'opt-color',
	'type'  => 'textarea',
	'title' => 'Details',
)

array(
	'id'    => 'opt-color',
	'type'  => 'textarea',
	'title' => 'Details',
	'default' => '',
)
Text Area Preview:
Arguments
Name Type Default Description
id string opt-color A unique ID. This ID will be used to get the value.
type string textarea Type of the field.
title string Details Title of the field.
Extras
deafault string Set the default value of the field.

Typography

CONFIG EXAMPLES

array(
	'id'      => 'opt-typography-2',
	'type'    => 'typography',
	'title'   => 'Typography',
)

array(
	'id'      => 'opt-typography-2',
	'type'    => 'typography',
	'title'   => 'Typography',
	'default' => array(
		'font-family' => '',
		'color' => '',
		'font-size' => '',
		'font-weight' => '',
		'text-transform' => '',
		'font-style' => '',
		'text-decoration' => '',
		'line-height' => '',
		'letter-spacing' => '',
		'word-spacing' => '',
		'text-align' => '',
		'text-index' => '',
		'font-variant' => '',
	),
)
Typography Preview:
Arguments
Name Type Default Description
id string opt-typography-2 A unique ID. This ID will be used to get the value.
type string typography Type of the field.
title string Typography Title of the field.
Extras
default array [] Default value from database, if the option doesn't exist.
Filters
Name Description
ncode_fields_typography_options Get typography option.
ncode_fields_typography_fontfamily Choose desire font family.
ncode_fields_typography_texttransform Set the text transform option.
ncode_fields_typography_fontweight Choose favourite font weight unit.
ncode_fields_typography_fontstyle Set font style option.
ncode_fields_typography_textdecoration Set text decoration option.
ncode_fields_typography_fontvariant Set font variation option.
ncode_fields_typography_textalign Set the text alignment option.

Upload

CONFIG EXAMPLES

array(
	'id'           => 'opt-upload-2',
	'type'         => 'upload',
	'title'        => 'Upload',
)


array(
	'id'           => 'opt-upload-2',
	'type'         => 'upload',
	'title'        => 'Upload',
	'placeholder'  => 'http://',
	'button_title' => 'Add Image',
	'remove_title' => 'Remove Image',
)

Upload Preview:
Arguments
Name Type Default Description
id string opt-upload-2 A unique ID. This ID will be used to get the value.
type string upload Type of the field.
title string Upload Title of the field.
add_title string Add To add to title of the fields.
Extras
placeholder string http:// Fill up the placholder fields.
button_title string Add Image To set the button title field.
remove_title string Remove Image To remove/clear to title of the fields.

Wp Editor

CONFIG EXAMPLES

array(
	'id'            => 'opt-wp-editor-2',
	'type'          => 'wp_editor',
	'title'         => 'WP Editor with Custom Settings',
	'tinymce'       => true,
	'quicktags'     => true,
	'media_buttons' => true,
)

Wp Editor Preview:
Arguments
Name Type Default Description
id string opt-wp-editor-2 A unique ID. This ID will be used to get the value.
type string wp_editor Type of the field.
title string WP Editor with Custom Settings Title of the field.
tinymce bool true Set the tinymce indicator (true or false).
quicktags bool true Set the quicktags indicator (true or false).
media_buttons bool true Set the media buttons.

Others Field Params


'action' => [
	[
		'type' => 'option', // option, post, user, terms
		'key' => 'site_icon', // option key, post meta key, user meta key, terms key
		'id' => '0', // post id, user id, terms id
		'target_value' => [ // set target field
			'section' => 'section_id', // set section id
			'field' => 'field_id', // set fileds id
		], 
	]
],	

'output' => [
	//Render process 1: single render
	'selector' => '.selector-class', // set class 
	'render' => 'padding', // css render type Exm: padding, margin, border

	//Render process 1: multiple render
	'selectors' => [
		'.selector-class' => 'margin: {{TOP}}px {{RIGHT}}{{UNIT}} {{BOTTOM}}px {{LEFT}}px;',
		'.selector-class' => 'border-radius: {{TOP}}{{UNIT}} {{BOTTOM}}px {{LEFT}}px {{RIGHT}}px;',
	],
],

'target_toggle' => [
	'section' => 'section_id', // set section id
	'field' => 'field_id', // set fileds id
	'condition' => '==', // set ==, !=, === and more logicial method
	'value' => 'yes' // check value with conditional field.
]
GLOBAL Arguments
Name Type Default Description
id string A unique ID. This ID will be used to get the value.
type string Type of the field.
title string Title of the field.
default array [] An associative array containing fields for the fieldsets.
target_toggle array [] An associative array containing fields for the fieldsets.
output array [] An associative array containing fields for the fieldsets.
action array [] An associative array containing fields for the fieldsets.

Hooks #back to top

Actions

Actions
Name Description
ncode_init ---
ncode_loaded ---
ncode_enqueue_public ---
ncode_enqueue_admin ---

Filters

Filters
Name Description
ncode_fa4 ---
ncode_field_icon_add_icons ---

Release Notes

v1.0.1

  • Comment Options
  • Shortcode Options
  • Multistep form

v1.0.0

  • Initail Release