Permalink
Browse files

simplified templates

  • Loading branch information...
1 parent 29dd743 commit 9bc3643056f6264fd9d6c696683e962e3ddd7786 @bueltge committed Feb 11, 2013
Showing with 93 additions and 134 deletions.
  1. +37 −1 functions.php
  2. +1 −2 home.php
  3. +4 −25 index.php
  4. BIN languages/de_DE.mo
  5. +16 −24 languages/de_DE.po
  6. +16 −24 languages/xx_XX.pot
  7. +8 −25 page.php
  8. +11 −33 single.php
View
@@ -404,4 +404,40 @@ function documentation_wp_title( $title, $sep ) {
return $title;
}
-} // end if function exists
+} // end if function exists
+
+
+if ( ! function_exists( 'documentation_post_info' ) ) {
+
+ /**
+ * Prints HTML with meta information for the current post
+ *
+ * @return void
+ * @since 02/11/2013
+ */
+ function documentation_post_info() {
+ ?>
+ <p class="info">
+ <?php
+ if ( get_the_category_list() )
+ $cat = __( 'Category: %s<br />', 'documentation' );
+ else
+ $cat = '';
+
+ printf(
+ $cat . __( '%s updated at %s by %s, write at %s by %s', 'documentation' ),
+ get_the_category_list( ', ' ),
+ get_the_tag_list( __( 'Tags:', 'documentation' ) . ' ', ', ', '<br />' ),
+ get_the_modified_date(),
+ get_the_modified_author(),
+ get_the_date(),
+ get_the_author()
+ );
+
+ edit_post_link( __( 'Edit', 'documentation' ), ' | ', '' );
+ ?>
+ </p>
+ <?php
+ }
+
+} // end if function exists
View
@@ -8,8 +8,6 @@
if ( have_posts() ) :
- $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
- query_posts( $query_string . "&paged=$paged" );
while ( have_posts() ) :
the_post();
?>
@@ -22,6 +20,7 @@
<?php
endwhile;
+
else:
/**
View
@@ -32,33 +32,13 @@
while ( have_posts() ) :
the_post();
- ?>
-
- <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
-
- <div class="story">
- <?php
- the_content( __( '... more &raquo;', 'documentation' ) . the_title( ' ', '', FALSE ) );
- wp_link_pages();
- ?>
- <p class="info">
- <?php
- printf(
- __( 'Category: %s, write at %s by %s', 'documentation' ),
- get_the_category_list( ', ' ),
- get_the_date(),
- get_the_author()
- );
- ?>
- </p>
- </div>
- </div>
-
- <?php
+ get_template_part( 'parts/content', 'single' );
+
endwhile;
+ tha_content_bottom();
+
else:
/**
@@ -68,7 +48,6 @@
*/
get_template_part( 'parts/no-results', 'home' );
- tha_content_bottom();
endif;
get_footer();
View
Binary file not shown.
View
@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: Documentation v2.3.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-14 13:32+0100\n"
-"PO-Revision-Date: 2013-02-11 13:29:14+0000\n"
+"PO-Revision-Date: 2013-02-11 15:03:17+0000\n"
"Last-Translator: Frank Bueltge <frank@bueltge.de>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -30,16 +30,14 @@ msgstr "Archiv für Kategorie"
msgid "Archive"
msgstr "Archiv"
-#: index.php:43
-#: index.php:56
+#: parts/content-single.php:16
#@ documentation
msgid "... more &raquo;"
msgstr "... weiterlesen &raquo;"
#: functions.php:252
#: functions.php:280
-#: page.php:32
-#: single.php:37
+#: functions.php:435
#@ documentation
msgid "Edit"
msgstr "Bearbeiten"
@@ -210,25 +208,7 @@ msgstr "&laquo; vorherige"
msgid "Next &raquo;"
msgstr "nächste &raquo;"
-#: index.php:47
-#, php-format
-#@ documentation
-msgid "Category: %s, write at %s by %s"
-msgstr "Kategorie: %s, geschrieben am %s von %s"
-
-#: page.php:26
-#, php-format
-#@ documentation
-msgid "Updated at %s by %s, write at %s by %s"
-msgstr "Aktualisiert am %s von %s, erstellt am %s von %s"
-
-#: single.php:29
-#, php-format
-#@ documentation
-msgid "Category: %s<br />%s updated at %s by %s, write at %s by %s"
-msgstr "Kategorie: %s<br />%s aktualisiert an %s von %s, erstellt am %s von %s"
-
-#: single.php:31
+#: functions.php:429
#@ documentation
msgid "Tags:"
msgstr "Schlagworte:"
@@ -414,3 +394,15 @@ msgstr "<strong>Textfarbe</strong>:"
msgid "Archive for tag"
msgstr "Archiv für Schlagwort"
+#: functions.php:423
+#, php-format
+#@ documentation
+msgid "Category: %s<br />"
+msgstr "Kategorie: %s<br />"
+
+#: functions.php:427
+#, php-format
+#@ documentation
+msgid "%s updated at %s by %s, write at %s by %s"
+msgstr "aktualisiert am %s von %s, erstellt am %s von %s"
+
View
@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: Documentation v2.3.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-14 13:32+0100\n"
-"PO-Revision-Date: 2013-02-11 13:29:14+0000\n"
+"PO-Revision-Date: 2013-02-11 15:03:17+0000\n"
"Last-Translator: Frank Bueltge <frank@bueltge.de>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -30,16 +30,14 @@ msgstr "Archiv für Kategorie"
msgid "Archive"
msgstr "Archiv"
-#: index.php:43
-#: index.php:56
+#: parts/content-single.php:16
#@ documentation
msgid "... more &raquo;"
msgstr "... weiterlesen &raquo;"
#: functions.php:252
#: functions.php:280
-#: page.php:32
-#: single.php:37
+#: functions.php:435
#@ documentation
msgid "Edit"
msgstr "Bearbeiten"
@@ -210,25 +208,7 @@ msgstr "&laquo; vorherige"
msgid "Next &raquo;"
msgstr "nächste &raquo;"
-#: index.php:47
-#, php-format
-#@ documentation
-msgid "Category: %s, write at %s by %s"
-msgstr "Kategorie: %s, geschrieben am %s von %s"
-
-#: page.php:26
-#, php-format
-#@ documentation
-msgid "Updated at %s by %s, write at %s by %s"
-msgstr "Aktualisiert am %s von %s, erstellt am %s von %s"
-
-#: single.php:29
-#, php-format
-#@ documentation
-msgid "Category: %s<br />%s updated at %s by %s, write at %s by %s"
-msgstr "Kategorie: %s<br />%s aktualisiert an %s von %s, erstellt am %s von %s"
-
-#: single.php:31
+#: functions.php:429
#@ documentation
msgid "Tags:"
msgstr "Schlagworte:"
@@ -414,3 +394,15 @@ msgstr "<strong>Textfarbe</strong>:"
msgid "Archive for tag"
msgstr "Archiv für Schlagwort"
+#: functions.php:423
+#, php-format
+#@ documentation
+msgid "Category: %s<br />"
+msgstr "Kategorie: %s<br />"
+
+#: functions.php:427
+#, php-format
+#@ documentation
+msgid "%s updated at %s by %s, write at %s by %s"
+msgstr "aktualisiert am %s von %s, erstellt am %s von %s"
+
View
@@ -11,33 +11,18 @@
tha_content_top();
while ( have_posts() ) :
- the_post(); ?>
+ the_post();
- <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
-
- <h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
- <?php
- the_content();
- wp_link_pages();
- ?>
- <p class="info">
- <?php
- printf(
- __( 'Updated at %s by %s, write at %s by %s', 'documentation' ),
- get_the_modified_date(),
- get_the_modified_author(),
- get_the_date(),
- get_the_author()
- );
- edit_post_link( __( 'Edit', 'documentation' ), ' | ', '' );
- ?>
- </p>
+ get_template_part( 'parts/content', 'single' );
- </div>
- <?php
- comments_template();
+ // If comments are open or we have at least one comment, load up the comment template
+ if ( comments_open() || '0' != get_comments_number() )
+ comments_template();
endwhile;
+
+ tha_content_bottom();
+
else:
/**
@@ -47,8 +32,6 @@
*/
get_template_part( 'parts/no-results', 'home' );
- tha_content_bottom();
-
endif;
get_footer();
View
@@ -11,38 +11,18 @@
tha_content_top();
while ( have_posts() ) :
- the_post(); ?>
-
- <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
-
- <h2><?php the_title(); ?></h2>
- <?php
- if ( current_theme_supports( 'post-thumbnails' ) )
- the_post_thumbnail();
- the_content();
- wp_link_pages();
- if ( function_exists( 'archive_page_link' ) ) { archive_page_link(); } ?>
-
- <p class="info">
- <?php
- printf(
- __( 'Category: %s<br />%s updated at %s by %s, write at %s by %s', 'documentation' ),
- get_the_category_list( ', ' ),
- get_the_tag_list( __( 'Tags:', 'documentation' ) . ' ', ', ', '<br />' ),
- get_the_modified_date(),
- get_the_modified_author(),
- get_the_date(),
- get_the_author()
- );
- edit_post_link( __( 'Edit', 'documentation' ), ' | ', '' );
- ?>
- </p>
-
- <?php tha_content_after(); ?>
-
- </div>
- <?php
+ the_post();
+
+ get_template_part( 'parts/content', 'single' );
+
+ // If comments are open or we have at least one comment, load up the comment template
+ if ( comments_open() || '0' != get_comments_number() )
+ comments_template();
+
endwhile;
+
+ tha_content_bottom();
+
else:
/**
@@ -52,8 +32,6 @@
*/
get_template_part( 'parts/no-results', 'home' );
- tha_content_bottom();
-
endif;
get_footer();

0 comments on commit 9bc3643

Please sign in to comment.