mirror of
https://github.com/10h30/trestle.git
synced 2026-07-11 18:56:07 +09:00
Re-add missing functions.php stuff
This commit is contained in:
@@ -27,6 +27,9 @@ function trestle_theme_setup() {
|
||||
// Additional sidebars
|
||||
require_once dirname( __FILE__ ) . '/includes/sidebars/sidebars.php';
|
||||
|
||||
// Plugin activation class
|
||||
require_once dirname( __FILE__ ) . '/lib/classes/class-tgm-plugin-activation.php';
|
||||
|
||||
|
||||
/*===========================================
|
||||
* Theme Setup
|
||||
@@ -46,4 +49,8 @@ function trestle_theme_setup() {
|
||||
// Add viewport meta tag for mobile browsers
|
||||
add_theme_support( 'genesis-responsive-viewport' );
|
||||
|
||||
// Add support for footer widgets if specified in Trestle settings
|
||||
$trestle_footer_widgets_number = esc_attr( genesis_get_option( 'trestle_footer_widgets_number' ) );
|
||||
add_theme_support( 'genesis-footer-widgets', $trestle_footer_widgets_number );
|
||||
|
||||
}
|
||||
|
||||
@@ -50,21 +50,6 @@ function trestle_header_actions() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*===========================================
|
||||
* Widget Areas
|
||||
===========================================*/
|
||||
|
||||
add_action( 'widgets_init', 'trestle_register_widget_areas' );
|
||||
/**
|
||||
* Register custom widget areas
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
function trestle_register_widget_areas() {
|
||||
|
||||
}
|
||||
|
||||
/*===========================================
|
||||
* Body Classes
|
||||
===========================================*/
|
||||
|
||||
@@ -48,19 +48,20 @@ jQuery(document).ready(function() {
|
||||
target.addClass('toggle-target-' + i );
|
||||
});
|
||||
|
||||
// Toggle widget areas and primary nav
|
||||
jQuery('.site-header .toggle-button').click( function( event ) {
|
||||
event.preventDefault();
|
||||
|
||||
var button = jQuery(this);
|
||||
var targetID = button.attr('id').match(/\d+/);
|
||||
var target = jQuery( '.toggle-target-' + button.attr('id').match(/\d+/) );
|
||||
|
||||
// Toggle buttons
|
||||
button.toggleClass('open');
|
||||
jQuery('.site-header .toggle-button').not(button).removeClass('open');
|
||||
|
||||
// Toggle targets
|
||||
jQuery('.toggle-target-' + targetID).toggleClass('open');
|
||||
jQuery('[class*="toggle-target"]').not('.toggle-target-' + targetID).removeClass('open');
|
||||
target.toggleClass('open');
|
||||
jQuery('[class*="toggle-target"]').not(target).removeClass('open');
|
||||
});
|
||||
|
||||
// Mobile navigation icons
|
||||
|
||||
@@ -1,9 +1,19 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Trestle sidebar registration and functionality
|
||||
* Trestle widget area registration and functionality
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @package Trestle
|
||||
*/
|
||||
*/
|
||||
|
||||
add_action( 'widgets_init', 'trestle_register_widget_areas' );
|
||||
/**
|
||||
* Register custom widget areas
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
function trestle_register_widget_areas() {
|
||||
|
||||
}
|
||||
@@ -1360,7 +1360,6 @@ Site Header
|
||||
|
||||
.site-header .widget-area {
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
background-color: #eee;
|
||||
border: 1px solid #ddd;
|
||||
border-width: 1px 0;
|
||||
@@ -1381,13 +1380,16 @@ Site Header
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.site-header .toggle-button {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.site-header .toggle-button.open {
|
||||
color: #f15123;
|
||||
}
|
||||
|
||||
.site-header .toggle-button:before {
|
||||
content: "\f002";
|
||||
margin-left: .5em;
|
||||
font-family: FontAwesome;
|
||||
font-size: 24px;
|
||||
font-size: 2.4rem;
|
||||
|
||||
Reference in New Issue
Block a user