This repository has been archived by the owner. It is now read-only.
Permalink
Cannot retrieve contributors at this time
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?
cornerstone/inc/customizer-nav.php
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
79 lines (68 sloc)
2.65 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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' | |
) | |
) | |
); | |
}; | |
?> |