Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Commit

Permalink
Improve inline documentation and code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jayj committed Aug 26, 2013
1 parent 5eeb3ee commit 6a1de2d
Show file tree
Hide file tree
Showing 46 changed files with 413 additions and 443 deletions.
49 changes: 23 additions & 26 deletions 404.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@
* The 404 template is used when a reader visits an invalid URL on your site. By default, the template will
* display a generic message.
*
* @package Cakifo
* @package Cakifo
* @subpackage Template
* @link http://codex.wordpress.org/Creating_an_Error_404_Page
*/

@header( 'HTTP/1.1 404 Not found', true, 404 );

/**
* Include the header template part file
*
Expand All @@ -26,34 +23,34 @@

<?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(); ?>">

<header class="entry-header">
<h1 class="error-404-title entry-title"><?php _e( "Whoah! 404 error! We can't find the page!", 'cakifo' ); ?></h1>
</header> <!-- .entry-header -->
<header class="entry-header">
<h1 class="error-404-title entry-title"><?php _e( "Whoah! 404 error! We can't find the page!", 'cakifo' ); ?></h1>
</header> <!-- .entry-header -->

<div class="entry-content">
<p>
<?php printf( __( "You tried going to %s but the page no longer exists. All is not lost! Perhaps searching, or one of the links below, can help.", 'cakifo' ), '<code>' . esc_html( $_SERVER['REQUEST_URI'] ) . '</code>' ); ?>
</p>
<div class="entry-content">
<p>
<?php printf( __( "You tried going to %s but the page no longer exists. All is not lost! Perhaps searching, or one of the links below, can help.", '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
/**
* Include the Error Page widgets "sidebar" template part file
*
* Child Themes can replace this template part file globally,
* via `sidebar.php`, or in the Error 404 Page context only, via
* `sidebar-404.php`
*/
get_sidebar( '404' );
?>
<?php
/**
* Include the Error Page widgets "sidebar" template part file
*
* Child Themes can replace this template part file globally,
* via `sidebar.php`, or in the Error 404 Page context only, via
* `sidebar-404.php`
*/
get_sidebar( '404' );
?>

<?php do_atomic( 'close_main' ); // cakifo_close_main ?>

Expand Down
2 changes: 1 addition & 1 deletion archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* The archive template is the default template used for archives pages without a more specific template.
*
* @package Cakifo
* @package Cakifo
* @subpackage Template
*/

Expand Down
3 changes: 1 addition & 2 deletions attachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
* This is the default attachment template. It is used when visiting the singular view of a post attachment
* page (images, videos, audio, etc.).
*
* @package Cakifo
* @package Cakifo
* @subpackage Template
* @since Cakifo 1.0.0
*/

get_header(); // Loads the header.php template ?>
Expand Down
4 changes: 2 additions & 2 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
* Lists comments and calls the comment form. Individual comments have their own templates. The
* hierarchy for these templates is `$comment_type.php, comment.php`.
*
* @package Cakifo
* @package Cakifo
* @subpackage Template
*/

/*
/**
* If the current post is protected by a password and
* the visitor has not yet entered the password we will
* return early without loading the comments.
Expand Down
3 changes: 1 addition & 2 deletions content-aside.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
*
* This can be overridden in child themes with content-aside.php
*
* @package Cakifo
* @package Cakifo
* @subpackage Template
* @since Cakifo 1.6.0
*/

do_atomic( 'before_entry' ); // cakifo_before_entry ?>
Expand Down
11 changes: 3 additions & 8 deletions content-attachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
*
* This can be overridden in child themes with content-attachment.php
*
* @package Cakifo
* @package Cakifo
* @subpackage Template
* @since Cakifo 1.6.0
*/

do_atomic( 'before_entry' ); // cakifo_before_entry ?>
Expand All @@ -24,9 +23,7 @@
</header> <!-- .entry-header -->

<?php
/**
* Get the thumbnail
*/
// Get the thumbnail.
if ( current_theme_supports( 'get-the-image' ) )
get_the_image(
array(
Expand Down Expand Up @@ -60,9 +57,7 @@
</header> <!-- .entry-header -->

<?php
/**
* Get the thumbnail
*/
// Get the thumbnail.
if ( current_theme_supports( 'get-the-image' ) )
get_the_image(
array(
Expand Down
3 changes: 1 addition & 2 deletions content-audio.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
*
* This can be overridden in child themes with content-audio.php
*
* @package Cakifo
* @package Cakifo
* @subpackage Template
* @since Cakifo 1.6.0
*/

do_atomic( 'before_entry' ); // cakifo_before_entry ?>
Expand Down
3 changes: 1 addition & 2 deletions content-chat.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
*
* This can be overridden in child themes with `content-chat.php`
*
* @package Cakifo
* @package Cakifo
* @subpackage Template
* @since Cakifo 1.6.0
*/

do_atomic( 'before_entry' ); // cakifo_before_entry ?>
Expand Down
3 changes: 1 addition & 2 deletions content-gallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
*
* This can be overridden in child themes with `content-gallery.php`
*
* @package Cakifo
* @package Cakifo
* @subpackage Template
* @since Cakifo 1.6.0
*/

do_atomic( 'before_entry' ); // cakifo_before_entry ?>
Expand Down
3 changes: 1 addition & 2 deletions content-image.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
*
* This can be overridden in child themes with `content-image.php`
*
* @package Cakifo
* @package Cakifo
* @subpackage Template
* @since Cakifo 1.6.0
*/

do_atomic( 'before_entry' ); // cakifo_before_entry ?>
Expand Down
3 changes: 1 addition & 2 deletions content-intro.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
/**
* The template for displaying page content in the template-front-page.php page template
*
* @package Cakifo
* @package Cakifo
* @subpackage Template
* @since Cakifo 1.6.0
*/

do_atomic( 'before_intro' ); // cakifo_before_intro ?>
Expand Down
17 changes: 7 additions & 10 deletions content-link.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
*
* This can be overridden in child themes with content-link.php
*
* @package Cakifo
* @package Cakifo
* @subpackage Template
* @since Cakifo 1.6.0
*/

do_atomic( 'before_entry' ); // cakifo_before_entry ?>
Expand All @@ -26,14 +25,13 @@
</header> <!-- .entry-header -->

<?php
/**
* Get the thumbnail
*/
if ( current_theme_supports( 'get-the-image' ) )
// Get the thumbnail.
if ( current_theme_supports( 'get-the-image' ) ) {
get_the_image( array(
'size' => 'thumbnail',
'attachment' => false
));
}
?>

<div class="entry-content">
Expand All @@ -55,14 +53,13 @@
</header> <!-- .entry-header -->

<?php
/**
* Get the thumbnail
*/
if ( current_theme_supports( 'get-the-image' ) )
// Get the thumbnail.
if ( current_theme_supports( 'get-the-image' ) ) {
get_the_image( array(
'size' => 'thumbnail',
'attachment' => false
));
}
?>

<div class="entry-content">
Expand Down
3 changes: 1 addition & 2 deletions content-quote.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
*
* This can be overridden in child themes with `content-quote.php`
*
* @package Cakifo
* @package Cakifo
* @subpackage Template
* @since Cakifo 1.6.0
*/

do_atomic( 'before_entry' ); // cakifo_before_entry ?>
Expand Down
3 changes: 1 addition & 2 deletions content-video.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
*
* This can be overridden in child themes with `content-video.php`
*
* @package Cakifo
* @package Cakifo
* @subpackage Template
* @since Cakifo 1.6.0
*/

do_atomic( 'before_entry' ); // cakifo_before_entry ?>
Expand Down
17 changes: 7 additions & 10 deletions content.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
* be used if it exists and we ask for the loop with:
* <code>get_template_part( 'loop', 'index' );</code>
*
* @package Cakifo
* @package Cakifo
* @subpackage Template
* @since Cakifo 1.1.0
*/

do_atomic( 'before_entry' ); // cakifo_before_entry ?>
Expand All @@ -29,14 +28,13 @@
</header> <!-- .entry-header -->

<?php
/**
* Get the thumbnail
*/
if ( current_theme_supports( 'get-the-image' ) )
// Get the thumbnail.
if ( current_theme_supports( 'get-the-image' ) ) {
get_the_image( array(
'size' => 'thumbnail',
'attachment' => false
));
}
?>

<div class="entry-content">
Expand All @@ -58,14 +56,13 @@
</header> <!-- .entry-header -->

<?php
/**
* Get the thumbnail
*/
if ( current_theme_supports( 'get-the-image' ) )
// Get the thumbnail.
if ( current_theme_supports( 'get-the-image' ) ) {
get_the_image( array(
'size' => 'thumbnail',
'attachment' => false
));
}
?>

<?php if ( is_archive() || is_search() ) : ?>
Expand Down
5 changes: 3 additions & 2 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* wrapper, which is opened with the header.php file. It also executes key functions needed
* by the theme, child themes, and plugins.
*
* @package Cakifo
* @package Cakifo
* @subpackage Template
*/
?>
Expand Down Expand Up @@ -39,8 +39,9 @@
* A sidebar in the footer? Yep. You can can customize your footer
* with three columns of widgets.
*/
if ( ! is_404() )
if ( ! is_404() ) {
get_sidebar( 'subsidiary' );
}
?>

<?php do_atomic( 'close_footer' ); // cakifo_close_footer ?>
Expand Down
Loading

0 comments on commit 6a1de2d

Please sign in to comment.