Skip to content

Commit

Permalink
Archive refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
awmartin committed Apr 2, 2017
1 parent 3824de1 commit 381fe9f
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions null.archive.php
Expand Up @@ -24,15 +24,13 @@ function NullArchiveTitle() {


function getArchiveTitle() { function getArchiveTitle() {
if ( is_category() ) : if ( is_category() ) :
return sprintf( __( '%s', 'null' ), single_cat_title( '', false ) ); return single_cat_title( '', false );


elseif ( is_tag() ) : elseif ( is_tag() ) :
return sprintf( __( '%s', 'null' ), single_tag_title( '', false ) ); return single_tag_title( '', false );


elseif ( is_author() ) : elseif ( is_author() ) :
global $wp_query; return NullAuthorFullName();
$author_obj = $wp_query->get_queried_object();
return $author_obj->first_name . ' ' . $author_obj->last_name;


elseif ( is_day() ) : elseif ( is_day() ) :
return sprintf( __( 'Daily Archives: %s', 'null' ), get_the_date() ); return sprintf( __( 'Daily Archives: %s', 'null' ), get_the_date() );
Expand All @@ -47,17 +45,17 @@ function getArchiveTitle() {
return __( 'Asides', 'null' ); return __( 'Asides', 'null' );




elseif ( is_tax( 'post_format', 'post-format-image' ) ) : // elseif ( is_tax( 'post_format', 'post-format-image' ) ) :
return __( 'Images', 'null'); // return __( 'Images', 'null');

//
elseif ( is_tax( 'post_format', 'post-format-video' ) ) : // elseif ( is_tax( 'post_format', 'post-format-video' ) ) :
return __( 'Videos', 'null' ); // return __( 'Videos', 'null' );

//
elseif ( is_tax( 'post_format', 'post-format-quote' ) ) : // elseif ( is_tax( 'post_format', 'post-format-quote' ) ) :
return __( 'Quotes', 'null' ); // return __( 'Quotes', 'null' );

//
elseif ( is_tax( 'post_format', 'post-format-link' ) ) : // elseif ( is_tax( 'post_format', 'post-format-link' ) ) :
return __( 'Links', 'null' ); // return __( 'Links', 'null' );


else : else :
return __( 'Archives', 'null' ); return __( 'Archives', 'null' );
Expand Down

0 comments on commit 381fe9f

Please sign in to comment.