compass-wp 0.0.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,55 @@
1
+ <?php
2
+ /**
3
+ * The Header for our theme.
4
+ *
5
+ * Displays all of the <head> section and everything up till <div id="main">
6
+ *
7
+ * @package WordPress
8
+ * @subpackage Starkers
9
+ * @since Starkers 3.0
10
+ */
11
+ ?><!DOCTYPE html>
12
+ <html <?php language_attributes(); ?>>
13
+ <head>
14
+ <meta charset="<?php bloginfo( 'charset' ); ?>" />
15
+ <title><?php
16
+ /*
17
+ * Print the <title> tag based on what is being viewed.
18
+ * We filter the output of wp_title() a bit -- see
19
+ * twentyten_filter_wp_title() in functions.php.
20
+ */
21
+ wp_title( '|', true, 'right' );
22
+
23
+ ?></title>
24
+ <link rel="profile" href="http://gmpg.org/xfn/11" />
25
+ <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
26
+ <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
27
+ <?php
28
+ /* We add some JavaScript to pages with the comment form
29
+ * to support sites with threaded comments (when in use).
30
+ */
31
+ if ( is_singular() && get_option( 'thread_comments' ) )
32
+ wp_enqueue_script( 'comment-reply' );
33
+
34
+ /* Always have wp_head() just before the closing </head>
35
+ * tag of your theme, or you will break many plugins, which
36
+ * generally use this hook to add elements to <head> such
37
+ * as styles, scripts, and meta tags.
38
+ */
39
+ wp_head();
40
+ ?>
41
+ </head>
42
+
43
+ <body <?php body_class(); ?>>
44
+
45
+ <h1>
46
+ <a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
47
+ </h1>
48
+ <p><?php bloginfo( 'description' ); ?></p>
49
+
50
+ <div id="access" role="navigation">
51
+ <?php /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?>
52
+ <a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyten' ); ?>"><?php _e( 'Skip to content', 'twentyten' ); ?></a>
53
+ <?php /* Our navigation menu. If one isn't filled out, wp_nav_menu falls back to wp_page_menu. The menu assiged to the primary position is the one used. If none is assigned, the menu with the lowest ID is used. */ ?>
54
+ <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
55
+ </div><!-- #access -->
@@ -0,0 +1 @@
1
+ /*=================== Header Styles ===================*/
Binary file
@@ -0,0 +1,27 @@
1
+ <?php
2
+ /**
3
+ * The main template file.
4
+ *
5
+ * This is the most generic template file in a WordPress theme
6
+ * and one of the two required files for a theme (the other being style.css).
7
+ * It is used to display a page when nothing more specific matches a query.
8
+ * E.g., it puts together the home page when no home.php file exists.
9
+ * Learn more: http://codex.wordpress.org/Template_Hierarchy
10
+ *
11
+ * @package WordPress
12
+ * @subpackage Starkers
13
+ * @since Starkers 3.0
14
+ */
15
+
16
+ get_header(); ?>
17
+
18
+ <?php
19
+ /* Run the loop to output the posts.
20
+ * If you want to overload this in a child theme then include a file
21
+ * called loop-index.php and that will be used instead.
22
+ */
23
+ get_template_part( 'loop', 'index' );
24
+ ?>
25
+
26
+ <?php get_sidebar(); ?>
27
+ <?php get_footer(); ?>
@@ -0,0 +1,135 @@
1
+ <?php
2
+ /**
3
+ * The loop that displays posts.
4
+ *
5
+ * The loop displays the posts and the post content. See
6
+ * http://codex.wordpress.org/The_Loop to understand it and
7
+ * http://codex.wordpress.org/Template_Tags to understand
8
+ * the tags used in it.
9
+ *
10
+ * This can be overridden in child themes with loop.php or
11
+ * loop-template.php, where 'template' is the loop context
12
+ * requested by a template. For example, loop-index.php would
13
+ * be used if it exists and we ask for the loop with:
14
+ * <code>get_template_part( 'loop', 'index' );</code>
15
+ *
16
+ * @package WordPress
17
+ * @subpackage Starkers
18
+ * @since Starkers 3.0
19
+ */
20
+ ?>
21
+
22
+ <?php /* Display navigation to next/previous pages when applicable */ ?>
23
+ <?php if ( $wp_query->max_num_pages > 1 ) : ?>
24
+ <?php next_posts_link( __( '&larr; Older posts', 'twentyten' ) ); ?>
25
+ <?php previous_posts_link( __( 'Newer posts &rarr;', 'twentyten' ) ); ?>
26
+ <?php endif; ?>
27
+
28
+ <?php /* If there are no posts to display, such as an empty archive page */ ?>
29
+ <?php if ( ! have_posts() ) : ?>
30
+ <h1><?php _e( 'Not Found', 'twentyten' ); ?></h1>
31
+ <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyten' ); ?></p>
32
+ <?php get_search_form(); ?>
33
+
34
+ <?php endif; ?>
35
+
36
+ <?php
37
+ /* Start the Loop.
38
+ *
39
+ * In Twenty Ten we use the same loop in multiple contexts.
40
+ * It is broken into three main parts: when we're displaying
41
+ * posts that are in the gallery category, when we're displaying
42
+ * posts in the asides category, and finally all other posts.
43
+ *
44
+ * Additionally, we sometimes check for whether we are on an
45
+ * archive page, a search page, etc., allowing for small differences
46
+ * in the loop on each template without actually duplicating
47
+ * the rest of the loop that is shared.
48
+ *
49
+ * Without further ado, the loop:
50
+ */ ?>
51
+ <?php while ( have_posts() ) : the_post(); ?>
52
+
53
+ <?php /* How to display posts in the Gallery category. */ ?>
54
+
55
+ <?php if ( in_category( _x('gallery', 'gallery category slug', 'twentyten') ) ) : ?>
56
+ <h2><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
57
+ <?php twentyten_posted_on(); ?>
58
+
59
+ <?php if ( post_password_required() ) : ?>
60
+ <?php the_content(); ?>
61
+ <?php else : ?>
62
+ <?php
63
+ $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) );
64
+ $total_images = count( $images );
65
+ $image = array_shift( $images );
66
+ $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' );
67
+ ?>
68
+ <a href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a>
69
+
70
+ <p><?php printf( __( 'This gallery contains <a %1$s>%2$s photos</a>.', 'twentyten' ),
71
+ 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"',
72
+ $total_images
73
+ ); ?></p>
74
+
75
+ <?php the_excerpt(); ?>
76
+ <?php endif; ?>
77
+
78
+ <a href="<?php echo get_term_link( _x('gallery', 'gallery category slug', 'twentyten'), 'category' ); ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a>
79
+ |
80
+ <?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?>
81
+ <?php edit_post_link( __( 'Edit', 'twentyten' ), '|', '' ); ?>
82
+
83
+ <?php /* How to display posts in the asides category */ ?>
84
+
85
+ <?php elseif ( in_category( _x('asides', 'asides category slug', 'twentyten') ) ) : ?>
86
+
87
+ <?php if ( is_archive() || is_search() ) : // Display excerpts for archives and search. ?>
88
+ <?php the_excerpt(); ?>
89
+ <?php else : ?>
90
+ <?php the_content( __( 'Continue reading &rarr;', 'twentyten' ) ); ?>
91
+ <?php endif; ?>
92
+
93
+ <?php twentyten_posted_on(); ?>
94
+ |
95
+ <?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?>
96
+ <?php edit_post_link( __( 'Edit', 'twentyten' ), '| ', '' ); ?>
97
+
98
+ <?php /* How to display all other posts. */ ?>
99
+
100
+ <?php else : ?>
101
+ <h2><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
102
+ <?php twentyten_posted_on(); ?>
103
+
104
+ <?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
105
+ <?php the_excerpt(); ?>
106
+ <?php else : ?>
107
+ <?php the_content( __( 'Continue reading &rarr;', 'twentyten' ) ); ?>
108
+ <?php wp_link_pages( array( 'before' => '' . __( 'Pages:', 'twentyten' ), 'after' => '' ) ); ?>
109
+ <?php endif; ?>
110
+
111
+ <?php if ( count( get_the_category() ) ) : ?>
112
+ <?php printf( __( 'Posted in %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?>
113
+ |
114
+ <?php endif; ?>
115
+ <?php
116
+ $tags_list = get_the_tag_list( '', ', ' );
117
+ if ( $tags_list ):
118
+ ?>
119
+ <?php printf( __( 'Tagged %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
120
+ |
121
+ <?php endif; ?>
122
+ <?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?>
123
+ <?php edit_post_link( __( 'Edit', 'twentyten' ), '| ', '' ); ?>
124
+
125
+ <?php comments_template( '', true ); ?>
126
+
127
+ <?php endif; // This was the if statement that broke the loop into three parts based on categories. ?>
128
+
129
+ <?php endwhile; // End the loop. Whew. ?>
130
+
131
+ <?php /* Display navigation to next/previous pages when applicable */ ?>
132
+ <?php if ( $wp_query->max_num_pages > 1 ) : ?>
133
+ <?php next_posts_link( __( '&larr; Older posts', 'twentyten' ) ); ?>
134
+ <?php previous_posts_link( __( 'Newer posts &rarr;', 'twentyten' ) ); ?>
135
+ <?php endif; ?>
@@ -0,0 +1,27 @@
1
+ # Make sure you list all the project template files here in the manifest.
2
+ file '404.php'
3
+ file 'archive.php'
4
+ file 'attachment.php'
5
+ file 'author.php'
6
+ file 'category.php'
7
+ file 'comments.php'
8
+ file 'footer.php'
9
+ file 'functions.php'
10
+ file 'header.php'
11
+ file 'index.php'
12
+ file 'loop.php'
13
+ file 'page.php'
14
+ file 'search.php'
15
+ file 'sidebar.php'
16
+ file 'sidebar-footer.php'
17
+ file 'single.php'
18
+ file 'tag.php'
19
+ file 'style.css'
20
+ file 'screenshot.png'
21
+ file '_LICENSE.txt'
22
+ file '_READ_ME.txt'
23
+ stylesheet '_base.scss'
24
+ stylesheet 'style.scss', :media => 'screen, projection'
25
+ stylesheet 'footer.scss', :media => 'screen, projection'
26
+ stylesheet 'header.scss', :media => 'screen, projection'
27
+ stylesheet 'navigation.scss', :media => 'screen, projection'
@@ -0,0 +1 @@
1
+ /*=================== Navigation Styles ===================*/
@@ -0,0 +1,28 @@
1
+ <?php
2
+ /**
3
+ * Template Name: One column, no sidebar
4
+ *
5
+ * A custom page template without sidebar.
6
+ *
7
+ * The "Template Name:" bit above allows this to be selectable
8
+ * from a dropdown menu on the edit page screen.
9
+ *
10
+ * @package WordPress
11
+ * @subpackage Starkers
12
+ * @since Starkers 3.0
13
+ */
14
+
15
+ get_header(); ?>
16
+
17
+ <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
18
+
19
+ <h1><?php the_title(); ?></h1>
20
+ <?php the_content(); ?>
21
+ <?php wp_link_pages( array( 'before' => '' . __( 'Pages:', 'twentyten' ), 'after' => '' ) ); ?>
22
+ <?php edit_post_link( __( 'Edit', 'twentyten' ), '', '' ); ?>
23
+
24
+ <?php comments_template( '', true ); ?>
25
+
26
+ <?php endwhile; ?>
27
+
28
+ <?php get_footer(); ?>
@@ -0,0 +1,34 @@
1
+ <?php
2
+ /**
3
+ * The template for displaying all pages.
4
+ *
5
+ * This is the template that displays all pages by default.
6
+ * Please note that this is the wordpress construct of pages
7
+ * and that other 'pages' on your wordpress site will use a
8
+ * different template.
9
+ *
10
+ * @package WordPress
11
+ * @subpackage Starkers
12
+ * @since Starkers 3.0
13
+ */
14
+
15
+ get_header(); ?>
16
+
17
+ <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
18
+
19
+ <?php if ( is_front_page() ) { ?>
20
+ <h2><?php the_title(); ?></h2>
21
+ <?php } else { ?>
22
+ <h1><?php the_title(); ?></h1>
23
+ <?php } ?>
24
+
25
+ <?php the_content(); ?>
26
+ <?php wp_link_pages( array( 'before' => '' . __( 'Pages:', 'twentyten' ), 'after' => '' ) ); ?>
27
+ <?php edit_post_link( __( 'Edit', 'twentyten' ), '', '' ); ?>
28
+
29
+ <?php comments_template( '', true ); ?>
30
+
31
+ <?php endwhile; ?>
32
+
33
+ <?php get_sidebar(); ?>
34
+ <?php get_footer(); ?>
Binary file
@@ -0,0 +1,28 @@
1
+ <?php
2
+ /**
3
+ * The template for displaying Search Results pages.
4
+ *
5
+ * @package WordPress
6
+ * @subpackage Starkers
7
+ * @since Starkers 3.0
8
+ */
9
+
10
+ get_header(); ?>
11
+
12
+ <?php if ( have_posts() ) : ?>
13
+ <h1><?php printf( __( 'Search Results for: %s', 'twentyten' ), '' . get_search_query() . '' ); ?></h1>
14
+ <?php
15
+ /* Run the loop for the search to output the results.
16
+ * If you want to overload this in a child theme then include a file
17
+ * called loop-search.php and that will be used instead.
18
+ */
19
+ get_template_part( 'loop', 'search' );
20
+ ?>
21
+ <?php else : ?>
22
+ <h2><?php _e( 'Nothing Found', 'twentyten' ); ?></h2>
23
+ <p><?php _e( 'Sorry, but nothing matched your search criteria. Please try again with some different keywords.', 'twentyten' ); ?></p>
24
+ <?php get_search_form(); ?>
25
+ <?php endif; ?>
26
+
27
+ <?php get_sidebar(); ?>
28
+ <?php get_footer(); ?>
@@ -0,0 +1,48 @@
1
+ <?php
2
+ /**
3
+ * The Footer widget areas.
4
+ *
5
+ * @package WordPress
6
+ * @subpackage Starkers
7
+ * @since Starkers 3.0
8
+ */
9
+ ?>
10
+
11
+ <?php
12
+ /* The footer widget area is triggered if any of the areas
13
+ * have widgets. So let's check that first.
14
+ *
15
+ * If none of the sidebars have widgets, then let's bail early.
16
+ */
17
+ if ( ! is_active_sidebar( 'first-footer-widget-area' )
18
+ && ! is_active_sidebar( 'second-footer-widget-area' )
19
+ && ! is_active_sidebar( 'third-footer-widget-area' )
20
+ && ! is_active_sidebar( 'fourth-footer-widget-area' )
21
+ )
22
+ return;
23
+ // If we get this far, we have widgets. Let do this.
24
+ ?>
25
+
26
+ <?php if ( is_active_sidebar( 'first-footer-widget-area' ) ) : ?>
27
+ <ul class="xoxo">
28
+ <?php dynamic_sidebar( 'first-footer-widget-area' ); ?>
29
+ </ul>
30
+ <?php endif; ?>
31
+
32
+ <?php if ( is_active_sidebar( 'second-footer-widget-area' ) ) : ?>
33
+ <ul class="xoxo">
34
+ <?php dynamic_sidebar( 'second-footer-widget-area' ); ?>
35
+ </ul>
36
+ <?php endif; ?>
37
+
38
+ <?php if ( is_active_sidebar( 'third-footer-widget-area' ) ) : ?>
39
+ <ul class="xoxo">
40
+ <?php dynamic_sidebar( 'third-footer-widget-area' ); ?>
41
+ </ul>
42
+ <?php endif; ?>
43
+
44
+ <?php if ( is_active_sidebar( 'fourth-footer-widget-area' ) ) : ?>
45
+ <ul class="xoxo">
46
+ <?php dynamic_sidebar( 'fourth-footer-widget-area' ); ?>
47
+ </ul>
48
+ <?php endif; ?>
@@ -0,0 +1,52 @@
1
+ <?php
2
+ /**
3
+ * The Sidebar containing the primary and secondary widget areas.
4
+ *
5
+ * @package WordPress
6
+ * @subpackage Starkers
7
+ * @since Starkers 3.0
8
+ */
9
+ ?>
10
+
11
+ <ul class="xoxo">
12
+
13
+ <?php
14
+ /* When we call the dynamic_sidebar() function, it'll spit out
15
+ * the widgets for that widget area. If it instead returns false,
16
+ * then the sidebar simply doesn't exist, so we'll hard-code in
17
+ * some default sidebar stuff just in case.
18
+ */
19
+ if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?>
20
+
21
+ <li>
22
+ <?php get_search_form(); ?>
23
+ </li>
24
+
25
+ <li>
26
+ <h3><?php _e( 'Archives', 'twentyten' ); ?></h3>
27
+ <ul>
28
+ <?php wp_get_archives( 'type=monthly' ); ?>
29
+ </ul>
30
+ </li>
31
+
32
+ <li>
33
+ <h3><?php _e( 'Meta', 'twentyten' ); ?></h3>
34
+ <ul>
35
+ <?php wp_register(); ?>
36
+ <li><?php wp_loginout(); ?></li>
37
+ <?php wp_meta(); ?>
38
+ </ul>
39
+ </li>
40
+
41
+ <?php endif; // end primary widget area ?>
42
+ </ul>
43
+
44
+ <?php
45
+ // A second sidebar for widgets, just because.
46
+ if ( is_active_sidebar( 'secondary-widget-area' ) ) : ?>
47
+
48
+ <ul class="xoxo">
49
+ <?php dynamic_sidebar( 'secondary-widget-area' ); ?>
50
+ </ul>
51
+
52
+ <?php endif; ?>