Browse files

Moved templates and last few functions

  • Loading branch information...
1 parent f4f3f36 commit af0f8e2ffde75e2252fe7fd76093b6d9eafa3f23 @eyeseast eyeseast committed Feb 16, 2012
Showing with 116 additions and 3 deletions.
  1. 0 comments.php
  2. +1 −1 footer.php
  3. +27 −0 functions.php
  4. +10 −2 includes/sidebars.php
  5. +35 −0 page.php
  6. +24 −0 sidebar-post.php
  7. +19 −0 sidebar.php
View
0 comments.php
No changes.
View
2 footer.php
@@ -5,7 +5,7 @@
* Contains the closing of the id=main div and all content
* after.
*/
-$blogger = argo_get_primary_blogger();
+// $blogger = argo_get_primary_blogger();
?>
</div> <!-- #main .container_12 -->
</div> <!-- #local-wrapper -->
View
27 functions.php
@@ -425,6 +425,22 @@ function argo_pagination($range = 4){
}
}
+/**
+ * argo_get_twitter_screen_name(): provide the actual screen name or the blog's
+ * name.
+ */
+function argo_get_twitter_screen_name() {
+ // XXX: change twitter_link property to only contain screename.
+ $turl = get_option( 'twitter_link' );
+ if ( $turl ) {
+ $screen_name = preg_replace( '/https?:\/\/twitter.com\/\#?\!?\/?/', '', $turl );
+ return '@' . $screen_name;
+ }
+ else {
+ return get_bloginfo( 'name' );
+ }
+}
+
function argo_get_sanitized_title( $max_title_length = 140 ) {
$title = get_the_title();
@@ -532,4 +548,15 @@ function argo_custom_taxonomy_terms( $post_id ) {
}
endif;
+/**
+ * Builds the proper searchform action URL. This works around a condition with
+ * WordPress MultiSite that requires this URL to have a trailing slash.
+ *
+ */
+function navis_the_searchform_url() {
+ $url = get_bloginfo( 'url', 'display' );
+ echo ( $url ) ? trailingslashit( $url ) : $url;
+}
+
+
?>
View
12 includes/sidebars.php
@@ -6,9 +6,17 @@ function sw_remove_some_widgets(){
}
add_action( 'init', 'sw_remove_some_widgets', 11 );
-
-
function sw_register_sidebars() {
+ // primary
+ register_sidebar( array(
+ 'name' => 'Primary',
+ 'id' => 'primary-widget-area',
+ 'description' => 'The primary widget area',
+ 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
+ 'after_widget' => '</li>',
+ 'before_title' => '<h3 class="widget-title">',
+ 'after_title' => '</h3>',
+ ) );
// sidebar-about.php
register_sidebar( array(
View
35 page.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * The template for displaying all pages.
+ */
+?>
+
+<?php get_header(); ?>
+
+<article id="content" class="grid_8" role="main">
+
+<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
+
+ <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+ <?php if ( is_front_page() ) { ?>
+ <h2 class="entry-title"><?php the_title(); ?></h2>
+ <?php } else { ?>
+ <h2 class="entry-title"><?php the_title(); ?></h2>
+ <?php } ?>
+
+ <div class="entry-content">
+ <?php the_content(); ?>
+ <?php wp_link_pages( array( 'before' => '<div class="page-link">Pages:', 'after' => '</div>' ) ); ?>
+ </div><!-- .entry-content -->
+ </div><!-- #post-## -->
+
+
+<?php endwhile; ?>
+
+</article><!-- / #content .grid8 -->
+
+<aside id="sidebar" class="grid_4">
+<?php get_sidebar(); ?>
+</aside>
+<!-- /.grid_4 -->
+<?php get_footer(); ?>
View
24 sidebar-post.php
@@ -0,0 +1,24 @@
+<?php
+/**
+ * post sidebar
+ */
+?>
+
+<div id="category-sidebar" class="widget-area" role="complementary">
+<ul class="widget-list">
+
+<?php
+ /* When we call the dynamic_sidebar() function, it'll spit out
+ * the widgets for that widget area. If it instead returns false,
+ * then the sidebar simply doesn't exist, so we'll hard-code in
+ * some default sidebar stuff just in case.
+ */
+ if ( ! dynamic_sidebar( 'post' ) ) : ?>
+
+ <!-- show if sidebar is empty -->
+
+<?php endif; // end primary widget area ?>
+ </ul>
+ </div><!-- #primary .widget-area -->
+
+
View
19 sidebar.php
@@ -0,0 +1,19 @@
+<?php
+/**
+ * The Sidebar containing the primary widget area.
+ */
+?>
+<div id="primary" class="widget-area" role="complementary">
+ <ul class="widget-list">
+
+<?php
+ /* When we call the dynamic_sidebar() function, it'll spit out
+ * the widgets for that widget area. If it instead returns false,
+ * then the sidebar simply doesn't exist, so we'll hard-code in
+ * some default sidebar stuff just in case.
+ */
+ dynamic_sidebar( 'primary-widget-area' );
+ //if ( ! dynamic_sidebar( 'primary-widget-area' ) ) :
+ // endif; // end primary widget area ?>
+ </ul>
+</div><!-- #primary .widget-area -->

0 comments on commit af0f8e2

Please sign in to comment.