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
require_once(get_template_directory() . "/inc/Theme-Class.php");
$theme_obj = new ThemeClass();
$theme_obj->removeAction('wp_head', 'wp_generator');
// lets load our JavaScript
$theme_obj->enqueueJS('jquery');
$theme_obj->enqueueJS('jquery-ui-core');
$theme_obj->enqueueJS('jquery-ui-accordion');
$theme_obj->enqueueJS('vendor-modernizr', get_template_directory_uri() . '/js/vendor/modernizr.js');
$theme_obj->enqueueJS('video-popup-jQuery', get_template_directory_uri() . '/js/video.popup.js');
$theme_obj->enqueueJS('foundation-jQuery', get_template_directory_uri() . '/js/foundation.min.js');
// lets load our CSS
$theme_obj->enqueueCSS('normalize-style', get_template_directory_uri() . '/css/normalize.css');
$theme_obj->enqueueCSS('foundation-style', get_template_directory_uri() . '/css/foundation.min.css');
$theme_obj->enqueueCSS('site-font-style', get_template_directory_uri() . '/css/fonts.css');
$theme_obj->enqueueCSS('site-style', get_template_directory_uri() . "/style.css");
$theme_obj->enqueueCSS('font-awesome-style', get_template_directory_uri() . '/css/font-awesome.css');
$theme_obj->enqueueCSS('jquery-ui-style', get_template_directory_uri() . '/css/jquery-ui.css');
$theme_obj->enqueueCSS('video-popup-style', get_template_directory_uri() . '/css/video.popup.css');
$theme_obj->enqueueCSS('app-style', get_template_directory_uri() . '/css/app.css');
$theme_obj->addWidget(array(
'name' => __( 'Above Branding Bar', 'independence-day' ),
'id' => 'above-brand-bar',
'description' => __( 'This widget houses the content above the branding bar', 'independence-day' ),
'before_widget' => '<div id="%1$s" class="title-area-widget %2$s row">',
'after_widget' => '</div>',
'before_title' => '',
'after_title' => '',
));
$theme_obj->addWidget(array(
'name' => __( 'Top Right Title Area', 'independence-day' ),
'id' => 'righttitlearea',
'description' => __( 'This widget houses the content in the top right of the site title bar', 'independence-day' ),
'before_widget' => '<div id="%1$s" class="title-area-widget %2$s">',
'after_widget' => '</div>',
'before_title' => '',
'after_title' => '',
));
$theme_obj->addWidget(array(
'name' => __( 'Menu Bar Area', 'independence-day' ),
'id' => 'menu-bar-area',
'description' => __( 'This widget houses the content in the menu bar', 'independence-day' ),
'before_widget' => '<div id="%1$s" class="menu-area-widget %2$s">',
'after_widget' => '</div>',
'before_title' => '',
'after_title' => '',
));
$theme_obj->addWidget(array(
'name' => __( 'Front Page Banner Area', 'independence-day' ),
'id' => 'bannerarea',
'description' => __( 'This widget houses the content in the Banner Area', 'independence-day' ),
'before_widget' => '<div id="%1$s" class="banner-area-widget %2$s long-row">',
'after_widget' => '</div>',
'before_title' => '',
'after_title' => '',
));
$theme_obj->addWidget(array(
'name' => __( 'Secondary Page Banner Area', 'independence-day' ),
'id' => 'secondary-page-bannerarea',
'description' => __( 'This widget houses the content in the Secondary Page Banner Area', 'independence-day' ),
'before_widget' => '<div id="%1$s" class="secondary-page-banner-area-widget %2$s long-row">',
'after_widget' => '</div>',
'before_title' => '',
'after_title' => '',
));
$theme_obj->addWidget(array(
'name' => __( 'Front Page Area', 'independence-day' ),
'id' => 'frontpage-area',
'description' => __( 'This widget houses the content above the footer bar', 'independence-day' ),
'before_widget' => '<div id="frontpage-area-%1$s" class="frontpage-area-widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<div class = "rss-widget-bar"><p><span>',
'after_title' => '</p></span></div>',
));
$theme_obj->addWidget(array(
'name' => __( 'Left Sidebar Area', 'independence-day' ),
'id' => 'left-sidebar-area',
'description' => __( 'This widget houses the content to left of content', 'independence-day' ),
'before_widget' => '<div id="left-sidebar-area-%1$s" class="left-sidebar-area-widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<div class = "rss-widget-bar"><p><span>',
'after_title' => '</p></span></div>',
));
$theme_obj->addWidget(array(
'name' => __( 'Subfooter Area', 'independence-day' ),
'id' => 'sub-footerarea',
'description' => __( 'This widget houses the content above the footer bar', 'independence-day' ),
'before_widget' => '<div id="sub-footerarea-%1$s" class="sub-footerarea-area-widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h2 class = "subfooter-area-title">',
'after_title' => '</h2>',
));
$theme_obj->addWidget(array(
'name' => __( 'Footer Area', 'independence-day' ),
'id' => 'footerarea',
'description' => __( 'This widget houses the content in the footer bar', 'independence-day' ),
'before_widget' => '<div id="footerarea-%1$s" class="footerarea-area-widget %2$s">',
'after_widget' => '</div>',
'before_title' => '',
'after_title' => '',
));
$theme_obj->addWidget(array(
'name' => __( 'Below Footer Area', 'independence-day' ),
'id' => 'below-footerarea',
'description' => __( 'This widget houses the content below the footer bar', 'independence-day' ),
'before_widget' => '<div id="below-footerarea-%1$s" class="below-footerarea-area-widget %2$s">',
'after_widget' => '</div>',
'before_title' => '',
'after_title' => '',
));
$theme_obj->addThemeSupport('post-thumbnails');
$theme_obj->addThemeSupport('post-formats', array('aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat'));
$theme_obj->addMenus(array(
'primary' => __( 'Primary Menu', 'independence-day' ),
'social' => __( 'Social Links Menu', 'independence-day' ),
'topmenu' => __( 'Top Menu', 'independence-day'),
'mainmenu' => __( 'Main Menu', 'independence-day'),
'leftmenu'=> __('Left Menu', 'independence-day'),
'rightmenu'=> __('Right Menu', 'independence-day'),
'subfootermenu'=> __('Sub Bottom Menu', 'independence-day'),
'footermenu'=> __('Bottom Menu', 'independence-day'),
));
// nav walker class for Foundation 5 menus
/**
* Top Bar Walker
*
* @since 1.0.0
*/
class Top_Bar_Walker extends Walker_Nav_Menu {
/**
* @see Walker_Nav_Menu::start_lvl()
* @since 1.0.0
*
* @param string $output Passed by reference. Used to append additional content.
* @param int $depth Depth of page. Used for padding.
*/
function start_lvl( &$output, $depth = 0, $args = array() ) {
$output .= "\n<ul class=\"sub-menu dropdown\">\n";
}
/**
* @see Walker_Nav_Menu::start_el()
* @since 1.0.0
*
* @param string $output Passed by reference. Used to append additional content.
* @param object $item Menu item data object.
* @param int $depth Depth of menu item. Used for padding.
* @param object $args
*/
function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 ) {
$item_html = '';
parent::start_el( $item_html, $object, $depth, $args );
$output .= ( $depth == 0 ) ? '<li class="divider"></li>' : '';
$classes = empty( $object->classes ) ? array() : ( array ) $object->classes;
if ( in_array('label', $classes) ) {
$item_html = preg_replace( '/<a[^>]*>( .* )<\/a>/iU', '<label>$1</label>', $item_html );
}
if ( in_array('divider', $classes) ) {
$item_html = preg_replace( '/<a[^>]*>( .* )<\/a>/iU', '', $item_html );
}
$output .= $item_html;
}
/**
* @see Walker::display_element()
* @since 1.0.0
*
* @param object $element Data object
* @param array $children_elements List of elements to continue traversing.
* @param int $max_depth Max depth to traverse.
* @param int $depth Depth of current element.
* @param array $args
* @param string $output Passed by reference. Used to append additional content.
* @return null Null on failure with no changes to parameters.
*/
function display_element( $element, &$children_elements, $max_depth, $depth=0, $args, &$output ) {
$element->has_children = !empty( $children_elements[$element->ID] );
$element->classes[] = ( $element->current || $element->current_item_ancestor ) ? 'active' : '';
$element->classes[] = ( $element->has_children ) ? 'has-dropdown' : '';
parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );
}
}
function list_child_pages(){}