Skip to content
Snippets Groups Projects
Commit 17d2edb7 authored by lucha's avatar lucha Committed by lechuck
Browse files

Updated Hybrid News theme to 0.4

parent d11ab2e1
Branches
No related tags found
No related merge requests found
<?php
/**
* Functions File
* This is your child theme functions file. In general, most PHP customizations should be placed within this
* file. Sometimes, you may have to overwrite a template file. However, you should consult the theme
* documentation and support forums before making a decision. In most cases, what you want to accomplish
* can be done from this file alone. This isn't a foreign practice introduced by parent/child themes. This is
* how WordPress works. By utilizing the functions.php file, you are both future-proofing your site and using
* a general best practice for coding.
*
* This is your child theme's functions.php file. It is here for adding custom functions and
* setting up default functionality for this child theme. You are free to modify this file in
* any way you like. Note that if you change the functions already within this file, you run
* the risk of losing theme functionality. Alter the functions below only if you know what
* you're doing.
* All style/design changes should take place within your style.css file, not this one.
*
* The functions file can be your best friend or your worst enemy. Always double-check your code to make
* sure that you close everything that you open and that it works before uploading it to a live site.
*
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
* General Public License version 2, as published by the Free Software Foundation. You may NOT assume
* that you can use any other version of the GPL.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU General Public License along with this program; if not, write
* to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* @package HybridNews
* @subpackage Functions
* @version 0.4.0
* @author Justin Tadlock <justin@justintadlock.com>
* @copyright Copyright (c) 2008 - 2011, Justin Tadlock
* @link http://themehybrid.com/themes/hybrid-news
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
/* Set up the Hybrid News child theme and its default functionality. */
add_action( 'after_setup_theme', 'hybrid_news_setup' );
add_action( 'after_setup_theme', 'hybrid_news_setup', 11 );
/**
* Adds all the default actions and filters to their appropriate hooks and sets up anything
* else needed by the theme.
*
* @since 0.3
* @since 0.3.0
*/
function hybrid_news_setup() {
......@@ -29,6 +48,9 @@ function hybrid_news_setup() {
/* Load any translation files for the user. */
load_child_theme_textdomain( 'hybrid-news', get_stylesheet_directory() );
/* Add support for the Cleaner Gallery extension. */
add_theme_support( 'cleaner-gallery' );
/* Register additional menus. */
add_action( 'init', 'hybrid_news_register_menus', 11 );
......@@ -54,16 +76,13 @@ function hybrid_news_setup() {
add_action( 'admin_menu', 'hybrid_news_create_meta_box' );
/* Save the theme settings meta box settings. */
add_action( "{$prefix}_update_settings_page", 'hybrid_news_save_meta_box' );
/* Additional arguments for the post meta box of the parent theme. */
add_filter( "{$prefix}_post_meta_box_args", 'hybrid_news_post_meta_box_args' );
add_filter( "sanitize_option_{$prefix}_theme_settings", 'hybrid_news_save_meta_box' );
}
/**
* Registers additional nav menus for use with this theme.
*
* @since 0.3
* @since 0.3.0
*/
function hybrid_news_register_menus() {
register_nav_menu( 'secondary-menu', __( 'Secondary Menu', 'hybrid-news' ) );
......@@ -72,7 +91,7 @@ function hybrid_news_register_menus() {
/**
* Loads the menu-secondary.php template, which displays the Secondary Menu.
*
* @since 0.3
* @since 0.3.0
*/
function hybrid_news_get_secondary_menu() {
locate_template( array( 'menu-secondary.php', 'menu.php' ), true );
......@@ -81,17 +100,17 @@ function hybrid_news_get_secondary_menu() {
/**
* Register additional widget areas
*
* @since 0.3
* @since 0.3.0
*/
function hybrid_news_register_sidebars() {
register_sidebar( array( 'name' => __( 'Tertiary', 'hybrid-news' ), 'id' => 'tertiary', 'before_widget' => '<div id="%1$s" class="widget %2$s widget-%2$s"><div class="widget-inside">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>' ) );
register_sidebar( array( 'name' => __( 'Utility: Header', 'hybrid-news' ), 'id' => 'utilityheader', 'before_widget' => '<div id="%1$s" class="widget %2$s widget-%2$s"><div class="widget-inside">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>' ) );
register_sidebar( array( 'name' => __( 'Tertiary', 'hybrid-news' ), 'id' => 'tertiary', 'before_widget' => '<div id="%1$s" class="widget %2$s widget-%2$s"><div class="widget-wrap widget-inside">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>' ) );
register_sidebar( array( 'name' => __( 'Utility: Header', 'hybrid-news' ), 'id' => 'utilityheader', 'before_widget' => '<div id="%1$s" class="widget %2$s widget-%2$s"><div class="widget-wrap widget-inside">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>' ) );
}
/**
* Loads the sidebar-header.php template, which loads the Utility: Header sidebar.
*
* @since 0.3
* @since 0.3.0
*/
function hybrid_news_get_utility_header() {
get_sidebar( 'header' );
......@@ -100,7 +119,7 @@ function hybrid_news_get_utility_header() {
/**
* Loads the sidebar-tertiary.php template, which displays the Tertiary sidebar.
*
* @since 0.3
* @since 0.3.0
*/
function hybrid_news_get_tertiary() {
get_sidebar( 'tertiary' );
......@@ -110,7 +129,7 @@ function hybrid_news_get_tertiary() {
* Adds JavaScript and CSS to Front Page page template.
* Also removes the breadcrumb menu.
*
* @since 0.3
* @since 0.3.0
*/
function hybrid_news_front_page_template() {
......@@ -125,60 +144,44 @@ function hybrid_news_front_page_template() {
wp_enqueue_style( 'front-page', get_stylesheet_directory_uri() . '/css/front-page.css', false, '0.1', 'screen' );
/* Remove the breadcrumb trail. */
remove_action( 'hybrid_before_content', 'hybrid_breadcrumb' );
add_filter( 'breadcrumb_trail', '__return_false' );
}
/**
* Shows an author description after the post but before the comments section on
* singular post views.
*
* @since 0.3
* @since 0.3.0
*/
function hybrid_news_author_box() { ?>
<div class="author-profile vcard">
<?php echo get_avatar( get_the_author_email(), '96' ); ?>
<?php echo get_avatar( get_the_author_meta( 'email' ), '96' ); ?>
<h4 class="author-name fn n"><?php the_author_posts_link(); ?></h4>
<?php the_author_meta( 'description' ); ?>
<?php echo wpautop( get_the_author_meta( 'description' ) ); ?>
</div><?php
}
/**
* Adds a medium/feature image setting to the post meta box.
*
* @since 0.3
*/
function hybrid_news_post_meta_box_args( $meta_boxes ) {
$meta_boxes['medium'] = array( 'name' => 'Medium', 'default' => '', 'title' => __( 'Medium/Feature:', 'hybrid-news' ), 'type' => 'text', 'show_description' => false, 'description' => false );
return $meta_boxes;
}
/**
* Saves the theme settings for Hybrid News if the user has added any.
*
* @since 0.3
* @since 0.3.0
*/
function hybrid_news_save_meta_box() {
/* Verify the nonce, so we know this is secure. */
if ( !wp_verify_nonce( $_POST['front_page_meta_box_nonce'], basename( __FILE__ ) ) )
return false;
function hybrid_news_save_meta_box( $settings ) {
$settings = get_option( 'hybrid_news_theme_settings' );
$settings['feature_category'] = empty( $settings['feature_category'] ) ? '' : absint( $settings['feature_category'] );
$settings['excerpt_category'] = empty( $settings['excerpt_category'] ) ? '' : absint( $settings['excerpt_category'] );
$settings['feature_num_posts'] = empty( $settings['feature_num_posts'] ) ? 3 : absint( $settings['feature_num_posts'] );
$settings['excerpt_num_posts'] = empty( $settings['excerpt_num_posts'] ) ? 3 : absint( $settings['excerpt_num_posts'] );
$settings['headlines_num_posts'] = empty( $settings['headlines_num_posts'] ) ? 5 : absint( $settings['headlines_num_posts'] );
$settings['headlines_category'] = empty( $settings['headlines_category'] ) || !is_array( $settings['headlines_category'] ) ? '' : $settings['headlines_category'];
$settings['feature_category'] = absint( $_POST['feature_category'] );
$settings['excerpt_category'] = absint( $_POST['excerpt_category'] );
$settings['feature_num_posts'] = absint( $_POST['feature_num_posts'] );
$settings['excerpt_num_posts'] = absint( $_POST['excerpt_num_posts'] );
$settings['headlines_num_posts'] = absint( $_POST['headlines_num_posts'] );
$settings['headlines_category'] = (array)$_POST['headlines_category'];
$updated = update_option( 'hybrid_news_theme_settings', $settings );
return $settings;
}
/**
* Adds a meta box to the theme settings page in the admin.
*
* @since 0.3
* @since 0.3.0
*/
function hybrid_news_create_meta_box() {
add_meta_box( 'hybrid-news-front-page-box', __( 'Front Page template settings', 'hybrid-news' ), 'hybrid_news_front_page_meta_box', 'appearance_page_theme-settings', 'normal', 'low' );
......@@ -187,70 +190,67 @@ function hybrid_news_create_meta_box() {
/**
* Outputs the meta box and its form for the theme settings page.
*
* @since 0.3
* @since 0.3.0
*/
function hybrid_news_front_page_meta_box() {
$categories = get_categories();
$settings = get_option( 'hybrid_news_theme_settings' ); ?>
<input type="hidden" name="front_page_meta_box_nonce" value="<?php echo wp_create_nonce( basename( __FILE__ ) ); ?>" />
$categories = get_categories(); ?>
<table class="form-table">
<tr>
<th><label for="feature_category"><?php _e( 'Feature Category:', 'hybrid-news' ); ?></label></th>
<th><label for="<?php echo hybrid_settings_field_id( 'feature_category' ); ?>"><?php _e( 'Feature Category:', 'hybrid-news' ); ?></label></th>
<td>
<select id="feature_category" name="feature_category">
<option value="" <?php selected( $settings['feature_category'], '' ); ?>></option>
<select id="<?php echo hybrid_settings_field_id( 'feature_category' ); ?>" name="<?php echo hybrid_settings_field_name( 'feature_category' ); ?>">
<option value="" <?php selected( hybrid_get_setting( 'feature_category' ), '' ); ?>></option>
<?php foreach ( $categories as $cat ) { ?>
<option value="<?php echo $cat->term_id; ?>" <?php selected( $settings['feature_category'], $cat->term_id ); ?>><?php echo esc_html( $cat->name ); ?></option>
<option value="<?php echo $cat->term_id; ?>" <?php selected( hybrid_get_setting( 'feature_category' ), $cat->term_id ); ?>><?php echo esc_html( $cat->name ); ?></option>
<?php } ?>
</select>
<?php _e( 'Leave blank to use sticky posts.', 'hybrid-news' ); ?>
</td>
</tr>
<tr>
<th><label for="feature_num_posts"><?php _e( 'Featured Posts:', 'hybrid-news' ); ?></label></th>
<th><label for="<?php echo hybrid_settings_field_id( 'feature_num_posts' ); ?>"><?php _e( 'Featured Posts:', 'hybrid-news' ); ?></label></th>
<td>
<input type="text" id="feature_num_posts" name="feature_num_posts" value="<?php echo esc_attr( $settings['feature_num_posts'] ); ?>" size="2" maxlength="2" />
<label for="feature_num_posts"><?php _e( 'How many feature posts should be shown?', 'hybrid-news' ); ?></label>
<input type="text" id="<?php echo hybrid_settings_field_id( 'feature_num_posts' ); ?>" name="<?php echo hybrid_settings_field_name( 'feature_num_posts' ); ?>" value="<?php echo esc_attr( hybrid_get_setting( 'feature_num_posts' ) ); ?>" size="2" maxlength="2" />
<label for="<?php echo hybrid_settings_field_id( 'feature_num_posts' ); ?>"><?php _e( 'How many feature posts should be shown?', 'hybrid-news' ); ?></label>
</td>
</tr>
<tr>
<th><label for="excerpt_category"><?php _e( 'Excerpts Category:', 'hybrid-news' ); ?></label></th>
<th><label for="<?php echo hybrid_settings_field_id( 'excerpt_category' ); ?>"><?php _e( 'Excerpts Category:', 'hybrid-news' ); ?></label></th>
<td>
<select id="excerpt_category" name="excerpt_category">
<option value="" <?php selected( $settings['excerpt_category'], '' ); ?>></option>
<?php foreach( $categories as $cat ) { ?>
<option value="<?php echo $cat->term_id; ?>" <?php selected( $settings['excerpt_category'], $cat->term_id ); ?>><?php echo esc_html( $cat->name ); ?></option>
<?php } ?>
<select id="<?php echo hybrid_settings_field_id( 'excerpt_category' ); ?>" name="<?php echo hybrid_settings_field_name( 'excerpt_category' ); ?>">
<option value="" <?php selected( hybrid_get_setting( 'excerpt_category' ), '' ); ?>></option>
<?php foreach( $categories as $cat ) { ?>
<option value="<?php echo $cat->term_id; ?>" <?php selected( hybrid_get_setting( 'excerpt_category' ), $cat->term_id ); ?>><?php echo esc_html( $cat->name ); ?></option>
<?php } ?>
</select>
</td>
</tr>
<tr>
<th><label for="excerpt_num_posts"><?php _e( 'Excerpts Posts:', 'hybrid-news' ); ?></label></th>
<th><label for="<?php echo hybrid_settings_field_id( 'excerpt_num_posts' ); ?>"><?php _e( 'Excerpts Posts:', 'hybrid-news' ); ?></label></th>
<td>
<input type="text" id="excerpt_num_posts" name="excerpt_num_posts" value="<?php echo esc_attr( $settings['excerpt_num_posts'] ); ?>" size="2" maxlength="2" />
<label for="excerpt_num_posts"><?php _e('How many excerpts should be shown?', 'hybrid-news' ); ?></label>
<input type="text" id="<?php echo hybrid_settings_field_id( 'excerpt_num_posts' ); ?>" name="<?php echo hybrid_settings_field_name( 'excerpt_num_posts' ); ?>" value="<?php echo esc_attr( hybrid_get_setting( 'excerpt_num_posts' ) ); ?>" size="2" maxlength="2" />
<label for="<?php echo hybrid_settings_field_id( 'excerpt_num_posts' ); ?>"><?php _e('How many excerpts should be shown?', 'hybrid-news' ); ?></label>
</td>
</tr>
<tr>
<th><label for="headlines_category"><?php _e( 'Headline Categories:', 'hybrid-news' ); ?></label></th>
<th><label for="<?php echo hybrid_settings_field_id( 'headlines_category' ); ?>"><?php _e( 'Headline Categories:', 'hybrid-news' ); ?></label></th>
<td>
<label for="headlines_category"><?php _e( 'Multiple categories may be chosen by holding the <code>Ctrl</code> key and selecting.', 'hybrid-news' ); ?></label>
<label for="<?php echo hybrid_settings_field_id( 'headlines_category' ); ?>"><?php _e( 'Multiple categories may be chosen by holding the <code>Ctrl</code> key and selecting.', 'hybrid-news' ); ?></label>
<br />
<select id="headlines_category" name="headlines_category[]" multiple="multiple" style="height:150px;">
<select id="<?php echo hybrid_settings_field_id( 'headlines_category' ); ?>" name="<?php echo hybrid_settings_field_name( 'headlines_category' ); ?>[]" multiple="multiple" style="height:150px;">
<?php foreach( $categories as $cat ) { ?>
<option value="<?php echo $cat->term_id; ?>" <?php if( is_array( $settings['headlines_category'] ) && in_array( $cat->term_id, $settings['headlines_category'] ) ) echo ' selected="selected"'; ?>><?php echo esc_html( $cat->name ); ?></option>
<option value="<?php echo $cat->term_id; ?>" <?php if ( is_array( hybrid_get_setting( 'headlines_category' ) ) && in_array( $cat->term_id, hybrid_get_setting( 'headlines_category' ) ) ) echo ' selected="selected"'; ?>><?php echo esc_html( $cat->name ); ?></option>
<?php } ?>
</select>
</td>
</tr>
<tr>
<th><label for="headlines_num_posts"><?php _e('Headlines Posts:', 'hybrid-news' ); ?></label></th>
<th><label for="<?php echo hybrid_settings_field_id( 'headlines_num_posts' ); ?>"><?php _e('Headlines Posts:', 'hybrid-news' ); ?></label></th>
<td>
<input type="text" id="headlines_num_posts" name="headlines_num_posts" value="<?php echo esc_attr( $settings['headlines_num_posts'] ); ?>" size="2" maxlength="2" />
<label for="headlines_num_posts"><?php _e( 'How many posts should be shown per headline category?', 'hybrid-news' ); ?></label>
<input type="text" id="<?php echo hybrid_settings_field_id( 'headlines_num_posts' ); ?>" name="<?php echo hybrid_settings_field_name( 'headlines_num_posts' ); ?>" value="<?php echo esc_attr( hybrid_get_setting( 'headlines_num_posts' ) ); ?>" size="2" maxlength="2" />
<label for="<?php echo hybrid_settings_field_id( 'headlines_num_posts' ); ?>"><?php _e( 'How many posts should be shown per headline category?', 'hybrid-news' ); ?></label>
</td>
</tr>
......
This diff is collapsed.
File added
msgid ""
msgstr ""
"Project-Id-Version: Hybrid News Child Theme\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-07-06 18:36-0600\n"
"PO-Revision-Date: 2010-07-25 19:40+0100\n"
"Last-Translator: Thomas Clausen <thomas@trendminers.dk>\n"
"Language-Team: ThemeHybrid\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-KeywordsList: _e;__;esc_attr_e;esc_attr__;esc_html_e;esc_html__;_x;_ex;esc_attr_x;esc_html_x;_n;_nx;_n_noop;_nx_noop\n"
"X-Poedit-Basepath: ../\n"
"X-Poedit-SearchPath-0: .\n"
#: functions.php:69
msgid "Secondary Menu"
msgstr "Sekundær menu"
#: functions.php:87
msgid "Tertiary"
msgstr "tertiær"
#: functions.php:88
msgid "Utility: Header"
msgstr "Utility: Header"
#: functions.php:151
msgid "Medium/Feature:"
msgstr "Medium/fremhævet:"
#: functions.php:184
msgid "Front Page template settings"
msgstr "Forside skabelonsindstillinger"
#: functions.php:201
msgid "Feature Category:"
msgstr "Fremhævet kategori:"
#: functions.php:209
msgid "Leave blank to use sticky posts."
msgstr "Efterlad blank, for at bruge klistre indlæg."
#: functions.php:213
msgid "Featured Posts:"
msgstr "Fremhævede indlæg:"
#: functions.php:216
msgid "How many feature posts should be shown?"
msgstr "Hvor mange fremhævede indlæg skal vises?"
#: functions.php:220
msgid "Excerpts Category:"
msgstr "Uddragskategori:"
#: functions.php:231
msgid "Excerpts Posts:"
msgstr "Uddragindlæg:"
#: functions.php:234
msgid "How many excerpts should be shown?"
msgstr "Hvor mange uddrag skal vises?"
#: functions.php:238
msgid "Headline Categories:"
msgstr "Overskriftskategorier:"
#: functions.php:240
msgid "Multiple categories may be chosen by holding the <code>Ctrl</code> key and selecting."
msgstr "Flere kategorier kan vælges ved at klikke på <code>Ctrl</code> og klikke på kategorierne."
#: functions.php:250
msgid "Headlines Posts:"
msgstr "Overskriftsindlæg:"
#: functions.php:253
msgid "How many posts should be shown per headline category?"
msgstr "Hvor mange overskriftsindlæg skal vises?"
#: page-front-page.php:42
msgid "Full Story &raquo;"
msgstr "Hele indlæget &raquo;"
#: page-front-page.php:54
msgid "Previous Post"
msgstr "Forrige indlæg"
#: page-front-page.php:54
msgid "Previous"
msgstr "Forrige"
#: page-front-page.php:55
msgid "Pause"
msgstr "Pause"
#: page-front-page.php:56
msgid "Next Post"
msgstr "Næste indlæg"
#: page-front-page.php:56
msgid "Next"
msgstr "Næste"
......@@ -8,14 +8,11 @@
* @subpackage Template
*/
/* Get the Hybrid News theme settings. */
$hybrid_news = get_option( 'hybrid_news_theme_settings' );
get_header(); ?>
<div class="hfeed content">
<?php hybrid_before_content(); // Before content hook ?>
<?php do_atomic( 'before_content' ); // Before content hook ?>
<!-- Begin feature slider. -->
<div id="slider-container">
......@@ -23,10 +20,10 @@ get_header(); ?>
<div id="slider">
<?php
if ( $hybrid_news['feature_category'] )
$feature_query = array( 'cat' => $hybrid_news['feature_category'], 'showposts' => $hybrid_news['feature_num_posts'], 'caller_get_posts' => 1 );
if ( hybrid_get_setting( 'feature_category' ) )
$feature_query = array( 'cat' => hybrid_get_setting( 'feature_category' ), 'showposts' => hybrid_get_setting( 'feature_num_posts' ), 'ignore_sticky_posts' => true );
else
$feature_query = array( 'post__in' => get_option( 'sticky_posts' ), 'showposts' => $hybrid_news['feature_num_posts'] );
$feature_query = array( 'post__in' => get_option( 'sticky_posts' ), 'showposts' => hybrid_get_setting( 'feature_num_posts' ) );
?>
<?php $loop = new WP_Query( $feature_query ); ?>
......@@ -35,16 +32,16 @@ get_header(); ?>
<div class="<?php hybrid_entry_class( 'feature' ); ?>">
<?php get_the_image( array( 'custom_key' => array( 'Medium', 'Feature Image' ), 'size' => 'medium' ) ); ?>
<?php get_the_image( array( 'meta_key' => array( 'Medium', 'Feature Image' ), 'size' => 'medium' ) ); ?>
<?php hybrid_before_entry(); ?>
<?php do_atomic( 'before_entry' ); ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
<a class="more-link" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php _e('Full Story &raquo;', 'news'); ?></a>
<a class="more-link" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php _e( 'Full Story &raquo;', 'hybrid-news' ); ?></a>
</div>
<?php hybrid_after_entry(); ?>
<?php do_atomic( 'after_entry' ); ?>
</div>
......@@ -64,21 +61,21 @@ get_header(); ?>
<!-- Begin excerpts section. -->
<div id="excerpts">
<?php $loop = new WP_Query( array( 'cat' => $hybrid_news['excerpt_category'], 'showposts' => $hybrid_news['excerpt_num_posts'], 'caller_get_posts' => 1, 'post__not_in' => $do_not_duplicate ) ); ?>
<?php $loop = new WP_Query( array( 'cat' => hybrid_get_setting( 'excerpt_category' ), 'showposts' => hybrid_get_setting( 'excerpt_num_posts' ), 'ignore_sticky_posts' => true, 'post__not_in' => $do_not_duplicate ) ); ?>
<?php while ( $loop->have_posts() ) : $loop->the_post(); $do_not_duplicate[] = $post->ID; ?>
<div class="<?php hybrid_entry_class(); ?>">
<?php get_the_image( array( 'custom_key' => array( 'Thumbnail' ), 'size' => 'thumbnail' ) ); ?>
<?php get_the_image( array( 'meta_key' => 'Thumbnail', 'size' => 'thumbnail' ) ); ?>
<?php hybrid_before_entry(); ?>
<?php do_atomic( 'before_entry' ); ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div>
<?php hybrid_after_entry(); ?>
<?php do_atomic( 'after_entry' ); ?>
</div>
......@@ -87,15 +84,17 @@ get_header(); ?>
</div>
<!-- End excerpts section. -->
<?php if ( !empty( $hybrid_news['headlines_category'] ) ) : $alt = 'odd'; ?>
<?php $categories = hybrid_get_setting( 'headlines_category' ); ?>
<?php if ( !empty( $categories ) ) : $i = 0; $alt = 'odd'; ?>
<!-- Begin category headlines section. -->
<div id="headlines">
<?php foreach ( $hybrid_news['headlines_category'] as $category ) : ?>
<?php foreach ( $categories as $category ) : ?>
<?php $headlines = get_posts( array(
'numberposts' => $hybrid_news['headlines_num_posts'],
'numberposts' => hybrid_get_setting( 'headlines_num_posts' ),
'category' => $category,
'post__not_in' => $do_not_duplicate
) ); ?>
......@@ -127,9 +126,9 @@ get_header(); ?>
<?php endif; // End check if headline categories were selected. ?>
<?php hybrid_after_singular(); // After singular hook ?>
<?php do_atomic( 'after_singular' ); // After singular hook ?>
<?php hybrid_after_content(); // After content hook ?>
<?php do_atomic( 'after_content' ); // After content hook ?>
</div><!-- .content .hfeed -->
......
......@@ -14,7 +14,7 @@
<p><em>Hybrid News</em> is, quite simply, a news theme.</p>
<p>It is a child theme for the <a href="http://themehybrid.com/themes/hybrid" title="Hybrid WordPress theme">Hybrid theme framework</a>, which means you must have <em>Hybrid</em> installed to use <em>Hybrid News</em>. Don't worry. Just because it uses a framework doesn't mean it's complicated. It just means that your site will be a lot more powerful and all you have to do is have <em>Hybrid</em> installed.</p>
<p>It is a child theme for the <a href="http://themehybrid.com/themes/hybrid" title="Hybrid WordPress theme">Hybrid parent theme</a>, which means you must have <em>Hybrid</em> installed to use <em>Hybrid News</em>. Don't worry. Just because it uses a parent theme doesn't mean it's complicated. It just means that your site will be a lot more powerful and all you have to do is have <em>Hybrid</em> installed.</p>
<p>Nothing more. Nothing less.</p>
......@@ -24,9 +24,9 @@
<p>When you write a page, scroll down toward the bottom of the <em>Write Page</em> panel and select the template of your choosing. You can also set this as your home page by going to <em>Settings > Reading</em> and choosing the page you added the template to as your front page.</p>
<p>You'll also want to add feature images and thumbnails to your posts to make them look good. For your convenience both of these are located under the <em>Hybrid Settings</em> meta box when you write a post. Of course, <em>Hybrid</em> has a built-in image script that will automatically include images for you (if you've attached an image).</p>
<p>You'll also want to add feature images and thumbnails to your posts to make them look good. You can upload these images using the standard WordPress "featured image" functionality. Of course, <em>Hybrid</em> has a built-in image script that will automatically include images for you (if you've attached an image).</p>
<p>The settings for this page template are located at <em>Appearance > Hybrid News</em>.</p>
<p>The settings for this page template are located at <em>Appearance > Hybrid Settings</em>.</p>
<h2>Widgets</h2>
......@@ -49,7 +49,7 @@
<p><em>Hybrid News</em> is licensed under the <a href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html" title="GNU GPL">GNU General Public License</a>, version 2 (GPL).</p>
<p>Copyright &copy; 2008&thinsp;&ndash;&thinsp;2010 Justin Tadlock, Theme Hybrid</p>
<p>Copyright &copy; 2008&thinsp;&ndash;&thinsp;2011 Justin Tadlock, Theme Hybrid</p>
</body>
</html>
\ No newline at end of file
/**
* Theme Name: Hybrid News
* Theme URI: http://themehybrid.com/themes/hybrid-news
* Description: A news-style child theme of the Hybrid theme framework.
* Version: 0.3
* Description: A news-style child theme of the Hybrid parent theme.
* Version: 0.4
* Author: Justin Tadlock
* Author URI: http://justintadlock.com
* Tags: blue, theme-options, threaded-comments, sticky-post, microformats, two-columns, three-columns, fixed-width
* Template: hybrid
* License: GNU General Public License v2.0
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
*
* Copyright (c) 2008 - 2010 Justin Tadlock. All rights reserved.
* Copyright (c) 2008 - 2011 Justin Tadlock. All rights reserved.
* http://justintadlock.com
*
* Hybrid News is released under the GNU General Public License, version 2 (GPL).
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
/* Get base CSS */
@import url('../hybrid/library/css/20px.css');
/* Get plugins CSS */
@import url('../hybrid/library/css/plugins.css');
/* Get drop-downs CSS */
@import url('../hybrid/library/css/drop-downs.css');
/* Get gallery CSS */
@import url('../hybrid/library/css/gallery.css');
/* Get tabs CSS (uncomment below line if using the Hybrid Tabs plugin) */
/* @import url('css/tabs.css'); */
......@@ -230,8 +225,9 @@ span.pullquote {
/**
* Images
************************************************/
.post img {
.hentry img {
max-width: 600px;
height: auto;
}
img.wp-smiley {
......@@ -486,6 +482,16 @@ img.wp-smiley {
background: #2b526b;
}
#primary-menu li.feed {
float: right;
border: none;
}
#primary-menu li.feed a {
padding: 7px 18px 6px 0;
background: url(images/feed-icon.png) no-repeat right 7px;
}
/**
* Container (content/primary/secondary)
************************************************/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment