function editor_vars()
 {
     if (in_array(basename($_SERVER['PHP_SELF']), array('post-new.php', 'page-new.php', 'post.php', 'page.php')) && (current_user_can('edit_posts') && current_user_can('edit_pages'))) {
         // Editor buttons and JS vars.
         wp_enqueue_script('editor');
         wp_localize_script('editor', 'pluginVars', array('wpUrl' => site_url(), 'pluginUrl' => wpui_url()));
         if (!wpui_less_33('3.1')) {
             wp_enqueue_script('wpui-editor-dialog', wpui_url('/js/editor_dialog.js'), array('jquery-ui-dialog'), WPUI_VER);
             wp_enqueue_style('wp-jquery-ui-dialog');
         }
     }
 }
Beispiel #2
0
function get_wpui_default_options()
{
    $defaults = array("enable_tabs" => "on", "enable_accordion" => "on", "enable_tinymce_menu" => "on", "enable_quicktags_buttons" => "on", "enable_widgets" => "on", "single_line_tabs" => "off", "bottomnav" => "on", "enable_spoilers" => "on", "enable_dialogs" => "on", "load_all_styles" => "on", "selected_styles" => '["wpui-light","wpui-blue","wpui-red","wpui-green","wpui-dark","wpui-quark","wpui-alma","wpui-macish","wpui-redmond","wpui-sevin"]', "enable_ie_grad" => "on", "dialog_width" => "300px", "tab_scheme" => "wpui-light", "jqui_custom_themes" => "{}", "tabsfx" => "none", "fx_speed" => "400", "tabs_rotate" => "stop", "tabs_event" => "click", "collapsible_tabs" => "off", "accord_event" => "click", "accord_autoheight" => "on", "accord_collapsible" => "off", "accord_easing" => 'false', "mouse_wheel_tabs" => 'false', "tab_nav_prev_text" => 'Prev', "tab_nav_next_text" => "Next", "spoiler_show_text" => "Click to show", "spoiler_hide_text" => "Click to hide", "relative_times" => "off", "custom_css" => "", "use_cookies" => "on", "script_conditionals" => "", "load_scripts_on_demand" => "off", "linking_history" => "on", "widget_rich_text" => "off", 'title_template' => '', 'post_template_1' => '<h2 class="wpui-post-title">{$title}</h2>
		<div class="wpui-post-meta">{$date} |  {$author}</div>
		<div class="wpui-post-thumbnail">{$thumbnail}</div>
		<div class="wpui-post-content">{$excerpt}</div>
		<p class="wpui-readmore"><a class="wpui-button ui-button ui-widget ui-corner-all" href="{$url}" title="Read more from {$title}">Read More...</a></p>', 'post_template_2' => '<div class="wpui-post-meta">{$date}</div>
		<div class="wpui-post-thumbnail">{$thumbnail}</div>
		<div class="wpui-post-content">{$excerpt}</div>
		<p class="wpui-readmore"><a class="wpui-button ui-button ui-widget ui-corner-all" href="{$url}" title="Read more from {$title}">Read More...</a></p>', 'excerpt_length' => 'more', 'post_widget' => array('title' => 'We recommend', 'type' => array('popular'), 'number' => '4', 'per_row' => '4'), 'post_default_thumbnail' => array('url' => wpui_url('images/wp-light.png'), 'width' => '100', 'height' => '100'), 'post_widget_number' => '3', 'jquery_disabled' => 'on', 'cdn_jquery' => 'off', 'jquery_fx' => 'off', 'docwrite_fix' => 'on', 'alt_sc' => 'off', 'use_old_scripts' => 'off', 'use_old_widgets' => 'off', 'misc_options' => "hashing_timeout=1000", 'version' => WPUI_VER);
    if (!wpui_less_33()) {
        $defaults['tour'] = 'on';
    }
    return $defaults;
}
Beispiel #3
0
<?php

require_once dirname(__FILE__) . '/admin-options.php';
$wpui_options = get_option('wpUI_options');
$wpui_skins_list_pre = wpui_get_skins_list();
global $wpui_options_list;
// $wpui_option_page->set_sections($sects);
$wpui_options_list = array('enable_tabs' => array('id' => 'enable_tabs', 'title' => __('Tabs', 'wp-ui'), 'desc' => __('Enable', 'wp-ui'), 'section' => 'general', 'type' => 'checkbox'), 'enable_accordion' => array('id' => 'enable_accordion', 'title' => __('Accordions', 'wp-ui'), 'desc' => __('Enable', 'wp-ui'), 'section' => 'general', 'type' => 'checkbox'), 'enable_spoilers' => array('id' => 'enable_spoilers', 'title' => __('Enable Collapsibles', 'wp-ui'), 'desc' => __('Enable', 'wp-ui'), 'type' => 'checkbox', 'section' => 'general'), 'enable_dialogs' => array('id' => 'enable_dialogs', 'title' => __('Dialogs', 'wp-ui'), 'desc' => __('Enable', 'wp-ui'), 'type' => 'checkbox', 'section' => 'general'), 'enable_quicktags_buttons' => array('id' => 'enable_quicktags_buttons', 'title' => __('HTML editor buttons', 'wp-ui'), 'desc' => __('Enable', 'wp-ui'), 'section' => 'general', 'type' => 'checkbox'), 'singleLine' => array('id' => 'single_line_tabs', 'title' => __('Single Line tabs', 'wp-ui'), 'desc' => __('Tabs appear on single line, with Next/Previous buttons.', 'wp-ui'), 'type' => 'checkbox', 'section' => 'general'), 'bottomnav' => array('id' => 'bottomnav', 'title' => __('Bottom Navigation', 'wp-ui'), 'desc' => __('Show next/previous links on the bottom of all panels.', 'wp-ui'), 'type' => 'checkbox', 'section' => 'general'), 'enable_tinymce_menu' => array('id' => 'enable_tinymce_menu', 'title' => __('TinyMCE menu', 'wp-ui'), 'desc' => __('Enable', 'wp-ui'), 'section' => 'general', 'type' => 'checkbox'), 'enableWidgets' => array('id' => 'enable_widgets', 'title' => __('WP Widgets', 'wp-ui'), 'desc' => __('Enable wordpress widgets.', 'wp-ui'), 'section' => 'general', 'type' => 'checkbox'), 'enableCacheWi' => array('id' => 'enable_cache', 'title' => __('Cache images and scripts', 'wp-ui'), 'desc' => __('Uncheck to disable the cache feature for thumbnail images and scripts. ', 'wp-ui'), 'section' => 'general', 'type' => 'checkbox'), 'load_all_styless' => array('id' => 'load_all_styles', 'title' => __('Load Multiple Styles', 'wp-ui'), 'desc' => sprintf(__('Load multiple css3 styles. %1$s Select your styles %2$s', 'wp-ui'), '<a href="#" id="wpui-combine-css3-files" class="button-secondary">', '</a>'), 'type' => 'checkbox', 'section' => 'style'), 'selected_styles' => array('id' => 'selected_styles', 'title' => __('Style selection', 'wp-ui'), 'desc' => __('Select styles you want to load.', 'wp-ui'), 'section' => 'style', 'type' => 'textarea', 'textarea_size' => array('cols' => '10', 'rows' => '5', 'autocomplete' => 'off')), 'tabstyle' => array('id' => 'tab_scheme', 'title' => __('Default style<br /><small>All widgets</small>', 'wp-ui'), 'desc' => __('Select a <u>default</u> style. Shortcode argument "style" overrides.<br /> ex. <code>[wptabs style="wpui-quark"]</code>', 'wp-ui'), 'type' => 'select', 'section' => 'style', 'choices' => $wpui_skins_list_pre, 'extras' => '  ' . __('  Preview ', 'wp-ui') . '<a id="wpui_styles_preview" href="" class="button-secondary">' . __('Styles Demo', 'wp-ui') . ' </a> <br />'), 'custom_styles_path' => array('id' => 'styles_upload_dirs', 'title' => __('Custom styles upload dir.', 'wp-ui'), 'desc' => __('Input the path to scan for custom styles. If you have custom <code>wp-content</code> modifications, probably you have to change this one!', 'wp-ui'), 'type' => 'multiple', 'section' => 'style', 'fields' => array(array('id' => 'dir', 'type' => 'text', 'desc' => '', 'text_length' => '40', 'enclose' => array('before' => 'Directory path : ', 'after' => '<br />Enter the absolute filesystem path to the dir on the server.<br /><br />')), array('id' => 'url', 'type' => 'text', 'desc' => '', 'text_length' => '40', 'enclose' => array('before' => 'Directory URL : ', 'after' => '<br />Enter the URL to the same dir.<br /><br />')))), 'jqui_custom' => array('id' => 'jqui_custom_themes', 'title' => __('jQuery UI custom themes<br /><small>Manage Custom themes. Not sure? <a target="_blank" href="http://kav.in/wp-ui-using-jquery-ui-custom-themes/">follow this guide</a>.</small>'), 'desc' => '<div id="jqui_theme_list" ></div><a href="#" class="button-secondary" title="' . __('This will scan the directory wp-ui under uploads for themes.', 'wp-ui') . '" id="jqui_scan_uploads">' . __('Scan Uploads', 'wp-ui') . '</a>&nbsp;<a href="#" class="button-secondary" id="jqui_add_theme">' . __('Add a theme/style', 'wp-ui') . '</a>', 'type' => 'textarea', 'section' => 'style', 'textarea_size' => array('cols' => '60', 'rows' => '5', 'autocomplete' => 'off')), 'custom_styles' => array('id' => 'custom_css', 'title' => __('Custom CSS', 'wp-ui'), 'desc' => __('Enter additional css rules here, taking care on the CSS syntax.', 'wp-ui'), 'type' => 'textarea', 'section' => 'style', 'textarea_size' => array('cols' => '', 'rows' => '10')), 'dialog_wid' => array("id" => 'dialog_width', 'title' => __('Dialog Width', 'wp-ui'), 'desc' => __('Default width of dialogs with the suffix', 'wp-ui') . '( px | em | % )', 'type' => 'text', 'section' => 'style'), 'tabsfx' => array('id' => 'tabsfx', 'title' => __('Tabs effects', 'wp-ui'), 'desc' => __('Tabs show effect.', 'wp-ui'), 'type' => 'select', 'section' => 'effects', 'choices' => array('none' => 'None', 'slideDown' => 'Slide down', 'fadeIn' => 'Fade In')), 'fxSpeed' => array('id' => 'fx_speed', 'title' => __('Effect speed', 'wp-ui'), 'desc' => __("Enter the animation speed. Larger number - slow, smaller number - quick. Example - 200, 600, 900, 'fast', 'slow'.", 'wp-ui'), 'type' => 'text', 'section' => 'effects'), 'tabsrotate' => array('id' => 'tabs_rotate', 'title' => __('Tabs rotation', 'wp-ui'), 'desc' => __('Behavior on auto rotation. Rotation can be enabled with shortcode attribute "rotate". Example : ', 'wp-ui') . '<code>[wptabs rotate="6000"]</code> or <code>[wptabs rotate="6s"]</code>', 'type' => 'select', 'section' => 'effects', 'choices' => array('disable' => __('None', 'wp-ui'), 'always' => __('Keep rotating', 'wp-ui'), 'stop' => __('Stop on Click', 'wp-ui'))), 'tabz_event' => array('id' => 'tabs_event', 'title' => __('Tabs trigger event', 'wp-ui'), 'desc' => __('Open Tabs on click or mouseover.', 'wp-ui'), 'type' => 'select', 'section' => 'effects', 'choices' => array('click' => __('Click', 'wp-ui'), 'mouseover' => __('Mouseover', 'wp-ui'))), 'collapsible_tabbies' => array('id' => 'collapsible_tabs', 'title' => __('Collapsible Tabs', 'wp-ui'), 'desc' => __('Enable all panels in a tabset to be collapsed.', 'wp-ui'), 'type' => 'checkbox', 'section' => 'effects'), 'accord_event' => array('id' => 'accord_event', 'title' => __('Accordion trigger event', 'wp-ui'), 'desc' => __('Open accordion on click or mouseover.', 'wp-ui'), 'type' => 'select', 'section' => 'effects', 'choices' => array('click' => __('Click', 'wp-ui'), 'mouseover' => __('Mouseover', 'wp-ui'))), 'accordion_autoheight' => array('id' => 'accord_autoheight', 'title' => __('Accordion auto height', 'wp-ui'), 'desc' => __('Uniform accordion panel height.', 'wp-ui'), 'type' => 'checkbox', 'section' => 'effects'), 'collapsible_accordions' => array('id' => 'accord_collapsible', 'title' => __('Collapsible Accordions', 'wp-ui'), 'desc' => __('Enable all sections of accordion to be closed, and at load.', 'wp-ui'), 'type' => 'checkbox', 'section' => 'effects'), 'accord_Easing' => array('id' => 'accord_easing', 'title' => __('Easing for the Accordion', 'wp-ui'), 'desc' => __('Optional : easing effect on accordion animation', 'wp-ui'), 'section' => 'effects', 'type' => 'select', 'choices' => array("false" => "disable", "linear" => "linear", "swing" => "swing", "easeInQuad" => "easeInQuad", "easeOutQuad" => "easeOutQuad", "easeInOutQuad" => "easeInOutQuad", "easeInCubic" => "easeInCubic", "easeOutCubic" => "easeOutCubic", "easeInOutCubic" => "easeInOutCubic", "easeInQuart" => "easeInQuart", "easeOutQuart" => "easeOutQuart", "easeInOutQuart" => "easeInOutQuart", "easeInQuint" => "easeInQuint", "easeOutQuint" => "easeOutQuint", "easeInOutQuint" => "easeInOutQuint", "easeInSine" => "easeInSine", "easeOutSine" => "easeOutSine", "easeInOutSine" => "easeInOutSine", "easeInExpo" => "easeInExpo", "easeOutExpo" => "easeOutExpo", "easeInOutExpo" => "easeInOutExpo", "easeInCirc" => "easeInCirc", "easeOutCirc" => "easeOutCirc", "easeInOutCirc" => "easeInOutCirc", "easeInElastic" => "easeInElastic", "easeOutElastic" => "easeOutElastic", "easeInOutElastic" => "easeInOutElastic", "easeInBack" => "easeInBack", "easeOutBack" => "easeOutBack", "easeInOutBack" => "easeInOutBack", "easeInBounce" => "easeInBounce", "easeOutBounce" => "easeOutBounce", "easeInOutBounce" => "easeInOutBounce")), 'mousewheel_tabs' => array('id' => 'mouse_wheel_tabs', 'title' => __('Tabs mousewheel navigation', 'wp-ui'), 'desc' => __('Scroll and switch between tabs.', 'wp-ui'), 'section' => 'effects', 'type' => 'select', 'choices' => array("false" => "disable", "list" => "On List", "panels" => "On Panels")), 'tab_nav_prev' => array('id' => 'tab_nav_prev_text', 'title' => __('Previous tab - button text<br /><small>Tabs Navigation</small>', 'wp-ui'), 'desc' => __('Tabs previous button. Default is "Previous".', 'wp-ui'), 'section' => 'text', 'type' => 'text'), 'tab_nav_next' => array('id' => 'tab_nav_next_text', 'title' => __('Next tab - button text<br /><small>Tabs Navigation</small>', 'wp-ui'), 'desc' => __('Tabs Next button. Default is "Next". ', 'wp-ui'), 'section' => 'text', 'type' => 'text'), 'showtext' => array('id' => 'spoiler_show_text', 'title' => __('Closed WP Spoiler text', 'wp-ui'), 'desc' => __('Displayed on hovering over collapsed spoiler\'s header. Leave blank to disable.', 'wp-ui'), 'section' => 'text', 'type' => 'textarea', 'textarea_size' => array('cols' => '', 'rows' => '2')), 'hidetext' => array('id' => 'spoiler_hide_text', 'title' => __('Open WP spoiler text', 'wp-ui'), 'desc' => __('Displayed on hovering over header on open spoiler.', 'wp-ui'), 'section' => 'text', 'type' => 'textarea', 'textarea_size' => array('cols' => '', 'rows' => '2')), 'relative_timez' => array('id' => 'relative_times', 'title' => __('Relative time', 'wp-ui'), 'desc' => __('Display relative time on posts retrieved by WP UI.', 'wp-ui') . '<code>Example : 9 days ago.</code>', 'type' => 'checkbox', 'section' => 'posts'), 'excerpt_length' => array('id' => 'excerpt_length', 'title' => __('Default excerpt length', 'wp-ui'), 'desc' => __('Maximum limit for the excerpts. Default is upto the ', 'wp-ui') . ' <code>&lt;!--more--&gt;</code>', 'type' => 'text', 'section' => 'posts'), 'postss_widgets' => array('id' => 'post_widget', 'type' => 'multiple', 'title' => __('Post widget', 'wp-ui'), 'desc' => __('Popular/Recent/Random/Related posts can be shown at end of each post.', 'wp-ui'), 'section' => 'posts', 'fields' => array(array('id' => 'title', 'type' => 'textinput', 'desc' => '', 'text_length' => '40', 'enclose' => array('before' => 'Title : ', 'after' => '')), array('id' => 'type', 'type' => 'select', 'desc' => __('Type of posts shown', 'wp-ui'), 'choices' => array("popular" => __("Popular", 'wp-ui'), "recent" => __("Recent", 'wp-ui'), "related" => __('Related', 'wp-ui'), "random" => __('Random', 'wp-ui')), 'enclose' => array('before' => '   Type', 'after' => '')), array('id' => 'number', 'type' => 'textinput', 'desc' => 'Number', 'text_length' => '3', 'enclose' => array('before' => '   Number of posts', 'after' => '')), array('id' => 'per_row', 'type' => 'select', 'desc' => 'Per row', 'choices' => array(2 => ' 2 ', 3 => ' 3 ', 4 => ' 4 '), 'enclose' => array('before' => '   Per row', 'after' => '')))), 'post_widgets_image' => array('id' => 'post_default_thumbnail', 'title' => __('Default thumbnail image', 'wp-ui'), 'desc' => __('The default image in case, post thumbnail is not available.', 'wp-ui'), 'type' => 'multiple', 'section' => 'posts', 'fields' => array(array('id' => 'url', 'type' => 'upload', 'desc' => '', 'text_length' => 18, 'enclose' => array('before' => 'File : ', 'after' => '<br /><br/>')), array('id' => 'width', 'type' => 'textinput', 'text_length' => '3', 'desc' => '', 'enclose' => array('before' => 'Width : ', 'after' => '    ')), array('id' => 'height', 'type' => 'textinput', 'text_length' => '3', 'desc' => '', 'enclose' => array('before' => 'Height : ', 'after' => '<br />')))), 'title_templateu' => array('id' => 'title_template', 'title' => __('Title template', 'wp-ui') . '<br /><small>' . __('Tabs/accordion/spoiler title template.', 'wp-ui') . '</small>', 'desc' => __('Modify the template structure here. Use the variables within curled brackets. Click the top-right [help] link->Posts for reference.'), 'type' => 'textarea', 'section' => 'posts', 'textarea_size' => array('cols' => '60', 'rows' => '1', 'autocomplete' => 'off')), 'post_template_one' => array('id' => 'post_template_1', 'title' => __('Template 1', 'wp-ui') . '<br /><small>' . __('Usually the default for the Tabs and accordions on posts/feeds', 'wp-ui') . '</small>', 'desc' => __('Modify the template structure here. Use the variables within curled brackets. Click the top-right help link->Posts for reference.'), 'type' => 'textarea', 'section' => 'posts', 'textarea_size' => array('cols' => '60', 'rows' => '10', 'autocomplete' => 'off')), 'post_template_two' => array('id' => 'post_template_2', 'title' => __('Template 2', 'wp-ui') . '<br /><small>' . __('Usually the default for spoilers and dialogs', 'wp-ui') . '</small>', 'desc' => __('Modify the template structure here. Use the variables within curled brackets.'), 'type' => 'textarea', 'section' => 'posts', 'textarea_size' => array('cols' => '60', 'rows' => '10', 'autocomplete' => 'off')), 'jquery_include' => array('id' => 'cdn_jquery', 'title' => __('CDN jQuery / Compatibility mode', 'wp-ui'), 'desc' => __('Wrap load jQuery and jQuery UI Library from Google CDN. Try this first to attempt solve conflicts.', 'wp-ui'), 'type' => 'checkbox', 'section' => 'advanced'), 'script_haz_compatz' => array('id' => 'use_old_scripts', 'title' => __('Old version', 'wp-ui'), 'desc' => __('Use Old Scripts API. <b style="color : orange;">Caution : Not supported</b>', 'wp-ui'), 'type' => 'checkbox', 'section' => 'advanced'), 'widget_haz_compatz' => array('id' => 'use_old_widgets', 'title' => __('Older WP widgets.', 'wp-ui'), 'desc' => __('Use Widgets from older version of WP UI.', 'wp-ui'), 'type' => 'checkbox', 'section' => 'advanced'), 'alternative_codes' => array('id' => 'alt_sc', 'title' => __('Alternative shortcodes, Shorter.'), 'desc' => __('Use shorter codes. ', 'wp-ui') . 'ex.<br /><ul><li>[<strong>tabs</strong>] instead of [wptabs]</li><li>[<strong>tabname</strong>] instead of [wptabtitle]</li><li>[<strong>tabcont</strong>] => [wptabcontent]</li><li>[<strong>spoiler</strong>] instead of [wpspoiler]</li><li>[<strong>dialog</strong>] instead of [wpdialog]</li></ul>', 'type' => 'checkbox', 'section' => 'advanced'), 'jquery_effects_include' => array('id' => 'jquery_fx', 'title' => __('Load jQuery Effects', 'wp-ui'), 'desc' => __('This is needed if you want to use effects for tabs and dialogs. Not valid if option above is selected.', 'wp-ui'), 'type' => 'checkbox', 'section' => 'advanced'), 'script_cond' => array('id' => 'script_conditionals', 'title' => __('Conditional script load logic', 'wp-ui'), 'desc' => __('Use <a href="http://codex.wordpress.org/Conditional_Tags" title="Learn more on Wordpress conditional tags on Codex" target="_blank">wordpress conditional tags</a>  to load limit/prevent scripts from loading. <font style="" <br><strong>Examples</strong> - <br><ul style="list-style: disc inside none"> <li>To load only on single pages, input <code>is_single()</code>, similarly <code>is_front_page()</code> to load only on frontpage.</li> <li><code>!is_page()</code> disables it on all pages.</li><li>Use <code>||</code> (or) or <code>&&</code> operators to define a complex conditional clause. <code>is_single() && is_page( \'about\' ) && in_category( array( 1,2,3 ) ) </li></ul>', 'wp-ui'), 'type' => 'textarea', 'section' => 'advanced', 'textarea_size' => array('cols' => '60', 'rows' => '2')), "scripts_adv" => array('id' => 'load_scripts_on_demand', 'title' => __('Demand load scripts', 'wp-ui'), 'desc' => __('Load needed components on demand. With jQuery. This scripts are significantly newer versions than the regular ones.'), 'type' => 'checkbox', 'section' => 'advanced'), "cookies" => array('id' => 'use_cookies', 'title' => __('Use cookies for tabs', 'wp-ui'), 'desc' => __('WP UI makes use of cookies to remember the state of the selected tabs. Click here to disable the behavior. jQuery cookie plugin by Klaus Hartl.'), 'type' => 'checkbox', 'section' => 'advanced'), "link_hist" => array('id' => 'linking_history', 'title' => __('Linking and History', 'wp-ui'), 'desc' => __('Uncheck here to disable history and linking. jQuery BBQ plugin by Ben Alman.'), 'type' => 'checkbox', 'section' => 'advanced'), 'doc_write_fix' => array('id' => 'docwrite_fix', 'title' => __('Blank page fix<br /><small>document.write issue</small>', 'wp-ui'), 'desc' => __('Enable to fix the blank page issue that results when including other scripts within tabs/accordion<br> <small>Known scripts : Twitter profile widget, e-commerce widgets. </small>', 'wp-ui'), 'type' => 'checkbox', 'section' => 'advanced'), 'miscellaneous' => array('id' => 'misc_options', 'title' => __('Other options', 'wp-ui'), 'desc' => __('Newline separated options', 'wp-ui'), 'type' => 'textarea', 'section' => 'advanced', 'textarea_size' => array('cols' => '50', 'rows' => '5', 'autocomplete' => 'off')), 'sample_upload' => array('id' => 'sample_upload', 'title' => 'Sample Uploader', 'desc' => 'IAsdsdsddsdsd', 'type' => 'upload', 'section' => 'debug'), 'sample_Text' => array('id' => 'sample_text', 'title' => 'Sample textbox', 'desc' => 'Text', 'type' => 'colorpicker', 'driver' => 'iris', 'section' => 'debug'), 'sample_uploadw' => array('id' => 'sample_uploawd', 'title' => 'Sample Uploader', 'desc' => 'IAsdsdsddsdsd', 'type' => 'upload', 'section' => 'debug'), 'options_export' => array('id' => 'options_export', 'title' => __('Export options', 'wp-ui'), 'desc' => __('Download the options as a file.', 'wp-ui'), 'section' => 'advanced', 'type' => 'export'), 'options_import' => array('id' => 'options_import', 'title' => __('Import options', 'wp-ui'), 'desc' => __('Import exported options.', 'wp-ui'), 'section' => 'advanced', 'type' => 'import'));
if (!wpui_less_33()) {
    $wpui_options_list['wpui_tour'] = array('id' => 'tour', 'title' => __('View Tour', 'wp-ui'), 'desc' => __('View editor page tour to learn more about WP UI.', 'wp-ui'), 'section' => 'general', 'type' => 'checkbox');
}
add_filter('wpUI_options_title', 'wpUI_custom_options_title');
/**
 *
 */
function wpUI_custom_options_title($input)
{
    $page_title = '<h2 style="font-size : 35px;"><a href="http://kav.in"> <img width="32px" style="display: inline" src="' . plugins_url("/wp-ui/images/cap-badge.png") . '" /></a> %2$s </h2>';
    return "";
}
// END wpUI_custom_options_header.
/**
 * Like preg_grep wildcard search, but this searches keys.
 */
function preg_grep_keys($pattern, $array)
{
    if (!is_array($array)) {
        return;
    }
    $results = preg_grep($pattern, array_keys($array));
    if (empty($results)) {