Commit ae0ae466 authored by obaz's avatar obaz Committed by lechuck
Browse files

Hybrid 1.2

parent 1e5fe83d
#body-container{overflow:hidden;width:960px;margin:0 auto}#container{overflow:hidden;float:left;width:960px}.content{overflow:hidden;float:left;width:620px}.no-widgets .content,.no-default-widgets .content{width:960px}#primary{position:relative;float:right;width:300px}#secondary{position:relative;clear:right;float:right;width:300px}#subsidiary{overflow:hidden}#subsidiary .widget{overflow:hidden;float:left;width:300px;margin:0 20px 0 0}#footer-container{clear:both;overflow:hidden}#footer{clear:both;overflow:hidden}
\ No newline at end of file
/**
* Two columns with content floated left.
*
* @since 0.6
* @package Hybrid
* @subpackage CSS
*/
#body-container {
overflow: hidden;
width: 960px;
margin: 0 auto;
}
#container {
overflow: hidden;
float: left;
width: 960px;
}
.content {
overflow: hidden;
float: left;
width: 620px;
}
.no-widgets .content, .no-default-widgets .content {
width: 960px;
}
#primary {
position: relative;
float: right;
width: 300px;
}
#secondary {
position: relative;
clear: right;
float: right;
width: 300px;
}
#subsidiary {
overflow: hidden;
}
#subsidiary .widget {
overflow: hidden;
float: left;
width: 300px;
margin: 0 20px 0 0;
}
#footer-container {
clear: both;
overflow: hidden;
}
#footer {
clear: both;
overflow: hidden;
}
\ No newline at end of file
#body-container{overflow:hidden;width:960px;margin:0 auto}#container{overflow:hidden;float:left;width:960px}.content{overflow:hidden;float:left;width:620px}.no-widgets .content,.no-default-widgets .content{width:960px}#primary{position:relative;float:right;width:300px}#secondary{position:relative;clear:right;float:right;width:300px}#subsidiary{overflow:hidden}#subsidiary .widget{overflow:hidden;float:left;width:300px;margin:0 20px 0 0}#footer-container{clear:both;overflow:hidden}#footer{clear:both;overflow:hidden}
\ No newline at end of file
#body-container{overflow:hidden;width:960px;margin:0 auto}#container{overflow:hidden;float:left;width:960px}.content{overflow:hidden;float:right;width:620px}.no-widgets .content,.no-default-widgets .content{width:960px}#primary{float:left;width:300px}#secondary{clear:left;float:left;width:300px}#subsidiary{overflow:hidden}#subsidiary .widget{overflow:hidden;float:left;width:300px;margin:0 20px 0 0}#footer-container{clear:both;overflow:hidden}#footer{clear:both;overflow:hidden}
\ No newline at end of file
/**
* Two columns with content floated right.
*
* @since 0.6
* @package Hybrid
* @subpackage CSS
*/
#body-container {
overflow: hidden;
width: 960px;
margin: 0 auto;
}
#container {
overflow: hidden;
float: left;
width: 960px;
}
.content {
overflow: hidden;
float: right;
width: 620px;
}
.no-widgets .content, .no-default-widgets .content {
width: 960px;
}
#primary {
float: left;
width: 300px;
}
#secondary {
clear: left;
float: left;
width: 300px;
}
#subsidiary {
overflow: hidden;
}
#subsidiary .widget {
overflow: hidden;
float: left;
width: 300px;
margin: 0 20px 0 0;
}
#footer-container {
clear: both;
overflow: hidden;
}
#footer {
clear: both;
overflow: hidden;
}
\ No newline at end of file
#body-container{overflow:hidden;width:960px;margin:0 auto}#container{overflow:hidden;float:left;width:960px}.content{overflow:hidden;float:right;width:620px}.no-widgets .content,.no-default-widgets .content{width:960px}#primary{float:left;width:300px}#secondary{clear:left;float:left;width:300px}#subsidiary{overflow:hidden}#subsidiary .widget{overflow:hidden;float:left;width:300px;margin:0 20px 0 0}#footer-container{clear:both;overflow:hidden}#footer{clear:both;overflow:hidden}
\ No newline at end of file
body{min-width:600px}#body-container{overflow:hidden;width:960px;margin:0 auto}#primary-menu{position:relative;z-index:100}#container{position:relative;clear:both;overflow:hidden;padding-left:240px; padding-right:240px; z-index:1}.no-widgets #container,.no-default-widgets #container{width:960px;padding-left:0;padding-right:0}.content,#primary,#secondary{position:relative;float:left;z-index:1}.content{width:100%}.no-widgets .content,.no-default-widgets .content{width:960px}#primary{width:220px; right:240px; margin-left:-100%}#secondary{width:220px; margin-right:-240px; margin-left:20px}* html #secondary{left:240px}#subsidiary{overflow:hidden}#subsidiary .widget{overflow:hidden;float:left;width:300px;margin:0 20px 0 0}#footer-container{clear:both;overflow:hidden}#footer{clear:both}
\ No newline at end of file
/**
* Holy Grail Stylesheet.
* Creates the Holy Grail (fixed width) of three-column layouts.
* Primary / Content / Secondary
*
* @link http://www.alistapart.com/articles/holygrail
* @author Matthew Levine
*
* @since 0.6
* @package Hybrid
* @subpackage CSS
*/
body {
min-width: 600px; /* 2x LC width + RC width */
}
#body-container {
overflow: hidden;
width: 960px;
margin: 0 auto;
}
#primary-menu {
position: relative;
z-index: 100;
}
#container {
position: relative;
clear: both;
overflow: hidden;
padding-left: 240px; /* LC width */
padding-right: 240px; /* RC width */
z-index: 1;
}
.no-widgets #container, .no-default-widgets #container {
width: 960px;
padding-left: 0;
padding-right: 0;
}
.content, #primary, #secondary {
position: relative;
float: left;
z-index: 1;
}
.content {
width: 100%;
}
.no-widgets .content, .no-default-widgets .content {
width: 960px;
}
#primary {
width: 220px; /* LC width */
right: 240px; /* LC width */
margin-left: -100%;
}
#secondary {
width: 220px; /* RC width */
margin-right: -240px; /* RC width */
margin-left: 20px;
}
/*** IE6 Fix ***/
* html #secondary {
left: 240px; /* RC width */
}
#subsidiary {
overflow: hidden;
}
#subsidiary .widget {
overflow: hidden;
float: left;
width: 300px;
margin: 0 20px 0 0;
}
#footer-container {
clear: both;
overflow: hidden;
}
#footer {
clear: both;
}
\ No newline at end of file
body{min-width:600px}#body-container{overflow:hidden;width:960px;margin:0 auto}#primary-menu{position:relative;z-index:100}#container{position:relative;clear:both;overflow:hidden;padding-left:240px; padding-right:240px; z-index:1}.no-widgets #container,.no-default-widgets #container{width:960px;padding-left:0;padding-right:0}.content,#primary,#secondary{position:relative;float:left;z-index:1}.content{width:100%}.no-widgets .content,.no-default-widgets .content{width:960px}#primary{width:220px; right:240px; margin-left:-100%}#secondary{width:220px; margin-right:-240px; margin-left:20px}* html #secondary{left:240px}#subsidiary{overflow:hidden}#subsidiary .widget{overflow:hidden;float:left;width:300px;margin:0 20px 0 0}#footer-container{clear:both;overflow:hidden}#footer{clear:both}
\ No newline at end of file
#body-container{overflow:hidden;width:960px;margin:0 auto}#container{overflow:hidden;float:left;width:960px}.content{overflow:hidden;float:left;width:520px}.no-widgets .content,.no-default-widgets .content{width:960px}#primary{overflow:hidden;float:right;width:190px}#secondary{overflow:hidden;float:right;width:190px;margin-right:20px}#subsidiary{overflow:hidden}#subsidiary .widget{overflow:hidden;float:left;width:300px;margin:0 20px 0 0}#footer-container{clear:both;overflow:hidden}#footer{clear:both}
\ No newline at end of file
/**
* Three columns with content floated left.
*
* @since 0.6
* @package Hybrid
* @subpackage CSS
*/
#body-container {
overflow: hidden;
width: 960px;
margin: 0 auto;
}
#container {
overflow: hidden;
float: left;
width: 960px;
}
.content {
overflow: hidden;
float: left;
width: 520px;
}
.no-widgets .content, .no-default-widgets .content {
width: 960px;
}
#primary {
overflow: hidden;
float: right;
width: 190px;
}
#secondary {
overflow: hidden;
float: right;
width: 190px;
margin-right: 20px;
}
#subsidiary {
overflow: hidden;
}
#subsidiary .widget {
overflow: hidden;
float: left;
width: 300px;
margin: 0 20px 0 0;
}
#footer-container {
clear: both;
overflow: hidden;
}
#footer {
clear: both;
}
\ No newline at end of file
#body-container{overflow:hidden;width:960px;margin:0 auto}#container{overflow:hidden;float:left;width:960px}.content{overflow:hidden;float:left;width:520px}.no-widgets .content,.no-default-widgets .content{width:960px}#primary{overflow:hidden;float:right;width:190px}#secondary{overflow:hidden;float:right;width:190px;margin-right:20px}#subsidiary{overflow:hidden}#subsidiary .widget{overflow:hidden;float:left;width:300px;margin:0 20px 0 0}#footer-container{clear:both;overflow:hidden}#footer{clear:both}
\ No newline at end of file
#body-container{overflow:hidden;width:960px;margin:0 auto}#container{overflow:hidden;float:left;width:960px}.content{overflow:hidden;float:right;width:520px}.no-widgets .content,.no-default-widgets .content{width:960px}#primary{overflow:hidden;float:left;width:190px}#secondary{overflow:hidden;float:left;width:190px;margin-left:20px}#subsidiary{overflow:hidden}#subsidiary .widget{overflow:hidden;float:left;width:300px;margin:0 20px 0 0}#footer-container{clear:both;overflow:hidden}#footer{clear:both}
\ No newline at end of file
/**
* Three columns with content floated left.
*
* @since 0.6
* @package Hybrid
* @subpackage CSS
*/
#body-container {
overflow: hidden;
width: 960px;
margin: 0 auto;
}
#container {
overflow: hidden;
float: left;
width: 960px;
}
.content {
overflow: hidden;
float: right;
width: 520px;
}
.no-widgets .content, .no-default-widgets .content {
width: 960px;
}
#primary {
overflow: hidden;
float: left;
width: 190px;
}
#secondary {
overflow: hidden;
float: left;
width: 190px;
margin-left: 20px;
}
#subsidiary {
overflow: hidden;
}
#subsidiary .widget {
overflow: hidden;
float: left;
width: 300px;
margin: 0 20px 0 0;
}
#footer-container {
clear: both;
overflow: hidden;
}
#footer {
clear: both;
}
\ No newline at end of file
#body-container{overflow:hidden;width:960px;margin:0 auto}#container{overflow:hidden;float:left;width:960px}.content{overflow:hidden;float:right;width:520px}.no-widgets .content,.no-default-widgets .content{width:960px}#primary{overflow:hidden;float:left;width:190px}#secondary{overflow:hidden;float:left;width:190px;margin-left:20px}#subsidiary{overflow:hidden}#subsidiary .widget{overflow:hidden;float:left;width:300px;margin:0 20px 0 0}#footer-container{clear:both;overflow:hidden}#footer{clear:both}
\ No newline at end of file
......@@ -11,7 +11,7 @@
<h1>A guide to the Hybrid theme</h1>
<p class="first"><em>Hybrid</em> is a user-friendly, search-engine optimized <em>parent theme</em>, featuring 15 custom page templates and 8 widget-ready areas, allowing you to create any type of site you want.</p>
<p class="first"><em>Hybrid</em> is a user-friendly, search-engine optimized <em>parent theme</em>, featuring 14 custom page templates and 8 widget-ready areas, allowing you to create any type of site you want.</p>
<p class="second">What this means is that the possibilities are endless. It is about rethinking how WordPress themes <em>should</em> work. It looks simple on the outside, but you can do nearly anything with enough creativity. Everyone from first-time WordPress users to advanced developers and designers can take advantage of this theme.</p>
......@@ -95,7 +95,7 @@
<p>This theme is copyrighted to <a href="http://justintadlock.com" title="Justin Tadlock">Justin Tadlock</a> and <a href="http://themehybrid.com" title="Theme Hybrid">Theme Hybrid</a>.</p>
<p>2008&thinsp;&ndash;&thinsp;2012 &copy; Justin Tadlock.</p>
<p>2008&thinsp;&ndash;&thinsp;2013 &copy; Justin Tadlock.</p>
</body>
</html>
\ No newline at end of file
......@@ -20,9 +20,9 @@
*
* @package Hybrid
* @subpackage Functions
* @version 1.1.0
* @version 1.2.0
* @author Justin Tadlock <justin@justintadlock.com>
* @copyright Copyright (c) 2008 - 2012, Justin Tadlock
* @copyright Copyright (c) 2008 - 2013, Justin Tadlock
* @link http://themehybrid.com/themes/hybrid
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
......@@ -52,8 +52,8 @@ function hybrid_theme_setup_theme() {
add_theme_support( 'hybrid-core-widgets' );
add_theme_support( 'hybrid-core-shortcodes' );
add_theme_support( 'hybrid-core-theme-settings', array( 'about', 'footer' ) );
add_theme_support( 'hybrid-core-drop-downs' );
add_theme_support( 'hybrid-core-seo' );
add_theme_support( 'hybrid-core-scripts', array( 'drop-downs' ) );
add_theme_support( 'hybrid-core-styles' );
add_theme_support( 'hybrid-core-template-hierarchy' );
add_theme_support( 'hybrid-core-deprecated' );
......@@ -163,16 +163,16 @@ function hybrid_theme_register_sidebars() {
* @since 0.9.0
*/
function hybrid_theme_body_class( $classes ) {
global $wp_query, $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome;
global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome;
/* Singular post classes (deprecated). */
if ( is_singular() ) {
if ( is_page() )
$classes[] = "page-{$wp_query->post->ID}"; // Use singular-page-ID
$classes[] = 'page-' . get_queried_object_id(); // Use singular-page-ID
elseif ( is_singular( 'post' ) )
$classes[] = "single-{$wp_query->post->ID}"; // Use singular-post-ID
$classes[] = 'single-' . get_queried_object_id(); // Use singular-post-ID
}
/* Browser detection. */
......@@ -272,10 +272,9 @@ function hybrid_navigation_links() {
* @since 0.2.1
*/
function hybrid_footer_insert() {
$footer_insert = hybrid_get_setting( 'footer_insert' );
if ( !empty( $footer_insert ) )
echo '<div class="footer-content footer-insert">' . do_shortcode( $footer_insert ) . '</div>';
echo '<div class="footer-content footer-insert">';
hybrid_footer_content();
echo '</div>';
}
/**
......@@ -286,12 +285,11 @@ function hybrid_footer_insert() {
* @since 0.9.0
*/
function hybrid_theme_remove_sidebars( $sidebars_widgets ) {
global $wp_query;
if ( is_singular() ) {
$template = get_post_meta( $wp_query->post->ID, "_wp_{$wp_query->post->post_type}_template", true );
$post = get_queried_object();
if ( 'no-widgets.php' == $template || "{$wp_query->post->post_type}-no-widgets.php" == $template )
if ( hybrid_has_post_template( 'no-widgets.php' ) || hybrid_has_post_template( "{$post->post_type}-no-widgets.php" ) )
$sidebars_widgets = array( false );
}
......
......@@ -3,12 +3,12 @@
* Theme administration functions used with other components of the framework admin. This file is for
* setting up any basic features and holding additional admin helper functions.
*
* @package HybridCore
* @package HybridCore
* @subpackage Admin
* @author Justin Tadlock <justin@justintadlock.com>
* @copyright Copyright (c) 2008 - 2012, Justin Tadlock
* @link http://themehybrid.com/hybrid-core
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* @author Justin Tadlock <justin@justintadlock.com>
* @copyright Copyright (c) 2008 - 2012, Justin Tadlock
* @link http://themehybrid.com/hybrid-core
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
/* Add the admin setup function to the 'admin_menu' hook. */
......@@ -31,6 +31,14 @@ function hybrid_admin_setup() {
/* Loads admin stylesheets for the framework. */
add_action( 'admin_enqueue_scripts', 'hybrid_admin_enqueue_styles' );
/* Add the WordPress 'Customize' page as an admin menu link. */
add_theme_page(
esc_html__( 'Customize', 'hybrid-core' ), // Settings page name
esc_html__( 'Customize', 'hybrid-core' ), // Menu name
'edit_theme_options', // Required capability
'customize.php' // File to load
);
}
/**
......@@ -57,7 +65,11 @@ function hybrid_admin_load_post_meta_boxes() {
* @return void
*/
function hybrid_admin_register_styles() {
wp_register_style( 'hybrid-core-admin', trailingslashit( HYBRID_CSS ) . 'admin.css', false, '20110512', 'screen' );
/* Use the .min stylesheet if SCRIPT_DEBUG is turned off. */
$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
wp_register_style( 'hybrid-core-admin', trailingslashit( HYBRID_CSS ) . "admin{$suffix}.css", false, '20110512', 'screen' );
}
/**
......
......@@ -5,12 +5,12 @@
* To use this feature, the theme must support the 'hybrid-core-seo' feature. The functions in this file create
* the SEO meta box and save the settings chosen by the user when the post is saved.
*
* @package HybridCore
* @package HybridCore
* @subpackage Admin
* @author Justin Tadlock <justin@justintadlock.com>
* @copyright Copyright (c) 2008 - 2012, Justin Tadlock
* @link http://themehybrid.com/hybrid-core
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* @author Justin Tadlock <justin@justintadlock.com>
* @copyright Copyright (c) 2008 - 2012, Justin Tadlock
* @link http://themehybrid.com/hybrid-core
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
/* Add the post SEO meta box on the 'add_meta_boxes' hook. */
......@@ -19,6 +19,8 @@ add_action( 'add_meta_boxes', 'hybrid_meta_box_post_remove_seo', 10, 2 );
/* Save the post SEO meta box data on the 'save_post' hook. */
add_action( 'save_post', 'hybrid_meta_box_post_save_seo', 10, 2 );
add_action( 'add_attachment', 'hybrid_meta_box_post_save_seo' );
add_action( 'edit_attachment', 'hybrid_meta_box_post_save_seo' );
/**
* Adds the post SEO meta box for all public post types.
......@@ -92,10 +94,14 @@ function hybrid_meta_box_post_display_seo( $object, $box ) {
* @param int $post_id The ID of the current post being saved.
* @param int $post The post object currently being saved.
*/
function hybrid_meta_box_post_save_seo( $post_id, $post ) {
function hybrid_meta_box_post_save_seo( $post_id, $post = '' ) {
$prefix = hybrid_get_prefix();
/* Fix for attachment save issue in WordPress 3.5. @link http://core.trac.wordpress.org/ticket/21963 */
if ( !is_object( $post ) )
$post = get_post();
/* Verify the nonce before proceeding. */
if ( !isset( $_POST['hybrid-core-post-seo'] ) || !wp_verify_nonce( $_POST['hybrid-core-post-seo'], basename( __FILE__ ) ) )
return $post_id;
......
......@@ -5,12 +5,12 @@
* functions in this file create the template meta box and save the template chosen by the user when the
* post is saved. This file is only used if the theme supports the 'hybrid-core-template-hierarchy' feature.
*
* @package HybridCore
* @package HybridCore
* @subpackage Admin
* @author Justin Tadlock <justin@justintadlock.com>
* @copyright Copyright (c) 2008 - 2012, Justin Tadlock
* @link http://themehybrid.com/hybrid-core
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* @author Justin Tadlock <justin@justintadlock.com>
* @copyright Copyright (c) 2008 - 2012, Justin Tadlock
* @link http://themehybrid.com/hybrid-core
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
/* Add the post template meta box on the 'add_meta_boxes' hook. */
......@@ -19,6 +19,8 @@ add_action( 'add_meta_boxes', 'hybrid_meta_box_post_remove_template', 10, 2 );
/* Save the post template meta box data on the 'save_post' hook. */
add_action( 'save_post', 'hybrid_meta_box_post_save_template', 10, 2 );
add_action( 'add_attachment', 'hybrid_meta_box_post_save_template' );
add_action( 'edit_attachment', 'hybrid_meta_box_post_save_temlate' );
/**
* Adds the post template meta box for all public post types, excluding the 'page' post type since WordPress
......@@ -98,7 +100,11 @@ function hybrid_meta_box_post_display_template( $object, $box ) {
* @param int $post The post object currently being saved.
* @return void|int
*/
function hybrid_meta_box_post_save_template( $post_id, $post ) {