Skip to content

Instantly share code, notes, and snippets.

@web-elite
Created March 4, 2022 12:53
Show Gist options
  • Save web-elite/f1371202a175d12633fcb58ec8945320 to your computer and use it in GitHub Desktop.
Save web-elite/f1371202a175d12633fcb58ec8945320 to your computer and use it in GitHub Desktop.
parent section or sub section or child section for codestar framework code snippet PHP
if( class_exists( 'CSF' ) ) {
$prefix = 'my_framework';
CSF::createOptions( $prefix, array(
'menu_title' => 'MyFramework',
'menu_slug' => 'my-framework',
'menu_icon' => 'dashicons-star-filled',
'framework_title' => 'MyFramework'
) );
// Create a section
CSF::createSection( $prefix, array(
'id' => 'my-settings',
'title' => 'Settings',
) );
CSF::createSection( $prefix, array(
'parent' => 'my-settings',
'title' => 'Footer',
'fields' => array(
array(
'id' => 'my-settings-footer',
'type' => 'tabbed',
'tabs' => array(
array(
'title' => 'Layout',
'fields' => array(
array(
'id' => 'my-settings-footer-layout',
'type' => 'image_select',
'options' => array(
'layout01' => 'http://img1.gif',
'layout02' => 'http://img2.gif',
'layout03' => 'http://img3.gif',
'layout04' => 'http://img4.gif',
),
'default' => 'layout01',
),
)),
))
)
) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment