5. Developer Options


In addition to changing the default options, QuadMenu allows you to set options that the user can't change from the admin panel, we've named to these settings: the Developer Options.

To define this type of options you need to add a filter in the functions.php file of your template. Remember that the options defined through this filter disappear from admin panel and can no longer be edited by the user.

5.1. Configuration Tab


You can change any of the options in this tab by adding a filter in the functions.php file of your template. Note that these options can be override by the user.

add_filter('quadmenu_developer_options', 'my_hook_developer_options_configuration', 1);

function my_hook_developer_options_configuration($options) {

    $options['quadmenu_viewport'] = 1;

    $options['quadmenu_styles'] = 1;

    $options['quadmenu_styles_normalize'] = 1;

    $options['quadmenu_styles_widgets'] = 1;

    $options['quadmenu_icons'] = 'fontawesome';

    $options['quadmenu_styles_pscrollbar'] = 1;

    return $options;
}

5.2. Responsive Tab


You can change any of the options in this tab by adding a filter in the functions.php file of your template. Note that these options will be applied to all menus.

add_filter('quadmenu_developer_options', 'my_hook_developer_options_responsive', 1);

function my_hook_developer_options_responsive($options) {

    $options['gutter'] = '30';
    $options['screen_sm_width'] = '768';
    $options['screen_md_width'] = '992';
    $options['screen_lg_width'] = '1200';

    return $options;
}

5.4. Social Tab


You can change the default social networks by adding this filter in your functions.php file.

add_filter('quadmenu_developer_options', 'my_hook_developer_options_social');

function my_hook_developer_options_social($options) {

    $options['quadmenu_social'] = array(
        array(
            'title' => 'Facebook',
            'icon' => 'fa fa-facebook-f',
            'url' => 'http://codecanyon.net/user/quadlayers/portfolio?ref=quadlayers',
        ),
        array(
            'title' => 'Twitter',
            'icon' => 'fa fa-twitter',
            'url' => 'http://codecanyon.net/user/quadlayers/portfolio?ref=quadlayers',
        ),
        array(
            'title' => 'Google Wallet',
            'icon' => 'fa fa-google-wallet',
            'url' => 'http://codecanyon.net/user/quadlayers/portfolio?ref=quadlayers',
        ),
        array(
            'title' => 'Github',
            'icon' => 'fa fa-github-alt',
            'url' => 'http://codecanyon.net/user/quadlayers/portfolio?ref=quadlayers',
        ),
        array(
            'title' => 'RSS',
            'icon' => 'fa fa-rss',
            'url' => 'http://codecanyon.net/user/quadlayers/portfolio?ref=quadlayers',
        ),
    );

    return $options;
}

5.5. Customize Tab


The easiest way to introduce some minor CSS customizations it is through the QuadMenu CSS tab. As the user can do it from the administration panel, developers can do so by adding a filter in functions.php.

<?php

add_filter('quadmenu_developer_options', 'my_hook_developer_options_css');

function my_hook_developer_options_css($css = '') {
 $css = '.custom {}'; // accepted values : valid css
 return $css;
}

5.6. Specific Theme Settings


You can change the developer options in the plugin by adding a filter in the functions.php file of your template. Note that these options will be hidden, and the user can't change it.

add_filter('quadmenu_developer_options', 'my_hook_developer_options_themes', 1);

function my_hook_developer_options_themes($options) {

	$key1 = 'custom_theme_1';

    // Layout
    // -------------------------------------------------------------------------    
    $options[$key1 . '_layout'] = 'collapse';
    $options[$key1 . '_layout_offcanvas_float'] = 'right';
    $options[$key1 . '_layout_align'] = 'right';
    $options[$key1 . '_layout_sticky'] = 1;
    $options[$key1 . '_layout_sticky_offset'] = '90';
    $options[$key1 . '_layout_separator'] = '';
    $options[$key1 . '_layout_caret'] = 'show';
    $options[$key1 . '_layout_trigger'] = 'hoverintent';
    $options[$key1 . '_layout_classes'] = 'my_class';
    $options[$key1 . '_layout_breakpoint'] = '768';
    $options[$key1 . '_layout_hover_effect'] = '';
    $options[$key1 . '_layout_current'] = '';
    $options[$key1 . '_layout_animation'] = 'quadmenu_btt';

    // Navbar
    // -------------------------------------------------------------------------    

    $options[$key1 . '_navbar_logo'] = array(
        'url' => QUADMENU_URL . 'assets/frontend/images/logo.png'
    );
    $options[$key1 . '_navbar_height'] = '60';
    $options[$key1 . '_navbar_width'] = '260';
    $options[$key1 . '_navbar_toggle_icon'] = '#ffffff';
    $options[$key1 . '_navbar_toggle_hover'] = '#444444';
    $options[$key1 . '_navbar_background'] = 'color';
    $options[$key1 . '_navbar_background_color'] = array(
        'color' => '#333333',
        'alpha' => '1'
    );
    $options[$key1 . '_navbar_background_to'] = array(
        'color' => '#000000',
        'alpha' => '1'
    );

    $options[$key1 . '_navbar_background_deg'] = '17';
    $options[$key1 . '_navbar_sharp'] = array(
        'color' => '#ffffff',
        'alpha' => '0.5'
    );
    $options[$key1 . '_navbar_text'] = '#aaaaaa';

    $options[$key1 . '_navbar_logo_bg'] = array(
        'color' => '#ffffff',
        'alpha' => '0'
    );

    $options[$key1 . '_navbar_logo_height'] = '40';
    $options[$key1 . '_navbar_link'] = '#f1f1f1';
    $options[$key1 . '_navbar_link_hover'] = '#ffffff';
    $options[$key1 . '_navbar_link_bg_hover'] = array('color' => '#111111', 'alpha' => '1');
    $options[$key1 . '_navbar_scrollbar'] = '#fb88dd';
    $options[$key1 . '_navbar_scrollbar_rail'] = '#ffffff';
    $options[$key1 . '_navbar_button'] = '#ffffff';
    $options[$key1 . '_navbar_button_bg'] = '#fb88dd';
    $options[$key1 . '_navbar_button_hover'] = '#ffffff';
    $options[$key1 . '_navbar_button_bg_hover'] = '#000000';
    $options[$key1 . '_navbar_link_hover_effect'] = array('color' => '#fb88dd', 'alpha' => '1');
    $options[$key1 . '_navbar_link_margin'] = array('border-top' => '0', 'border-right' => '0', 'border-left' => '0', 'border-bottom' => '0');
    $options[$key1 . '_navbar_link_radius'] = 0;
    $options[$key1 . '_navbar_link_transform'] = 'uppercase';
    $options[$key1 . '_navbar_link_icon'] = '#eeeeee';
    $options[$key1 . '_navbar_link_icon_hover'] = '#ffffff';
    $options[$key1 . '_navbar_link_subtitle'] = '#eeeeee';
    $options[$key1 . '_navbar_link_subtitle_hover'] = '#ffffff';
    $options[$key1 . '_navbar_badge'] = '#fb88dd';
    $options[$key1 . '_navbar_badge_color'] = '#ffffff';
    $options[$key1 . '_layout_sticky_height'] = '60';
    $options[$key1 . '_layout_sticky_background'] = array('color' => '#ffffff', 'alpha' => '0');
    $options[$key1 . '_layout_sticky_logo_height'] = '40';

    // Dropdown
    // -------------------------------------------------------------------------
    $options[$key1 . '_dropdown_margin'] = 0;
    $options[$key1 . '_dropdown_radius'] = 0;
    $options[$key1 . '_dropdown_border'] = array('border-all' => '3', 'border-top' => '0', 'border-color' => '#000000');
    $options[$key1 . '_dropdown_background'] = array('color' => '#111111', 'alpha' => '1');
    $options[$key1 . '_dropdown_scrollbar'] = '#fb88dd';
    $options[$key1 . '_dropdown_scrollbar_rail'] = '#ffffff';
    $options[$key1 . '_dropdown_title'] = '#ffffff';
    $options[$key1 . '_dropdown_title_border'] = array('border-all' => '1', 'border-top' => '1', 'border-color' => '#fb88dd', 'border-style' => 'solid');
    $options[$key1 . '_dropdown_link'] = '#cccccc';
    $options[$key1 . '_dropdown_link_hover'] = '#fb88dd';
    $options[$key1 . '_dropdown_link_bg_hover'] = array('color' => '#000000', 'alpha' => '1');
    $options[$key1 . '_dropdown_link_border'] = array('border-all' => '1', 'border-top' => '1', 'border-color' => '#000000', 'border-style' => 'solid');
    $options[$key1 . '_dropdown_link_transform'] = 'none';
    $options[$key1 . '_dropdown_button'] = '#ffffff';
    $options[$key1 . '_dropdown_button_bg'] = '#fb88dd';
    $options[$key1 . '_dropdown_button_hover'] = '#ffffff';
    $options[$key1 . '_dropdown_button_bg_hover'] = '#000000';
    $options[$key1 . '_dropdown_link_icon'] = '#fb88dd';
    $options[$key1 . '_dropdown_link_icon_hover'] = '#a9a9a9';
    $options[$key1 . '_dropdown_link_subtitle'] = '#a0a0a0';
    $options[$key1 . '_dropdown_link_subtitle_hover'] = '#cccccc';

    return $options;
}