Skip to content

Instantly share code, notes, and snippets.

@Tmeister
Last active December 22, 2015 22:38
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 Tmeister/6540964 to your computer and use it in GitHub Desktop.
Save Tmeister/6540964 to your computer and use it in GitHub Desktop.
add_global_panel function
<?php
function add_global_panel($settings){
$settings['coolSettings'] = array(
'name' => 'Cool Settings',
'icon' => 'icon-cogs',
'opts' => array(
// Regular Options Engine
array(
'key' => 'custom_copyright',
'type' => 'text',
'title' => __('Copyright', 'customdomain'),
'label' => __('Copyright Text', 'customdomain')
),
// Regular Options Engine
array(
'key' => 'custom_phone',
'type' => 'text',
'title' => __('Phone', 'customdomain'),
'label' => __('Phone', 'customdomain')
),
)
);
// Finally we return the new array
return $settings;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment