Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Spacing clean ups

  • Loading branch information...
commit 0116328535f7a3e4989c9a572568c25bc1e83763 1 parent 330021a
Jesper Johansen authored
26 404.php
View
@@ -20,25 +20,25 @@
<?php do_atomic( 'before_main' ); // cakifo_before_main ?>
- <div id="main">
+ <div id="main">
<?php do_atomic( 'open_main' ); // cakifo_open_main ?>
- <article id="post-0" class="<?php hybrid_entry_class(); ?>">
+ <article id="post-0" class="<?php hybrid_entry_class(); ?>">
- <h1 class="error-404-title entry-title"><?php _e( "Oops! 404! 404!.. Help!.. We can't find the page!", 'cakifo' ); ?></h1>
+ <h1 class="error-404-title entry-title"><?php _e( "Oops! 404! 404!.. Help!.. We can't find the page!", 'cakifo' ); ?></h1>
- <div class="entry-content">
- <p><?php printf( __( "You tried going to %s but it doesn't exist. All is not lost! You can search for what you're looking for.", 'cakifo' ), '<code>' . esc_html( $_SERVER['REQUEST_URI'] ) . '</code>' ); ?></p>
+ <div class="entry-content">
+ <p><?php printf( __( "You tried going to %s but it doesn't exist. All is not lost! You can search for what you're looking for.", 'cakifo' ), '<code>' . esc_html( $_SERVER['REQUEST_URI'] ) . '</code>' ); ?></p>
- <?php get_search_form(); // Loads the searchform.php template ?>
+ <?php get_search_form(); // Loads the searchform.php template ?>
- <?php do_atomic( '404_content' ); // You can add more content here by using the 'cakifo_404_content' action ?>
- </div> <!-- .entry-content -->
+ <?php do_atomic( '404_content' ); // You can add more content here by using the 'cakifo_404_content' action ?>
+ </div> <!-- .entry-content -->
- </article> <!-- .hentry -->
+ </article> <!-- .hentry -->
- <?php
+ <?php
/**
* Include the Error Page widgets "sidebar" template part file
*
@@ -49,11 +49,11 @@
get_sidebar( '404' );
?>
- <?php do_atomic( 'close_main' ); // cakifo_close_main ?>
+ <?php do_atomic( 'close_main' ); // cakifo_close_main ?>
- </div> <!-- #main -->
+ </div> <!-- #main -->
- <?php do_atomic( 'after_main' ); // cakifo_after_main ?>
+ <?php do_atomic( 'after_main' ); // cakifo_after_main ?>
<?php
/**
18 archive.php
View
@@ -4,17 +4,17 @@
*
* The archive template is the default template used for archives pages without a more specific template.
*
- * @package Cakifo
- * @subpackage Template
+ * @package Cakifo
+ * @subpackage Template
*/
get_header(); // Loads the header.php template ?>
<?php do_atomic( 'before_main' ); // cakifo_before_main ?>
- <div id="main">
+ <div id="main">
- <?php do_atomic( 'open_main' ); // cakifo_open_main ?>
+ <?php do_atomic( 'open_main' ); // cakifo_open_main ?>
<?php get_template_part( 'loop-meta' ); // Loads the loop-meta.php template ?>
@@ -22,14 +22,14 @@
<?php get_template_part( 'loop', get_post_format() ); // Could be awesome to use hybrid_get_context() but get_template_part() doesn't accept arrays ?>
- <?php endwhile; ?>
+ <?php endwhile; ?>
- <?php do_atomic( 'close_main' ); // cakifo_close_main ?>
+ <?php do_atomic( 'close_main' ); // cakifo_close_main ?>
- <?php get_template_part( 'loop-nav' ); // Loads the loop-nav.php template ?>
+ <?php get_template_part( 'loop-nav' ); // Loads the loop-nav.php template ?>
- </div> <!-- #main -->
+ </div> <!-- #main -->
- <?php do_atomic( 'after_main' ); // cakifo_after_main ?>
+ <?php do_atomic( 'after_main' ); // cakifo_after_main ?>
<?php get_footer(); // Loads the footer.php template ?>
90 attachment.php
View
@@ -13,88 +13,88 @@
<?php do_atomic( 'before_main' ); // cakifo_before_main ?>
- <div id="main">
+ <div id="main">
<?php do_atomic( 'open_main' ); // cakifo_open_main ?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
- <?php do_atomic( 'before_entry' ); //cakifo_before_entry ?>
+ <?php do_atomic( 'before_entry' ); //cakifo_before_entry ?>
- <article id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>">
+ <article id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>">
<?php do_atomic( 'open_entry' ); //cakifo_open_entry ?>
- <header class="entry-header">
+ <header class="entry-header">
<?php
echo apply_atomic_shortcode( "attachment_metadeta", '<div class="entry-format">' . sprintf(
__( 'Published on [entry-published] in <a href="%1$s" title="Return to %2$s" rel="gallery">%2$s</a> [entry-edit-link before=" | "]', 'cakifo' ),
esc_url( get_permalink( $post->post_parent ) ),
get_the_title( $post->post_parent )
) . '</div>' );
- ?>
- <?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?>
- </header> <!-- .entry-header -->
+ ?>
+ <?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?>
+ </header> <!-- .entry-header -->
- <div class="entry-content">
- <?php
- /* Image attachments */
+ <div class="entry-content">
+ <?php
+ /* Image attachments */
if ( wp_attachment_is_image( get_the_ID() ) ) :
?>
- <p class="attachment-image">
- <a href="<?php echo wp_get_attachment_url( get_the_ID() ); ?>" title="<?php esc_attr_e( 'View full size', 'cakifo' ); ?>">
- <?php echo wp_get_attachment_image( get_the_ID(), 'full', false, array( 'class' => 'aligncenter' ) ); ?>
- </a>
- </p> <!-- .attachment-image -->
-
- <?php if ( ! empty( $post->post_excerpt ) ) : ?>
- <div class="entry-caption">
- <?php the_excerpt(); ?>
- </div>
- <?php endif; ?>
- <?php else : ?>
+ <p class="attachment-image">
+ <a href="<?php echo wp_get_attachment_url( get_the_ID() ); ?>" title="<?php esc_attr_e( 'View full size', 'cakifo' ); ?>">
+ <?php echo wp_get_attachment_image( get_the_ID(), 'full', false, array( 'class' => 'aligncenter' ) ); ?>
+ </a>
+ </p> <!-- .attachment-image -->
+
+ <?php if ( ! empty( $post->post_excerpt ) ) : ?>
+ <div class="entry-caption">
+ <?php the_excerpt(); ?>
+ </div>
+ <?php endif; ?>
+ <?php else : ?>
<?php hybrid_attachment(); // Function for handling non-image attachments ?>
- <p class="download">
- <a href="<?php echo wp_get_attachment_url(); ?>" title="<?php the_title_attribute(); ?>" rel="enclosure" type="<?php echo get_post_mime_type(); ?>"><?php printf( __( 'Download &quot;%1$s&quot;', 'cakifo' ), the_title( '<span class="fn">', '</span>', false) ); ?></a>
- </p> <!-- .download -->
+ <p class="download">
+ <a href="<?php echo wp_get_attachment_url(); ?>" title="<?php the_title_attribute(); ?>" rel="enclosure" type="<?php echo get_post_mime_type(); ?>"><?php printf( __( 'Download &quot;%1$s&quot;', 'cakifo' ), the_title( '<span class="fn">', '</span>', false) ); ?></a>
+ </p> <!-- .download -->
- <?php endif; ?>
- </div> <!-- .entry-content -->
+ <?php endif; ?>
+ </div> <!-- .entry-content -->
- <?php if ( wp_attachment_is_image( get_the_ID() ) ) : ?>
+ <?php if ( wp_attachment_is_image( get_the_ID() ) ) : ?>
- <div id="image-info">
- <?php cakifo_image_info(); // Get image meta data ?>
+ <div id="image-info">
+ <?php cakifo_image_info(); // Get image meta data ?>
- <div id="attachment-gallery" class="headline-list last">
- <h4><?php _e( 'Gallery', 'cakifo' ); ?></h4>
- <?php echo apply_atomic_shortcode( 'attachment_gallery', sprintf( '[gallery id="%1$s" exclude="%2$s" columns="5" size="small"]', $post->post_parent, get_the_ID() ) ); ?>
- </div> <!-- #attachment-gallery -->
- </div> <!-- #image-info -->
+ <div id="attachment-gallery" class="headline-list last">
+ <h4><?php _e( 'Gallery', 'cakifo' ); ?></h4>
+ <?php echo apply_atomic_shortcode( 'attachment_gallery', sprintf( '[gallery id="%1$s" exclude="%2$s" columns="5" size="small"]', $post->post_parent, get_the_ID() ) ); ?>
+ </div> <!-- #attachment-gallery -->
+ </div> <!-- #image-info -->
- <?php endif; ?>
+ <?php endif; ?>
- <div class="clear"></div>
+ <div class="clear"></div>
- <?php do_atomic( 'close_entry' ); //cakifo_close_entry ?>
+ <?php do_atomic( 'close_entry' ); //cakifo_close_entry ?>
- </article> <!-- #post-<?php the_ID(); ?> -->
+ </article> <!-- #post-<?php the_ID(); ?> -->
- <?php get_sidebar( 'after-singular' ); // Loads the sidebar-after-singular.php template ?>
+ <?php get_sidebar( 'after-singular' ); // Loads the sidebar-after-singular.php template ?>
- <?php do_atomic( 'after_singular' ); // cakifo_after_singular ?>
+ <?php do_atomic( 'after_singular' ); // cakifo_after_singular ?>
- <?php comments_template( '/comments.php', true ); // Loads the comments.php template ?>
+ <?php comments_template( '/comments.php', true ); // Loads the comments.php template ?>
<?php endwhile; ?>
- <?php do_atomic( 'close_main' ); // cakifo_close_main ?>
+ <?php do_atomic( 'close_main' ); // cakifo_close_main ?>
- <?php get_template_part( 'loop-nav' ); // Loads the loop-nav.php template ?>
+ <?php get_template_part( 'loop-nav' ); // Loads the loop-nav.php template ?>
- </div> <!-- #main -->
+ </div> <!-- #main -->
<?php do_atomic( 'after_main' ); // cakifo_after_main ?>
30 comment.php
View
@@ -15,34 +15,34 @@
<li id="li-comment-<?php comment_ID(); ?>" class="<?php hybrid_comment_class(); ?>">
- <article id="comment-<?php comment_ID(); ?>" class="comment">
+ <article id="comment-<?php comment_ID(); ?>" class="comment">
<?php do_atomic( 'before_comment' ); // cakifo_before_comment ?>
- <div class="comment-wrap">
+ <div class="comment-wrap">
- <?php do_atomic( 'open_comment' ); // cakifo_open_comment ?>
+ <?php do_atomic( 'open_comment' ); // cakifo_open_comment ?>
- <footer class="comment-meta">
+ <footer class="comment-meta">
<?php echo hybrid_avatar(); ?>
- <?php echo apply_atomic_shortcode( 'comment_meta', '<div class="comment-meta">[comment-author] [comment-published] [comment-permalink before="| "] [comment-edit-link before="| "] [comment-reply-link before="| "]</div>' ); ?>
- </footer> <!-- .comment-meta -->
+ <?php echo apply_atomic_shortcode( 'comment_meta', '<div class="comment-meta">[comment-author] [comment-published] [comment-permalink before="| "] [comment-edit-link before="| "] [comment-reply-link before="| "]</div>' ); ?>
+ </footer> <!-- .comment-meta -->
- <div class="comment-content comment-text">
- <?php if ( '0' == $comment->comment_approved ) : ?>
- <?php echo apply_atomic_shortcode( 'comment_moderation', '<p class="alert comment-awaiting-moderation">' . __( 'Your comment is awaiting moderation.', 'cakifo' ) . '</p>' ); ?>
- <?php endif; ?>
+ <div class="comment-content comment-text">
+ <?php if ( '0' == $comment->comment_approved ) : ?>
+ <?php echo apply_atomic_shortcode( 'comment_moderation', '<p class="alert comment-awaiting-moderation">' . __( 'Your comment is awaiting moderation.', 'cakifo' ) . '</p>' ); ?>
+ <?php endif; ?>
- <?php comment_text( $comment->comment_ID ); ?>
- </div> <!-- .comment-content .comment-text -->
+ <?php comment_text( $comment->comment_ID ); ?>
+ </div> <!-- .comment-content .comment-text -->
- <?php do_atomic( 'close_comment' ); // cakifo_close_comment ?>
+ <?php do_atomic( 'close_comment' ); // cakifo_close_comment ?>
- </div> <!-- .comment-wrap -->
+ </div> <!-- .comment-wrap -->
<?php do_atomic( 'after_comment' ); // cakifo_after_comment ?>
- </article> <!-- #comment-<?php comment_ID(); ?> -->
+ </article> <!-- #comment-<?php comment_ID(); ?> -->
<?php /* No closing </li> is needed. WordPress will know where to add it. */ ?>
46 comments.php
View
@@ -21,39 +21,39 @@
<?php if ( have_comments() ) : ?>
- <h2 id="comments-number" class="comments-header"><?php comments_number( __( 'No Responses', 'cakifo' ), __( 'One Response', 'cakifo' ), __( '% Responses', 'cakifo' ) ); ?></h2>
+ <h2 id="comments-number" class="comments-header"><?php comments_number( __( 'No Responses', 'cakifo' ), __( 'One Response', 'cakifo' ), __( '% Responses', 'cakifo' ) ); ?></h2>
- <?php do_atomic( 'before_comment_list' ); // cakifo_before_comment_list ?>
+ <?php do_atomic( 'before_comment_list' ); // cakifo_before_comment_list ?>
- <ol class="comment-list">
- <?php wp_list_comments( hybrid_list_comments_args() ); ?>
- </ol> <!-- .comment-list -->
+ <ol class="comment-list">
+ <?php wp_list_comments( hybrid_list_comments_args() ); ?>
+ </ol> <!-- .comment-list -->
- <?php do_atomic( 'after_comment_list' ); // cakifo_after_comment_list ?>
+ <?php do_atomic( 'after_comment_list' ); // cakifo_after_comment_list ?>
- <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
- <nav class="pagination comment-pagination">
- <h3 class="assistive-text"><?php _e( 'Comment navigation', 'cakifo' ); ?></h3>
- <?php paginate_comments_links(); ?>
- </nav> <!-- .comment-navigation -->
- <?php endif; ?>
+ <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
+ <nav class="pagination comment-pagination">
+ <h3 class="assistive-text"><?php _e( 'Comment navigation', 'cakifo' ); ?></h3>
+ <?php paginate_comments_links(); ?>
+ </nav> <!-- .comment-navigation -->
+ <?php endif; ?>
- <?php endif; // have_comments() ?>
+ <?php endif; // have_comments() ?>
- <?php if ( pings_open() && ! comments_open() ) : ?>
+ <?php if ( pings_open() && ! comments_open() ) : ?>
- <p class="comments-closed pings-open warning">
- <?php printf( __( 'Comments are closed, but <a href="%1$s" title="Trackback URL for this post">trackbacks</a> and pingbacks are open.', 'cakifo' ), get_trackback_url() ); ?>
- </p> <!-- .comments-closed .pings-open .warning -->
+ <p class="comments-closed pings-open warning">
+ <?php printf( __( 'Comments are closed, but <a href="%1$s" title="Trackback URL for this post">trackbacks</a> and pingbacks are open.', 'cakifo' ), get_trackback_url() ); ?>
+ </p> <!-- .comments-closed .pings-open .warning -->
- <?php elseif ( ! comments_open() ) : ?>
+ <?php elseif ( ! comments_open() ) : ?>
- <p class="comments-closed warning">
- <?php _e( 'Comments are closed.', 'cakifo' ); ?>
- </p> <!-- .comments-closed .warning -->
+ <p class="comments-closed warning">
+ <?php _e( 'Comments are closed.', 'cakifo' ); ?>
+ </p> <!-- .comments-closed .warning -->
- <?php endif; ?>
+ <?php endif; ?>
- <?php comment_form(); // Loads the comment form ?>
+ <?php comment_form(); // Loads the comment form ?>
</section> <!-- #comments -->
132 functions.php
View
@@ -129,7 +129,6 @@ function cakifo_theme_setup() {
* remove_action( "{$prefix}_close_menu_primary", 'cakifo_topbar_search' );
* add_action( "{$prefix}_close_menu_primary", 'cakifo_topbar_rss' );
*/
-
/* Filter the sidebar widgets. */
add_filter( 'sidebars_widgets', 'cakifo_disable_sidebars' );
@@ -199,9 +198,9 @@ function cakifo_theme_setup() {
*/
$header_args = array(
'random-default' => false,
- 'flex-height' => true,
- 'flex-width' => true,
- 'max-width' => 980,
+ 'flex-height' => true,
+ 'flex-width' => true,
+ 'max-width' => 980,
);
add_theme_support( 'custom-header', $header_args );
@@ -209,11 +208,11 @@ function cakifo_theme_setup() {
// Load the logo from the parent theme images folder
register_default_headers( array(
'logo' => array(
- 'url' => '%s/images/logo.png',
+ 'url' => '%s/images/logo.png',
'thumbnail_url' => '%s/images/logo.png',
- 'description' => __( 'Logo.png from the Cakifo images folder', 'cakifo' ),
- 'width' => 300,
- 'height' => 59
+ 'description' => __( 'Logo.png from the Cakifo images folder', 'cakifo' ),
+ 'width' => 300,
+ 'height' => 59
)
) );
@@ -221,9 +220,9 @@ function cakifo_theme_setup() {
if ( is_child_theme() && file_exists( CHILD_THEME_DIR . '/images/logo.png' ) ) {
register_default_headers( array(
'childtheme_logo' => array(
- 'url' => CHILD_THEME_URI . '/images/logo.png',
+ 'url' => CHILD_THEME_URI . '/images/logo.png',
'thumbnail_url' => CHILD_THEME_URI . '/images/logo.png',
- 'description' => __( 'Logo.png from the Cakifo child theme images folder', 'cakifo' ),
+ 'description' => __( 'Logo.png from the Cakifo child theme images folder', 'cakifo' ),
)
) );
}
@@ -242,7 +241,7 @@ function cakifo_enqueue_script() {
/**
* Modernizr enables HTML5 elements & feature detects
*
- * For more/fewer features and optimal performance in your child theme,
+ * For more/fewer features and optimal performance in your child theme,
* use a custom Modernizr build: www.modernizr.com/download/
*
* Use wp_deregister_script( 'modernizr' ); and
@@ -322,30 +321,30 @@ function cakifo_slider_javascript() {
* Default args
*/
$defaults = array(
- 'play' => '3500', // number, Autoplay slideshow, a positive number will set to true and be the time between slide animation in milliseconds
- 'hoverPause' => true, // boolean, Set to true and hovering over slideshow will pause it
- 'generatePagination' => true, // boolean, Auto generate pagination
- 'generateNextPrev' => true, // boolean, Auto generate next/prev buttons
- 'next' => 'slider-next', // string, Class name for next button
- 'prev' => 'slider-prev', // string, Class name for previous button
- 'autoHeight' => true, // boolean, Set to true to auto adjust height
- 'effect' => 'fade', // string, '[next/prev], [pagination]', e.g. 'slide, fade' or simply 'fade' for both
- 'fadeSpeed' => 50, // number, Set the speed of the fading animation in milliseconds
- 'slideSpeed' => 150, // number, Set the speed of the sliding animation in milliseconds
- 'paginationClass' => 'slidesPagination',
- 'preload' => false, // boolean, Set true to preload images in an image based slideshow
- 'preloadImage' => esc_url( $loading_gif ),
- 'randomize' => false, // boolean, Set to true to randomize slides
- // 'currentClass' => 'current'
- // 'container => 'slides_container', // string, Class name for slides container. Default is "slides_container"
- // 'pagination' => 'true', // boolean, If you're not using pagination you can set to false, but don't have to
- // 'start' => 1, // number, starting slide
- // 'crossfade' => 'false', // boolean, Crossfade images in a image based slideshow
- // 'pause' => 0, // number, Pause slideshow on click of next/prev or pagination. A positive number will set to true and be the time of pause in milliseconds
- // 'autoHeightSpeed'=> 350, // number, Set auto height animation time in milliseconds
- // 'bigTarget' => 'false', // boolean, Set to true and the whole slide will link to next slide on click
- // 'animationStart'=> 'function(){}', // Function called at the start of animation
- // 'animationComplete'=> 'function(){}' // Function called at the completion of animation
+ 'play' => '3500', // number, Autoplay slideshow, a positive number will set to true and be the time between slide animation in milliseconds
+ 'hoverPause' => true, // boolean, Set to true and hovering over slideshow will pause it
+ 'generatePagination' => true, // boolean, Auto generate pagination
+ 'generateNextPrev' => true, // boolean, Auto generate next/prev buttons
+ 'next' => 'slider-next', // string, Class name for next button
+ 'prev' => 'slider-prev', // string, Class name for previous button
+ 'autoHeight' => true, // boolean, Set to true to auto adjust height
+ 'effect' => 'fade', // string, '[next/prev], [pagination]', e.g. 'slide, fade' or simply 'fade' for both
+ 'fadeSpeed' => 50, // number, Set the speed of the fading animation in milliseconds
+ 'slideSpeed' => 150, // number, Set the speed of the sliding animation in milliseconds
+ 'paginationClass' => 'slidesPagination',
+ 'preload' => false, // boolean, Set true to preload images in an image based slideshow
+ 'preloadImage' => esc_url( $loading_gif ),
+ 'randomize' => false, // boolean, Set to true to randomize slides
+ // 'currentClass' => 'current'
+ // 'container => 'slides_container', // string, Class name for slides container. Default is "slides_container"
+ // 'pagination' => 'true', // boolean, If you're not using pagination you can set to false, but don't have to
+ // 'start' => 1, // number, starting slide
+ // 'crossfade' => 'false', // boolean, Crossfade images in a image based slideshow
+ // 'pause' => 0, // number, Pause slideshow on click of next/prev or pagination. A positive number will set to true and be the time of pause in milliseconds
+ // 'autoHeightSpeed' => 350, // number, Set auto height animation time in milliseconds
+ // 'bigTarget' => 'false', // boolean, Set to true and the whole slide will link to next slide on click
+ // 'animationStart' => 'function(){}', // Function called at the start of animation
+ // 'animationComplete' => 'function(){}' // Function called at the completion of animation
);
$args = array();
@@ -503,7 +502,6 @@ function cakifo_link_entry_meta( $meta ) {
}
/**
-/**
* Change entry meta for the Image post format.
*
* @param string $meta The normal entry meta
@@ -520,8 +518,10 @@ function cakifo_image_entry_meta( $meta ) {
*
* No longer showed by default in version 1.3
* If you still want it, use this in your child theme:
- * remove_action( "{$prefix}_close_menu_primary", 'cakifo_topbar_search' );
- * add_action( "{$prefix}_close_menu_primary", 'cakifo_topbar_rss' );
+ * <code>
+ * remove_action( "{$prefix}_close_menu_primary", 'cakifo_topbar_search' );
+ * add_action( "{$prefix}_close_menu_primary", 'cakifo_topbar_rss' );
+ * </code>
*
* @return string The RSS feed and maybe a Twitter link
* @since 1.0
@@ -578,7 +578,7 @@ function cakifo_disable_sidebars( $sidebars_widgets ) {
if ( current_theme_supports( 'theme-layouts' ) ) {
if ( 'layout-1c' == theme_layouts_get_layout() || is_404() ) {
- $sidebars_widgets['primary'] = false;
+ $sidebars_widgets['primary'] = false;
$sidebars_widgets['secondary'] = false;
}
}
@@ -747,18 +747,6 @@ function cakifo_admin_header_style() {
<?php
}
-
-/**
- * Debug function
- */
-if ( ! function_exists( 'debug' ) ) {
- function debug( $function, $var_dump = true ) {
- if ( $var_dump )
- var_dump( $function );
- else
- echo '<pre>' . print_r ( $function, true ) . '</pre>';
- }
-}
/**
* Function to add an author box
@@ -767,24 +755,24 @@ function debug( $function, $var_dump = true ) {
*/
function cakifo_author_box() { ?>
- <?php if ( get_the_author_meta( 'description' ) && is_multi_author() ) : ?>
+ <?php if ( get_the_author_meta( 'description' ) && is_multi_author() ) : ?>
- <div class="author-profile vcard">
+ <div class="author-profile vcard">
- <h4 class="author-name fn n"><?php echo do_shortcode( __( 'Article written by [entry-author]', 'cakifo' ) ); ?></h4>
+ <h4 class="author-name fn n"><?php echo do_shortcode( __( 'Article written by [entry-author]', 'cakifo' ) ); ?></h4>
- <?php echo get_avatar( get_the_author_meta( 'user_email' ), '48' ); ?>
+ <?php echo get_avatar( get_the_author_meta( 'user_email' ), '48' ); ?>
- <div class="author-description author-bio">
- <?php the_author_meta( 'description' ); ?>
- </div>
+ <div class="author-description author-bio">
+ <?php the_author_meta( 'description' ); ?>
+ </div>
- <?php if ( get_the_author_meta( 'twitter' ) ) { ?>
- <p class="twitter-link clear">
- <a href="http://twitter.com/<?php the_author_meta( 'twitter' ); ?>" title="<?php printf( esc_attr__( 'Follow %1$s on Twitter', 'cakifo' ), get_the_author_meta( 'display_name' ) ); ?>"><?php printf( __( 'Follow %1$s on Twitter', 'cakifo' ), get_the_author_meta( 'display_name' ) ); ?></a>
- </p>
- <?php } // End check for twitter ?>
- </div> <!-- .author-profile --> <?php
+ <?php if ( get_the_author_meta( 'twitter' ) ) { ?>
+ <p class="twitter-link clear">
+ <a href="http://twitter.com/<?php the_author_meta( 'twitter' ); ?>" title="<?php printf( esc_attr__( 'Follow %1$s on Twitter', 'cakifo' ), get_the_author_meta( 'display_name' ) ); ?>"><?php printf( __( 'Follow %1$s on Twitter', 'cakifo' ), get_the_author_meta( 'display_name' ) ); ?></a>
+ </p>
+ <?php } // End check for twitter ?>
+ </div> <!-- .author-profile --> <?php
endif;
}
@@ -817,9 +805,9 @@ function cakifo_place_author_box() {
function cakifo_image_info() {
/* Set up some default variables and get the image metadata. */
- $meta = wp_get_attachment_metadata( get_the_ID() );
+ $meta = wp_get_attachment_metadata( get_the_ID() );
$items = array();
- $list = '';
+ $list = '';
// If there's no image meta, return
if ( empty( $meta ) )
@@ -898,18 +886,18 @@ function cakifo_get_image_sizes() {
global $_wp_additional_image_sizes;
$builtin_sizes = array(
- 'large' => array(
- 'width' => get_option( 'large_size_w' ),
+ 'large' => array(
+ 'width' => get_option( 'large_size_w' ),
'height' => get_option( 'large_size_h' )
),
- 'medium' => array(
- 'width' => get_option( 'medium_size_w' ),
+ 'medium' => array(
+ 'width' => get_option( 'medium_size_w' ),
'height' => get_option( 'medium_size_h' )
),
'thumbnail' => array(
- 'width' => get_option( 'thumbnail_size_w' ),
+ 'width' => get_option( 'thumbnail_size_w' ),
'height' => get_option( 'thumbnail_size_h' ),
- 'crop' => (boolean) get_option( 'thumbnail_crop' )
+ 'crop' => (boolean) get_option( 'thumbnail_crop' )
)
);
64 functions/admin.php
View
@@ -43,37 +43,37 @@ function cakifo_theme_meta_box() { ?>
<table class="form-table">
<tr>
- <th>
- <label for="<?php echo hybrid_settings_field_id( 'featured_show' ); ?>"><?php _e( 'Show Featured Content slider?', 'cakifo' ); ?></label>
- </th>
+ <th>
+ <label for="<?php echo hybrid_settings_field_id( 'featured_show' ); ?>"><?php _e( 'Show Featured Content slider?', 'cakifo' ); ?></label>
+ </th>
- <td>
- <p><input id="featured_show" name="<?php echo hybrid_settings_field_name( 'featured_show' ); ?>" type="checkbox" value="1" <?php checked( hybrid_get_setting( 'featured_show' ), 1 ); ?> /></p>
+ <td>
+ <p><input id="featured_show" name="<?php echo hybrid_settings_field_name( 'featured_show' ); ?>" type="checkbox" value="1" <?php checked( hybrid_get_setting( 'featured_show' ), 1 ); ?> /></p>
<p><?php _e( 'Check to display the "Featured Content" slider', 'cakifo' ); ?></p>
- </td>
- </tr>
+ </td>
+ </tr>
<tr>
<th>
<label for="<?php echo hybrid_settings_field_id( 'featured_category' ); ?>"><?php _e( 'Featured Category:', 'cakifo' ); ?></label>
</th>
- <td>
- <?php $categories = get_categories(); ?>
+ <td>
+ <?php $categories = get_categories(); ?>
- <p>
- <select id="<?php echo hybrid_settings_field_id( 'featured_category' ); ?>" name="<?php echo hybrid_settings_field_name( 'featured_category' ); ?>">
- <option value="" <?php selected( hybrid_get_setting( 'featured_category' ), '' ); ?>></option>
+ <p>
+ <select id="<?php echo hybrid_settings_field_id( 'featured_category' ); ?>" name="<?php echo hybrid_settings_field_name( 'featured_category' ); ?>">
+ <option value="" <?php selected( hybrid_get_setting( 'featured_category' ), '' ); ?>></option>
- <?php foreach ( $categories as $cat ) { ?>
- <option value="<?php echo $cat->term_id; ?>" <?php selected( hybrid_get_setting( 'featured_category' ), $cat->term_id ); ?>><?php echo esc_attr( $cat->name ); ?></option>
- <?php } ?>
+ <?php foreach ( $categories as $cat ) { ?>
+ <option value="<?php echo $cat->term_id; ?>" <?php selected( hybrid_get_setting( 'featured_category' ), $cat->term_id ); ?>><?php echo esc_attr( $cat->name ); ?></option>
+ <?php } ?>
- </select>
- </p>
+ </select>
+ </p>
- <p><?php _e( 'Leave blank to use sticky posts', 'cakifo' ); ?></p>
- </td>
+ <p><?php _e( 'Leave blank to use sticky posts', 'cakifo' ); ?></p>
+ </td>
</tr>
<tr>
@@ -83,25 +83,25 @@ function cakifo_theme_meta_box() { ?>
<td>
<p><input type="number" min="-1" id="<?php echo hybrid_settings_field_id( 'featured_posts' ); ?>" name="<?php echo hybrid_settings_field_name( 'featured_posts' ); ?>" value="<?php echo esc_attr( hybrid_get_setting( 'featured_posts' ) ); ?>" class="small-text" /></p>
<p><?php _e( 'How many featured posts should be shown? <code>-1</code> will show all posts in the category.', 'cakifo' ); ?>
- <?php printf( __( '%s is the default', 'cakifo' ), '<code>5</code>' ); ?></p>
+ <?php printf( __( '%s is the default', 'cakifo' ), '<code>5</code>' ); ?></p>
</td>
</tr>
<tr>
<th>
- <label for="<?php echo hybrid_settings_field_id( 'headlines_category' ); ?>"><?php _e( 'Headline Categories:', 'cakifo' ); ?></label>
+ <label for="<?php echo hybrid_settings_field_id( 'headlines_category' ); ?>"><?php _e( 'Headline Categories:', 'cakifo' ); ?></label>
</th>
<td>
<p>
- <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.', 'cakifo' ); ?></label>
- <br />
+ <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.', 'cakifo' ); ?></label>
+ <br />
- <select id="<?php echo hybrid_settings_field_id( 'headlines_category' ); ?>" name="<?php echo hybrid_settings_field_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( 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>
- </p>
+ <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>
+ </p>
</td>
</tr>
<tr>
@@ -114,7 +114,7 @@ function cakifo_theme_meta_box() { ?>
</tr>
<tr>
- <?php $current_user = wp_get_current_user(); ?>
+ <?php $current_user = wp_get_current_user(); ?>
<th>
<label for="<?php echo hybrid_settings_field_id( 'twitter_username' ); ?>"><?php _e( 'Twitter username:', 'cakifo' ); ?></label>
@@ -134,10 +134,10 @@ function cakifo_theme_meta_box() { ?>
function cakifo_theme_validate_settings( $input ) {
/* Validate and/or sanitize the options */
- $input['featured_show'] = ( isset( $input['featured_show'] ) ? 1 : 0 );
+ $input['featured_show'] = ( isset( $input['featured_show'] ) ? 1 : 0 );
$input['featured_category'] = absint( $input['featured_category'] );
- $input['twitter_username'] = wp_filter_nohtml_kses( $input['twitter_username'] );
- $input['featured_posts'] = ( $input['featured_posts'] ? intval( $input['featured_posts'] ) : '5' ); // 5 is the default number of featured posts
+ $input['twitter_username'] = wp_filter_nohtml_kses( $input['twitter_username'] );
+ $input['featured_posts'] = ( $input['featured_posts'] ? intval( $input['featured_posts'] ) : '5' ); // 5 is the default number of featured posts
/* Return the array of theme settings */
return $input;
14 functions/colorbox.php
View
@@ -40,13 +40,13 @@ function cakifo_colorbox() {
* See all arguments at http://jacklmoore.com/colorbox/
*/
$defaults = array(
- 'selector' => '.colorbox',
- 'maxWidth' => '80%',
- 'maxHeight' => '80%',
- 'opacity' => '0.6', // For modern browsers that support CSS3 gradients this will be actually be 1
- 'fixed' => true,
+ 'selector' => '.colorbox',
+ 'maxWidth' => '80%',
+ 'maxHeight' => '80%',
+ 'opacity' => '0.6', // For modern browsers that support CSS3 gradients this will be actually be 1
+ 'fixed' => true,
'slideshowStart' => '\u25B6',
- 'slideshowStop' => 'll',
+ 'slideshowStop' => 'll',
);
$args = array();
@@ -57,7 +57,7 @@ function cakifo_colorbox() {
* add_filter( 'cakifo_colorbox_args', 'my_child_colorbox_args' );
* function my_child_colorbox_args( $args ) {
* $args['selector'] = '.colorbox, .my-new-awesome-selector';
- * return $args;
+ * return $args;
* }
*/
$args = apply_filters( 'cakifo_colorbox_args', $args );
96 functions/shortcodes.php
View
@@ -41,9 +41,9 @@ function cakifo_register_shortcodes() {
function cakifo_rss_link_shortcode( $atts ) {
extract( shortcode_atts( array(
'before' => '',
- 'after' => '',
- 'text' => __( 'RSS', 'cakifo' ),
- ), $atts ) );
+ 'after' => '',
+ 'text' => __( 'RSS', 'cakifo' ),
+ ), $atts ) );
return $before . '<a href="' . esc_url( get_bloginfo( 'rss2_url' ) ) . '" class="rss-link">' . $text . '</a>' . $after;
}
@@ -59,12 +59,12 @@ function cakifo_rss_link_shortcode( $atts ) {
*/
function cakifo_twitter_shortcode( $atts ) {
extract( shortcode_atts( array(
- 'link' => true,
- 'before' => '',
- 'after' => '',
+ 'link' => true,
+ 'before' => '',
+ 'after' => '',
'username' => hybrid_get_setting( 'twitter_username' ),
- 'text' => __( 'Follow me on Twitter', 'cakifo' )
- ), $atts ) );
+ 'text' => __( 'Follow me on Twitter', 'cakifo' )
+ ), $atts ) );
if ( empty( $username ) )
return;
@@ -84,8 +84,8 @@ function cakifo_twitter_shortcode( $atts ) {
function cakifo_entry_delicious_link_shortcode( $atts ) {
extract( shortcode_atts( array(
'before' => '',
- 'after' => '',
- ), $atts) );
+ 'after' => '',
+ ), $atts) );
return $before . '<a href="http://delicious.com/save" onclick="window.open(\'http://delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url=\'+encodeURIComponent(\'' . get_permalink() . '\')+\'&amp;title=\'+encodeURIComponent(\'' . the_title_attribute( 'echo=0' ) . '\'),\'delicious\', \'toolbar=no,width=550,height=550\'); return false;" class="delicious-share-button">' . __( 'Delicious', 'cakifo' ) . '</a>' . $after;
}
@@ -101,8 +101,8 @@ function cakifo_entry_delicious_link_shortcode( $atts ) {
function cakifo_entry_digg_link_shortcode( $atts ) {
extract( shortcode_atts( array(
'before' => '',
- 'after' => '',
- ), $atts) );
+ 'after' => '',
+ ), $atts) );
$url = 'http://digg.com/submit?phase=2&amp;url=' . urlencode( get_permalink( get_the_ID() ) ) . '&amp;title="' . urlencode( the_title_attribute( 'echo=0' ) );
@@ -123,16 +123,16 @@ function cakifo_entry_facebook_link_shortcode( $atts ) {
static $first = true;
extract( shortcode_atts( array(
- 'before' => '',
- 'after' => '',
- 'href' => get_permalink(),
- 'layout' => 'standard', // standard, button_count, box_count
- 'action' => 'like', // like, recommend
- 'width' => 450,
- 'faces' => 'false', // true, false
+ 'before' => '',
+ 'after' => '',
+ 'href' => get_permalink(),
+ 'layout' => 'standard', // standard, button_count, box_count
+ 'action' => 'like', // like, recommend
+ 'width' => 450,
+ 'faces' => 'false', // true, false
'colorscheme' => 'light', // light, dark
- 'locale' => get_locale(), // Language of the button - ex: da_DK, fr_FR
- ), $atts) );
+ 'locale' => get_locale(), // Language of the button - ex: da_DK, fr_FR
+ ), $atts) );
// Set default locale
$locale = ( isset( $locale ) ) ? $locale : 'en_US';
@@ -156,26 +156,26 @@ function cakifo_entry_facebook_link_shortcode( $atts ) {
function cakifo_entry_twitter_link_shortcode( $atts ) {
extract( shortcode_atts( array(
'before' => '',
- 'after' => '',
- 'href' => get_permalink(),
- 'text' => the_title_attribute( 'echo=0' ),
+ 'after' => '',
+ 'href' => get_permalink(),
+ 'text' => the_title_attribute( 'echo=0' ),
'layout' => 'horizontal', // horizontal, vertical, none
- 'via' => hybrid_get_setting( 'twitter_username' ),
- 'width' => 55, // Only need to use if there's no add_theme_support( 'cakifo-twitter-button' )
+ 'via' => hybrid_get_setting( 'twitter_username' ),
+ 'width' => 55, // Only need to use if there's no add_theme_support( 'cakifo-twitter-button' )
'height' => 20, // Only need to use if there's no add_theme_support( 'cakifo-twitter-button' )
- ), $atts) );
+ ), $atts) );
// Load the PHP tweet button script if the theme supports it
if ( current_theme_supports( 'cakifo-twitter-button' ) ) :
return cakifo_tweet_button( array(
'before' => $before,
- 'after' => $after,
+ 'after' => $after,
'layout' => $layout,
- 'href' => $href,
- 'text' => $text,
+ 'href' => $href,
+ 'text' => $text,
'layout' => $layout,
- 'via' => $via,
+ 'via' => $via,
) );
// Else, load the Twitter iframe
@@ -191,11 +191,11 @@ function cakifo_entry_twitter_link_shortcode( $atts ) {
// Build the query
$query_args = array(
- 'url' => $href,
- 'via' => esc_attr( $via ),
- 'text' => esc_attr( $text ),
+ 'url' => $href,
+ 'via' => esc_attr( $via ),
+ 'text' => esc_attr( $text ),
'count' => esc_attr( $layout )
- );
+ );
return $before . '<iframe src="http://platform.twitter.com/widgets/tweet_button.html?' . http_build_query( $query_args, '', '&amp;' ) . '" class="twitter-share-button" style="width:' . intval( $width ) . 'px; height:' . intval( $height ) . 'px;" scrolling="no" seamless></iframe>' . $after;
@@ -215,13 +215,13 @@ function cakifo_entry_googleplus_link_shortcode( $atts ) {
static $first = true;
extract( shortcode_atts( array(
- 'before' => '',
- 'after' => '',
- 'href' => get_permalink(),
- 'layout' => 'standard', // small, medium, standard, tall
+ 'before' => '',
+ 'after' => '',
+ 'href' => get_permalink(),
+ 'layout' => 'standard', // small, medium, standard, tall
'callback' => '',
- 'count' => 'true' // true, false
- ), $atts) );
+ 'count' => 'true' // true, false
+ ), $atts) );
// Only add the script once
$script = ( $first == true ) ? "<script>(function() {var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;po.src = 'https://apis.google.com/js/plusone.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);})();</script>" : "";
@@ -243,9 +243,9 @@ function cakifo_entry_googleplus_link_shortcode( $atts ) {
*/
function cakifo_entry_published_shortcode( $atts ) {
$atts = shortcode_atts( array(
- 'before' => '',
- 'after' => '',
- 'format' => get_option( 'date_format' ),
+ 'before' => '',
+ 'after' => '',
+ 'format' => get_option( 'date_format' ),
'pubdate' => true,
), $atts );
@@ -268,7 +268,7 @@ function cakifo_entry_published_shortcode( $atts ) {
function cakifo_comment_published_shortcode( $atts ) {
$atts = shortcode_atts( array(
'before' => '',
- 'after' => ''
+ 'after' => ''
), $atts );
$published = '<time class="published" datetime="' . get_comment_date( 'c' ) . '" pubdate>' . get_comment_date() . '</time>';
@@ -286,9 +286,9 @@ function cakifo_comment_published_shortcode( $atts ) {
*/
function cakifo_entry_author_shortcode( $atts ) {
$atts = shortcode_atts( array(
- 'rel' => 'author',
+ 'rel' => 'author',
'before' => '',
- 'after' => '',
+ 'after' => '',
), $atts );
$author = '<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" title="' . esc_attr( get_the_author_meta( 'display_name' ) ) . '">' . get_the_author_meta( 'display_name' ) . '</a></span>';
@@ -305,7 +305,7 @@ function cakifo_entry_author_shortcode( $atts ) {
function cakifo_entry_format_shortcode( $atts ) {
$atts = shortcode_atts( array(
'before' => '',
- 'after' => ''
+ 'after' => ''
), $atts );
return $atts['before'] . get_post_format() . $atts['after'];
108 functions/sidebars.php
View
@@ -34,101 +34,101 @@ function cakifo_register_sidebars() {
/* Set up the primary sidebar arguments */
$primary = array(
- 'id' => 'primary',
- 'name' => __( 'Primary', 'cakifo' ),
- 'description' => __( 'The main (primary) widget area, most often used as a sidebar.', 'cakifo' ),
+ 'id' => 'primary',
+ 'name' => __( 'Primary', 'cakifo' ),
+ 'description' => __( 'The main (primary) widget area, most often used as a sidebar.', 'cakifo' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s widget-%2$s">',
- 'after_widget' => '</aside>',
- 'before_title' => '<h2 class="widget-title">',
- 'after_title' => '</h2>'
+ 'after_widget' => '</aside>',
+ 'before_title' => '<h2 class="widget-title">',
+ 'after_title' => '</h2>'
);
/* Set up the secondary sidebar arguments */
$secondary = array(
- 'id' => 'secondary',
- 'name' => __( 'Secondary', 'cakifo' ),
- 'description' => __( 'The second most important widget area, most often used as a secondary sidebar.', 'cakifo' ),
+ 'id' => 'secondary',
+ 'name' => __( 'Secondary', 'cakifo' ),
+ 'description' => __( 'The second most important widget area, most often used as a secondary sidebar.', 'cakifo' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s widget-%2$s">',
- 'after_widget' => '</aside>',
- 'before_title' => '<h3 class="widget-title">',
- 'after_title' => '</h3>'
+ 'after_widget' => '</aside>',
+ 'before_title' => '<h3 class="widget-title">',
+ 'after_title' => '</h3>'
);
/* Set up the subsidiary sidebar arguments */
$subsidiary = array(
- 'id' => 'subsidiary',
- 'name' => __( 'Subsidiary', 'cakifo' ),
- 'description' => __( 'A widget area loaded in the footer of the site.', 'cakifo' ),
+ 'id' => 'subsidiary',
+ 'name' => __( 'Subsidiary', 'cakifo' ),
+ 'description' => __( 'A widget area loaded in the footer of the site.', 'cakifo' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s widget-%2$s">',
- 'after_widget' => '</aside>',
- 'before_title' => '<h3 class="widget-title">',
- 'after_title' => '</h3>'
+ 'after_widget' => '</aside>',
+ 'before_title' => '<h3 class="widget-title">',
+ 'after_title' => '</h3>'
);
/* Set up the header sidebar arguments */
$header = array(
- 'id' => 'header',
- 'name' => __( 'Header', 'cakifo' ),
- 'description' => __( 'Displayed within the site\'s header area.', 'cakifo' ),
+ 'id' => 'header',
+ 'name' => __( 'Header', 'cakifo' ),
+ 'description' => __( 'Displayed within the site\'s header area.', 'cakifo' ),
'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>'
+ 'after_widget' => '</div></div>',
+ 'before_title' => '<h3 class="widget-title">',
+ 'after_title' => '</h3>'
);
/* Set up the before content sidebar arguments */
$before_content = array(
- 'id' => 'before-content',
- 'name' => __( 'Before Content', 'cakifo' ),
- 'description' => __( 'Loaded before the page\'s main content area.', 'cakifo' ),
+ 'id' => 'before-content',
+ 'name' => __( 'Before Content', 'cakifo' ),
+ 'description' => __( 'Loaded before the page\'s main content area.', 'cakifo' ),
'before_widget' => '<section id="%1$s" class="widget %2$s widget-%2$s"><div class="widget-wrap widget-inside">',
- 'after_widget' => '</div></section>',
- 'before_title' => '<h3 class="widget-title">',
- 'after_title' => '</h3>'
+ 'after_widget' => '</div></section>',
+ 'before_title' => '<h3 class="widget-title">',
+ 'after_title' => '</h3>'
);
/* Set up the after content sidebar arguments */
$after_content = array(
- 'id' => 'after-content',
- 'name' => __( 'After Content', 'cakifo' ),
- 'description' => __( 'Loaded after the page\'s main content area.', 'cakifo' ),
+ 'id' => 'after-content',
+ 'name' => __( 'After Content', 'cakifo' ),
+ 'description' => __( 'Loaded after the page\'s main content area.', 'cakifo' ),
'before_widget' => '<section id="%1$s" class="widget %2$s widget-%2$s"><div class="widget-wrap widget-inside">',
- 'after_widget' => '</div></section>',
- 'before_title' => '<h3 class="widget-title">',
- 'after_title' => '</h3>'
+ 'after_widget' => '</div></section>',
+ 'before_title' => '<h3 class="widget-title">',
+ 'after_title' => '</h3>'
);
/* Set up the after singular sidebar arguments */
$after_singular = array(
- 'id' => 'after-singular',
- 'name' => __( 'After Singular', 'cakifo' ),
- 'description' => __( 'Loaded on singular post (page, attachment, etc.) views before the comments area.', 'cakifo' ),
+ 'id' => 'after-singular',
+ 'name' => __( 'After Singular', 'cakifo' ),
+ 'description' => __( 'Loaded on singular post (page, attachment, etc.) views before the comments area.', 'cakifo' ),
'before_widget' => '<div id="%1$s" class="widget %2$s widget-%2$s">',
- 'after_widget' => '</div>',
- 'before_title' => '<h3 class="widget-title">',
- 'after_title' => '</h3>'
+ 'after_widget' => '</div>',
+ 'before_title' => '<h3 class="widget-title">',
+ 'after_title' => '</h3>'
);
/* Set up the after single sidebar arguments */
$after_single = array(
- 'id' => 'after-single',
- 'name' => __( 'After Single', 'cakifo' ),
- 'description' => __( 'Loaded on single post views before the comments area.', 'cakifo' ),
+ 'id' => 'after-single',
+ 'name' => __( 'After Single', 'cakifo' ),
+ 'description' => __( 'Loaded on single post views before the comments area.', 'cakifo' ),
'before_widget' => '<div id="%1$s" class="widget %2$s widget-%2$s">',
- 'after_widget' => '</div>',
- 'before_title' => '<h3 class="widget-title">',
- 'after_title' => '</h3>'
+ 'after_widget' => '</div>',
+ 'before_title' => '<h3 class="widget-title">',
+ 'after_title' => '</h3>'
);
/* Set up the 404 error page arguments */
$error_page = array(
- 'id' => 'error-page',
- 'name' => __( 'Error Page', 'cakifo' ),
- 'description' => __( 'Loaded on 404 error pages', 'cakifo' ),
+ 'id' => 'error-page',
+ 'name' => __( 'Error Page', 'cakifo' ),
+ 'description' => __( 'Loaded on 404 error pages', 'cakifo' ),
'before_widget' => '<div id="%1$s" class="widget %2$s widget-%2$s">',
- 'after_widget' => '</div>',
- 'before_title' => '<h2 class="widget-title">',
- 'after_title' => '</h2>'
+ 'after_widget' => '</div>',
+ 'before_title' => '<h2 class="widget-title">',
+ 'after_title' => '</h2>'
);
/* Register the primary sidebar */
70 functions/tweet_button.php
View
@@ -11,41 +11,41 @@
* @link http://nicolasgallagher.com/custom-tweet-button-for-wordpress/
* @version 1.0
* @since 1.3
-
- Copyright 2010-2012 Nicolas Gallagher
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- 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. See the
- GNU General Public License for more details.
-
- 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
+ *
+ * Copyright 2010-2012 Nicolas Gallagher
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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. See the
+ * GNU General Public License for more details.
+ *
+ * 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
*/
function cakifo_tweet_button( $args = array() ) {
-
+
// Count how many times the function has been referenced
static $i = 0;
- $i++;
+ $i++;
/**
* Default values
*/
$defaults = array(
- 'before' => '',
- 'after' => '',
- 'href' => wp_get_shortlink(),
- 'via' => hybrid_get_setting( 'twitter_username' ),
- 'text' => the_title_attribute( 'echo=0' ),
- 'related' => '',
- 'layout' => 'vertical', // none, horizontal, vertical
+ 'before' => '',
+ 'after' => '',
+ 'href' => wp_get_shortlink(),
+ 'via' => hybrid_get_setting( 'twitter_username' ),
+ 'text' => the_title_attribute( 'echo=0' ),
+ 'related' => '',
+ 'layout' => 'vertical', // none, horizontal, vertical
'counturl' => get_permalink(),
);
@@ -55,22 +55,22 @@ function cakifo_tweet_button( $args = array() ) {
/**
* Set up variables
*/
- $post_id = get_queried_object_id();
- $url = trailingslashit( $args['href'] );
- $counturl = trailingslashit( $args['counturl'] );
- $cache_interval = 60;
- $refresh_interval = 3660;
- $retweet_count = null;
- $count = 0;
- $counter = '';
+ $post_id = get_queried_object_id();
+ $url = trailingslashit( $args['href'] );
+ $counturl = trailingslashit( $args['counturl'] );
+ $cache_interval = 60;
+ $refresh_interval = 3660;
+ $retweet_count = null;
+ $count = 0;
+ $counter = '';
// Retweet data (Twitter API)
$retweet_meta = get_post_meta( $post_id, "retweet_{$i}_cache", true );
if ( $retweet_meta != '' ) {
- $retweet_pieces = explode( ':', $retweet_meta );
+ $retweet_pieces = explode( ':', $retweet_meta );
$retweet_timestamp = (int) $retweet_pieces[0];
- $retweet_count = (int) $retweet_pieces[1];
+ $retweet_count = (int) $retweet_pieces[1];
}
// Expire retweet cache
16 functions/upgrade.php
View
@@ -42,13 +42,13 @@ function cakifo_update_check() {
$update = json_decode( $cakifo_update, true );
return array(
- 'title' => $update['items'][0]['title'],
- 'new_version' => $update['items'][0]['version'],
- 'url' => $update['items'][0]['link'],
- 'message' => $update['items'][0]['message'],
+ 'title' => $update['items'][0]['title'],
+ 'new_version' => $update['items'][0]['version'],
+ 'url' => $update['items'][0]['link'],
+ 'message' => $update['items'][0]['message'],
'childmessage' => $update['items'][0]['childmessage'],
- 'requires' => $update['items'][0]['requires'],
- 'package' => $update['items'][0]['zip']
+ 'requires' => $update['items'][0]['requires'],
+ 'package' => $update['items'][0]['zip']
);
}
@@ -96,8 +96,8 @@ function cakifo_update_notice() {
// There's an update available
if ( $update_available ) :
- $update = get_transient( 'cakifo-update-check' );
- $update_url = wp_nonce_url( 'update.php?action=upgrade-theme&amp;theme=cakifo', 'upgrade-theme_cakifo' );
+ $update = get_transient( 'cakifo-update-check' );
+ $update_url = wp_nonce_url( 'update.php?action=upgrade-theme&amp;theme=cakifo', 'upgrade-theme_cakifo' );
$update_onclick = __( 'Upgrading Cakifo will overwrite the current installed version of Cakifo. Are you sure you want to upgrade?. "Cancel" to stop, "OK" to upgrade.', 'cakifo' );
// The notice
18 header.php
View
@@ -33,31 +33,31 @@
<?php get_template_part( 'menu', 'primary' ); // Loads the menu-primary.php template ?>
- <div id="wrapper">
+ <div id="wrapper">
- <?php do_atomic( 'before_header' ); // cakifo_before_header ?>
+ <?php do_atomic( 'before_header' ); // cakifo_before_header ?>
- <header id="branding" role="banner" class="clearfix">
+ <header id="branding" role="banner" class="clearfix">
- <?php do_atomic( 'open_header' ); // cakifo_open_header ?>
+ <?php do_atomic( 'open_header' ); // cakifo_open_header ?>
<?php hybrid_site_title(); ?>
- <?php hybrid_site_description(); ?>
+ <?php hybrid_site_description(); ?>
<?php do_atomic( 'header' ); // cakifo_header ?>
- </header> <!-- #branding -->
+ </header> <!-- #branding -->
- <?php do_atomic( 'after_header' ); // cakifo_after_header ?>
+ <?php do_atomic( 'after_header' ); // cakifo_after_header ?>
<?php do_atomic( 'before_content' ); // cakifo_before_content ?>
<div id="content" class="clearfix">
- <?php do_atomic( 'open_content' ); // cakifo_open_content ?>
+ <?php do_atomic( 'open_content' ); // cakifo_open_content ?>
- <?php
+ <?php
/**
* Include the slider {section-slider.php} template part file
* if it's the front/post page and the setting is activated
14 home.php
View
@@ -13,9 +13,9 @@
<?php do_atomic( 'before_main' ); // cakifo_before_main ?>
- <div id="main">
+ <div id="main">
- <?php do_atomic( 'open_main' ); // cakifo_open_main ?>
+ <?php do_atomic( 'open_main' ); // cakifo_open_main ?>
<?php get_template_part( 'loop-meta' ); // Loads the loop-meta.php template ?>
@@ -23,14 +23,14 @@
<?php get_template_part( 'loop', get_post_format() ); ?>
- <?php endwhile; ?>
+ <?php endwhile; ?>
- <?php do_atomic( 'close_main' ); // cakifo_close_main ?>
+ <?php do_atomic( 'close_main' ); // cakifo_close_main ?>
- <?php get_template_part( 'loop-nav' ); // Loads the loop-nav.php template ?>
+ <?php get_template_part( 'loop-nav' ); // Loads the loop-nav.php template ?>
- </div> <!-- #main -->
+ </div> <!-- #main -->
- <?php do_atomic( 'after_main' ); // cakifo_after_main ?>
+ <?php do_atomic( 'after_main' ); // cakifo_after_main ?>
<?php get_footer(); // Loads the footer.php template ?>
18 index.php
View
@@ -13,24 +13,24 @@
<?php do_atomic( 'before_main' ); // cakifo_before_main ?>
- <div id="main">
+ <div id="main">
- <?php do_atomic( 'open_main' ); // cakifo_open_main ?>
+ <?php do_atomic( 'open_main' ); // cakifo_open_main ?>
- <?php get_template_part( 'loop-meta' ); // Loads the loop-meta.php template ?>
+ <?php get_template_part( 'loop-meta' ); // Loads the loop-meta.php template ?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
- <?php get_template_part( 'loop', get_post_format() ); ?>
+ <?php get_template_part( 'loop', get_post_format() ); ?>
- <?php endwhile; ?>
+ <?php endwhile; ?>
- <?php do_atomic( 'close_main' ); // cakifo_close_main ?>
+ <?php do_atomic( 'close_main' ); // cakifo_close_main ?>
- <?php get_template_part( 'loop-nav' ); // Loads the loop-nav.php template ?>
+ <?php get_template_part( 'loop-nav' ); // Loads the loop-nav.php template ?>
- </div> <!-- #main -->
+ </div> <!-- #main -->
- <?php do_atomic( 'after_main' ); // cakifo_after_main ?>
+ <?php do_atomic( 'after_main' ); // cakifo_after_main ?>
<?php get_footer(); // Loads the footer.php template ?>
10 loop-nav.php
View
@@ -13,7 +13,7 @@
<?php if ( is_singular( 'post' ) ) : ?>
<nav class="pagination post-pagination clearfix">
- <h3 class="assistive-text"><?php _e( 'Post navigation', 'cakifo' ); ?></h3>
+ <h3 class="assistive-text"><?php _e( 'Post navigation', 'cakifo' ); ?></h3>
<?php previous_post_link( '%link', '<span class="previous">&larr; %title</span>' ); ?>
<?php next_post_link( '%link', '<span class="next">%title &rarr;</span>' ); ?>
</nav> <!-- .pagination.post-pagination -->
@@ -23,9 +23,9 @@
elseif ( ! is_singular() && current_theme_supports( 'loop-pagination' ) ) :
loop_pagination( array(
- 'before' => '<nav class="pagination loop-pagination"><h3 class="assistive-text">' . __( 'Post navigation', 'cakifo' ) . '</h3>',
- 'after' => '</nav>',
- 'mid_size' => 2,
+ 'before' => '<nav class="pagination loop-pagination"><h3 class="assistive-text">' . __( 'Post navigation', 'cakifo' ) . '</h3>',
+ 'after' => '</nav>',
+ 'mid_size' => 2,
'prev_text' => __( '&larr; Previous', 'cakifo' ),
'next_text' => __( 'Next &rarr;', 'cakifo' )
) );
@@ -34,7 +34,7 @@
elseif ( ! is_singular() && $nav = get_posts_nav_link( array( 'sep' => '', 'prelabel' => '<span class="previous">' . __( '&larr; Previous', 'cakifo' ) . '</span>', 'nxtlabel' => '<span class="next">' . __( 'Next &rarr;', 'cakifo' ) . '</span>' ) ) ) : ?>
<nav class="pagination">
- <h3 class="assistive-text"><?php _e( 'Post navigation', 'cakifo' ); ?></h3>
+ <h3 class="assistive-text"><?php _e( 'Post navigation', 'cakifo' ); ?></h3>
<?php echo $nav; ?>
</nav> <!-- .pagination.loop-pagination -->
109 loop.php
View
@@ -20,23 +20,24 @@
?>
<?php do_atomic( 'before_entry' ); //cakifo_before_entry ?>
- <article id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>">
+ <article id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>">
<?php do_atomic( 'open_entry' ); //cakifo_open_entry ?>
- <header class="entry-header">
- <?php if ( get_post_format() ) : ?>
- <hgroup>
- <?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?>
- <?php echo apply_atomic_shortcode( 'entry_format', '<h3 class="entry-format"><a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '">[entry-format]</a></h3>' ); ?>
- </hgroup>
- <?php else : ?>
- <?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?>
- <?php endif; ?>
-
- <?php
+ <header class="entry-header">
+ <?php if ( get_post_format() ) : ?>
+ <hgroup>
+ <?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?>
+ <?php echo apply_atomic_shortcode( 'entry_format', '<h3 class="entry-format"><a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '">[entry-format]</a></h3>' ); ?>
+ </hgroup>
+ <?php else : ?>
+ <?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?>
+ <?php endif; ?>
+
+ <?php
// The default format (i.e., a normal post) returns false
$format = get_post_format();
+
if ( false === $format )
$format = 'standard';
@@ -46,81 +47,81 @@
if ( 'post' == get_post_type() )
echo apply_atomic_shortcode( "byline_{$format}", '<div class="byline">' . __( 'By [entry-author] on [entry-published] [entry-edit-link before=" | "]', 'cakifo' ) . '</div>' );
?>
- </header> <!-- .entry-header -->
+ </header> <!-- .entry-header -->
- <?php
+ <?php
/**
* Get the thumbnail
*/
if ( current_theme_supports( 'get-the-image' ) )
get_the_image( array(
- 'size' => 'thumbnail',
+ 'size' => 'thumbnail',
'attachment' => false
) );
- ?>
+ ?>
<?php
- /**
- * Status format
+ /**
+ * Status format
*
- * Can be overwritten in a Child theme via {loop-status.php}
- */
+ * Can be overwritten in a Child theme via {loop-status.php}
+ */
if ( has_post_format( 'status' ) ) :
?>
-
- <div class="entry-content">
- <div class="note">
+
+ <div class="entry-content">
+ <div class="note">
<?php echo get_avatar( get_the_author_meta( 'ID' ), apply_atomic( 'status_avatar', '48' ) ); ?>
- <?php the_content( __( 'Continue reading <span class="meta-nav">&raquo;</span>', 'cakifo' ) ); ?>
- </div>
- <?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'cakifo' ), 'after' => '</p>' ) ); ?>
- </div> <!-- .entry-content -->
+ <?php the_content( __( 'Continue reading <span class="meta-nav">&raquo;</span>', 'cakifo' ) ); ?>
+ </div>
+ <?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'cakifo' ), 'after' => '</p>' ) ); ?>
+ </div> <!-- .entry-content -->
<?php
- /**
- * Quote, Image or Gallery format
+ /**
+ * Quote, Image or Gallery format
*
- * Can be overwritten in a Child theme via
+ * Can be overwritten in a Child theme via
* {loop-quote.php}, {loop-image.php}, or {loop-gallery.php}
- */
+ */
elseif ( has_post_format( 'quote' ) || has_post_format( 'image' ) || has_post_format( 'gallery' ) ) :
?>
- <div class="entry-content">
- <?php the_content( __( 'Continue reading <span class="meta-nav">&raquo;</span>', 'cakifo' ) ); ?>
- <?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'cakifo' ), 'after' => '</p>' ) ); ?>
- </div> <!-- .entry-content -->
+ <div class="entry-content">
+ <?php the_content( __( 'Continue reading <span class="meta-nav">&raquo;</span>', 'cakifo' ) ); ?>
+ <?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'cakifo' ), 'after' => '</p>' ) ); ?>
+ </div> <!-- .entry-content -->
<?php
- /**
- * Only display Excerpts for Archives and Search pages
- */
+ /**
+ * Only display Excerpts for Archives and Search pages
+ */
elseif ( is_archive() || is_search() ) :
?>
- <div class="entry-summary">
- <?php the_excerpt( __( 'Continue reading <span class="meta-nav">&raquo;</span>', 'cakifo' ) ); ?>
- <?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'cakifo' ), 'after' => '</p>' ) ); ?>
- </div> <!-- .entry-summary -->
+ <div class="entry-summary">
+ <?php the_excerpt( __( 'Continue reading <span class="meta-nav">&raquo;</span>', 'cakifo' ) ); ?>
+ <?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'cakifo' ), 'after' => '</p>' ) ); ?>
+ </div> <!-- .entry-summary -->
<?php
- /**
- * Any other post format
+ /**
+ * Any other post format
*
- * Can be overwritten in a Child theme via
+ * Can be overwritten in a Child theme via
* {loop-link.php}, {loop-aside.php}, {loop-video.php}, {loop-chat.php}, or {loop-audio.php}
- */
+ */
else :
?>
- <div class="entry-content">
- <?php the_content( __( 'Continue reading <span class="meta-nav">&raquo;</span>', 'cakifo' ) ); ?>
- <?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'cakifo' ), 'after' => '</p>' ) ); ?>
- </div> <!-- .entry-content -->
+ <div class="entry-content">
+ <?php the_content( __( 'Continue reading <span class="meta-nav">&raquo;</span>', 'cakifo' ) ); ?>
+ <?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'cakifo' ), 'after' => '</p>' ) ); ?>
+ </div> <!-- .entry-content -->
- <?php endif; ?>
+ <?php endif; ?>
- <?php
+ <?php
/**
* Entry meta
*/
@@ -128,7 +129,7 @@
echo apply_atomic_shortcode( "entry_meta_{$format}", '<footer class="entry-meta">' . __( '[entry-terms taxonomy="category" before="Posted in "] [entry-terms before="| Tagged "] [entry-comments-link before=" | "] [entry-edit-link before=" | "]', 'cakifo' ) . '</footer>' );
?>
- <div class="clear"></div>
+ <div class="clear"></div>
<?php
// Loads the sidebar-after-single.php template
@@ -153,6 +154,6 @@
<?php comments_template( '/comments.php', true ); // Loads the comments.php template ?>
<?php do_atomic( 'close_entry' ); //cakifo_close_entry ?>
- </article> <!-- #post-<?php the_ID(); ?> -->
+ </article> <!-- #post-<?php the_ID(); ?> -->
<?php do_atomic( 'after_entry' ); //cakifo_after_entry ?>
26 menu-primary.php
View
@@ -12,31 +12,31 @@
<?php do_atomic( 'before_menu_primary' ); // cakifo_before_menu_primary ?>
- <div id="topbar">
+ <div id="topbar">
- <div class="wrap">
+ <div class="wrap">
<?php do_atomic( 'open_menu_primary' ); // cakifo_open_menu_primary ?>
- <nav class="menu">
+ <nav class="menu">
<h3 class="assistive-text"><?php _e( 'Main menu', 'cakifo' ); ?></h3>
<?php
wp_nav_menu( array(
'theme_location' => 'primary',
- 'container' => '',
- 'menu_class' => '',
- 'after' => '<span class="sep">|</span>',
- 'fallback_cb' => ''
+ 'container' => '',
+ 'menu_class' => '',
+ 'after' => '<span class="sep">|</span>',
+ 'fallback_cb' => ''
) );
- ?>
- </nav> <!-- .menu -->
+ ?>
+ </nav> <!-- .menu -->
- <?php do_atomic( 'close_menu_primary' ); // cakifo_close_menu_primary ?>
+ <?php do_atomic( 'close_menu_primary' ); // cakifo_close_menu_primary ?>
- </div> <!-- .wrap -->
+ </div> <!-- .wrap -->
- </div> <!-- #topbar -->
+ </div> <!-- #topbar -->
- <?php do_atomic( 'after_menu_primary' ); // cakifo_after_menu_primary ?>
+ <?php do_atomic( 'after_menu_primary' ); // cakifo_after_menu_primary ?>
<?php endif; ?>
16 search.php
View
@@ -13,24 +13,24 @@
<?php do_atomic( 'before_main' ); // cakifo_before_main ?>
- <div id="main">
+ <div id="main">
- <?php do_atomic( 'open_main' ); // cakifo_open_main ?>
+ <?php do_atomic( 'open_main' ); // cakifo_open_main ?>
<?php get_template_part( 'loop-meta' ); // Loads the loop-meta.php template ?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
- <?php get_template_part( 'loop', get_post_format() ); ?>
+ <?php get_template_part( 'loop', get_post_format() ); ?>
- <?php endwhile; ?>
+ <?php endwhile; ?>
- <?php do_atomic( 'close_main' ); // cakifo_close_main ?>
+ <?php do_atomic( 'close_main' ); // cakifo_close_main ?>
- <?php get_template_part( 'loop-nav' ); // Loads the loop-nav.php template ?>
+ <?php get_template_part( 'loop-nav' ); // Loads the loop-nav.php template ?>
- </div> <!-- #main -->
+ </div> <!-- #main -->
- <?php do_atomic( 'after_main' ); // cakifo_after_main ?>
+ <?php do_atomic( 'after_main' ); // cakifo_after_main ?>
<?php get_footer(); // Loads the footer.php template ?>
8 searchform.php
View
@@ -18,17 +18,17 @@
elseif ( is_404() )
$value = 'value="' . esc_attr( basename($_SERVER['REQUEST_URI']) ) . '"'; // Requested URI for 404 page
else
- $value= 'placeholder="' . esc_attr__( 'Search', 'cakifo' ) . '"'; // Or "Search" as placeholder
+ $value = 'placeholder="' . esc_attr__( 'Search', 'cakifo' ) . '"'; // Or "Search" as placeholder
?>
<div class="search">
- <form method="get" class="search-form" action="<?php echo trailingslashit( home_url() ); ?>">
+ <form method="get" class="search-form" action="<?php echo trailingslashit( home_url() ); ?>">
<label>
<span class="assistive-text"><?php _e( 'Search', 'cakifo' ); ?></span>
- <input class="search-text" type="search" name="s" <?php echo $value; ?> />
+ <input class="search-text" type="search" name="s" <?php echo $value; ?> />
</label>
<input class="search-submit" type="submit" value="<?php esc_attr_e( 'Search', 'cakifo' ); ?>" />
- </form> <!-- .search-form -->
+ </form> <!-- .search-form -->
</div> <!-- .search -->
94 section-headlines.php
View
@@ -12,98 +12,98 @@
<?php do_atomic( 'before_headlines' ); // cakifo_before_headlines ?>
- <section id="headlines" class="clearfix">
+ <section id="headlines" class="clearfix">
<?php do_atomic( 'open_headlines' ); // cakifo_open_headlines ?>
- <?php
- $i = 0;
+ <?php
+ $i = 0;
// Get the number of posts to show
$number = ( hybrid_get_setting( 'headlines_num_posts' ) ) ? hybrid_get_setting( 'headlines_num_posts' ) : 4;
// Loop through each selected category
- foreach ( hybrid_get_setting( 'headlines_category' ) as $category ) :
- ?>
+ foreach ( hybrid_get_setting( 'headlines_category' ) as $category ) :
+ ?>
<?php
- /**
+ /**
* Create the loop for each selected category
*
* @uses $GLOBALS['cakifo_do_not_duplicate'] Exclude posts from the 'Recent Posts' section
*/
$headlines = get_posts( array(
- 'numberposts' => $number,
+ 'numberposts' => $number,
'post__not_in' => $GLOBALS['cakifo_do_not_duplicate'], // Don't show posts that are showing in the 'Recent Posts' section
- 'category' => $category,
- 'post_status' => 'publish',
- 'tax_query' => array(
- array(
- // Exclude posts with the Aside, Link, Quote, and Status format
- 'taxonomy' => 'post_format',
- 'terms' => array( 'post-format-aside', 'post-format-link', 'post-format-quote', 'post-format-status' ),
- 'field' => 'slug',
- 'operator' => 'NOT IN',
- ),
+ 'category' => $category,
+ 'post_status' => 'publish',
+ 'tax_query' => array(
+ array(
+ // Exclude posts with the Aside, Link, Quote, and Status format
+ 'taxonomy' => 'post_format',
+ 'terms' => array( 'post-format-aside', 'post-format-link', 'post-format-quote', 'post-format-status' ),
+ 'field' => 'slug',
+ 'operator' => 'NOT IN',
+ ),
),
) );
- ?>
+ ?>
- <?php if ( ! empty( $headlines ) ) : ?>
+ <?php if ( ! empty( $headlines ) ) : ?>
- <div class="headline-list <?php echo ( $i++ % 3 == 2 ) ? 'last' : ''; // 'Last' class for every 3rd category ?>">
+ <div class="headline-list <?php echo ( $i++ % 3 == 2 ) ? 'last' : ''; // 'Last' class for every 3rd category ?>">
<?php do_atomic( 'open_headline_list' ); // cakifo_open_headline_list ?>
- <?php $cat = get_category( $category ); ?>
+ <?php $cat = get_category( $category ); ?>
- <h2 class="section-title alternative-section-title"><a href="<?php echo get_category_link( $category ); ?>" title="<?php echo esc_attr( $cat->name ); ?>"><?php echo $cat->name; ?></a></h2>
+ <h2 class="section-title alternative-section-title"><a href="<?php echo get_category_link( $category ); ?>" title="<?php echo esc_attr( $cat->name ); ?>"><?php echo $cat->name; ?></a></h2>
- <ol>
+ <ol>
<?php foreach ( $headlines as $post ) : $GLOBALS['cakifo_do_not_duplicate'][] = $post->ID; ?>
- <li>
+ <li>
<?php do_atomic( 'open_headline_list_item' ); // cakifo_open_headline_list_item ?>
- <?php if ( current_theme_supports( 'get-the-image' ) ) { ?>
- <div class="image">
+ <?php if ( current_theme_supports( 'get-the-image' ) ) { ?>
+ <div class="image">
<?php
// Get the thumbnail
get_the_image( array(
- 'meta_key' => 'Thumbnail',
- 'size' => 'small',
- 'image_class' => 'thumbnail',
+ 'meta_key' => 'Thumbnail',
+ 'size' => 'small',
+ 'image_class' => 'thumbnail',
'default_image' => THEME_URI . '/images/default-thumb-mini.gif'
) );
- ?>
- </div>
- <?php } ?>
+ ?>
+ </div>
+ <?php } ?>
- <div class="details">
- <?php
+ <div class="details">
+ <?php
/* Entry title */
- echo apply_atomic( 'headline_entry_title', the_title( '<h3 class="' . esc_attr( $post->post_type ) . '-title entry-title"><a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '" rel="bookmark">', '</a></h3>', false ) );
+ echo apply_atomic( 'headline_entry_title', the_title( '<h3 class="' . esc_attr( $post->post_type ) . '-title entry-title"><a href="' . get_permalink() . '" title="'