Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
<?php
$wp_customize->add_setting( 'navoption1', //Give it a SERIALIZED name (so all theme settings can live under one db record)
array(
'default' => 'drop', //Default setting/value to save
'type' => 'option', //Is this an 'option' or a 'theme_mod'?
'capability' => 'edit_theme_options', //Optional. Special permissions for accessing this setting.
'transport' => 'refresh', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?
)
);
$wp_customize->add_setting( 'stickynav', //Give it a SERIALIZED name (so all theme settings can live under one db record)
array(
'default' => 'off', //Default setting/value to save
'type' => 'option', //Is this an 'option' or a 'theme_mod'?
'capability' => 'edit_theme_options', //Optional. Special permissions for accessing this setting.
'transport' => 'refresh', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?
)
);
$wp_customize->add_setting( 'breadcrumbs', //Give it a SERIALIZED name (so all theme settings can live under one db record)
array(
'default' => 'off', //Default setting/value to save
'type' => 'option', //Is this an 'option' or a 'theme_mod'?
'capability' => 'edit_theme_options', //Optional. Special permissions for accessing this setting.
'transport' => 'refresh', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?
)
);
// Check to see if max mega menu is active
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
$maxMegaMenuActive = is_plugin_active('megamenu/megamenu.php');
// If it's not active, display some options (activating the plugin overrides everything).
if (!$maxMegaMenuActive){
$wp_customize->add_section( 'nav' , array(
'title' => 'Navigation Options',
'priority' => 30,
) );
$wp_customize->add_control('navoption1', array(
'type' => 'select',
'label' => 'Navigation Style',
'section' => 'nav',
'choices' => array(
'drop'=>'Dropdowns',
'drop-multi' => 'Multi-level Dropdowns',
'tabs'=>'Tabs'
)
)
);
$wp_customize->add_control('stickynav', array(
'type' => 'radio',
'label' => 'Sticky Navigation',
'section' => 'nav',
'choices' => array(
'on'=>'On',
'off'=>'Off'
)
)
);
$wp_customize->add_control('breadcrumbs', array(
'type' => 'radio',
'label' => 'Breadcrumbs',
'description' => 'Based off of parent/child page hierarchy. For more information view our <a target="_blank" href="http://aurora.uconn.edu/2016/12/28/page-hierarchy/">breadcrumb guide</a>.',
'section' => 'nav',
'choices' => array(
'on'=>'On',
'off'=>'Off'
)
)
);
};
?>