Skip to content

Instantly share code, notes, and snippets.

@humayunahmed8
Created May 8, 2018 11:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save humayunahmed8/9c0f8344438695cfc68285182b4bec22 to your computer and use it in GitHub Desktop.
Save humayunahmed8/9c0f8344438695cfc68285182b4bec22 to your computer and use it in GitHub Desktop.
Metabox Config - Codestar Framework
<?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
// ===============================================================================================
// -----------------------------------------------------------------------------------------------
// METABOX OPTIONS
// -----------------------------------------------------------------------------------------------
// ===============================================================================================
$options = array();
// -----------------------------------------
// Post Metabox Options -
// -----------------------------------------
$options[] = array(
'id' => 'neuron_work_meta',
'title' => 'Work Options',
'post_type' => 'work',
'context' => 'normal',
'priority' => 'default',
'sections' => array(
array(
'name' => 'work_meta_setion_1',
'fields' => array(
array(
'id' => 'sub_title',
'type' => 'text',
'title' => 'Sub Title',
'desc' => 'Type your work sub title/catagory.',
),
array(
'id' => 'link_text',
'type' => 'text',
'title' => 'Link Text',
'desc' => 'Type your link text.',
'default' => 'Visit Website',
),
array(
'id' => 'link',
'type' => 'text',
'title' => 'Link',
'desc' => 'Type your link url.',
),
array(
'id' => 'informations',
'type' => 'group',
'title' => 'Work Informations',
'button_title' => 'Add New',
'accordion_title' => 'Add New Information',
'fields' => array(
array(
'id' => 'title',
'type' => 'text',
'title' => 'Information title',
),
array(
'id' => 'value',
'type' => 'text',
'title' => 'Information Value',
),
),
),
),
),
),
);
CSFramework_Metabox::instance( $options );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment