Ticket #4517: 4517-bundle-sandbox-1.0.diff
File 4517-bundle-sandbox-1.0.diff, 220.5 KB (added by , 18 years ago) |
---|
-
wp-content/themes/sandbox/footer.php
1 2 <div id="footer"> 3 <span id="generator-link"><a href="http://wordpress.org/" title="<?php _e('WordPress', 'sandbox'); ?>" rel="generator"><?php _e('WordPress', 'sandbox'); ?></a></span> 4 <span class="meta-sep">|</span> 5 <span id="theme-link"><a href="http://www.plaintxt.org/themes/sandbox/" title="<?php _e('Sandbox for WordPress', 'sandbox'); ?>" rel="designer"><?php _e('Sandbox', 'sandbox'); ?></a></span> 6 </div><!-- #footer --> 7 8 </div><!-- #wrapper .hfeed --> 9 10 <?php wp_footer() ?> 11 12 </body> 13 </html> 14 No newline at end of file -
wp-content/themes/sandbox/style.css
1 /* 2 THEME NAME: Sandbox 3 THEME URI: http://www.plaintxt.org/themes/sandbox/ 4 DESCRIPTION: A theme rich with powerful and dynamic semantic class selectors; a canvas for CSS artists 5 VERSION: 1.0 6 AUTHOR: <a href="http://andy.wordpress.com/">Andy Skelton</a> & <a href="http://www.plaintxt.org/">Scott Allan Wallick</a> 7 AUTHOR URI: 8 */ 9 10 /* Two-column with sidebar on left from the /sandbox-layouts/ folder */ 11 @import url('sandbox-layouts/2c-l.css'); 12 13 /* Just some example content */ 14 div#header{text-align:center;margin-bottom:2em;} 15 div#access div.skip-link{position:absolute;top:1em;right:1em;} 16 div#menu{font-size:0.9em;height:1.5em;padding-top:0.3em;background:#eee;width:100%;} 17 div#menu ul a{font-weight:700;text-decoration:none;} 18 div#menu ul,div#menu ul ul,div#menu ul li{list-style:none;margin:0;padding:0;} 19 div#menu ul li{float:left;} 20 div#menu ul li a{background:#eee;padding:0.3em 0.5em;} 21 div#menu ul ul{display:none;} 22 div#menu ul ul li{float:none;} 23 div#menu ul ul li a{margin:0;padding:0;} 24 div#menu ul li:hover ul{display:block;font-size:0.9em;padding-top:0.5em;position:absolute;} 25 div#menu ul li:hover ul li a{background:#f5f5f5;border:none;display:block;padding:0.1em;width:10em;} 26 27 .entry-title{clear:both;} 28 div#container,div.sidebar{margin-top:2em;} 29 div#nav-above,div#nav-below{width:100%;height:1em;} 30 div#nav-above{margin-bottom:1em;} 31 div#nav-below{margin-top:1em;} 32 .alignleft,div.nav-previous{float: left;} 33 .alignright,div.nav-next{float: right;} 34 form#commentform .form-label{margin:1em 0 0;} 35 form#commentform span.required{background:#fff;color:red;} 36 form#commentform,form#commentform p{padding:0;} 37 input#author,input#email,input#url{width:50%;} 38 input#author,input#email,input#url,textarea#comment{padding:0.2em;} 39 div.comments ol li{margin:0 0 3.5em;} 40 textarea#comment{height:13em;margin:0 0 0.5em;overflow:auto;width:66%;} 41 42 div.sidebar div,div.sidebar h3,div.sidebar ul,div.sidebar li{margin:0;padding:0;} 43 div.sidebar h3{font-size:1.2em;} 44 div.sidebar input#s{width:7em;} 45 div.sidebar li{list-style:none;margin:0 0 1em;} 46 div.sidebar li form{margin:0.2em 0 0;padding:0;} 47 div.sidebar ul ul{margin:0 0 0 1em;} 48 div.sidebar ul ul li{list-style:disc;margin:0;} 49 div.sidebar ul ul ul{margin:0 0 0 0.5em;} 50 div.sidebar ul ul ul li{list-style:circle;} 51 52 div#footer{text-align:center;} 53 No newline at end of file -
wp-content/themes/sandbox/author.php
1 <?php get_header() ?> 2 3 <div id="container"> 4 <div id="content"> 5 6 <?php the_post() ?> 7 8 <h2 class="page-title author"><?php printf(__('Author Archives: <span class="vcard">%s</span>', 'sandbox'), "<a class='url fn n' href='$authordata->user_url' title='$authordata->display_name' rel='me'>$authordata->display_name</a>") ?></h2> 9 <div class="archive-meta"><?php if ( !(''== $authordata->user_description) ) : echo apply_filters('archive_meta', $authordata->user_description); endif; ?></div> 10 11 <div id="nav-above" class="navigation"> 12 <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'sandbox')) ?></div> 13 <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'sandbox')) ?></div> 14 </div> 15 16 <?php rewind_posts(); while (have_posts()) : the_post(); ?> 17 18 <div id="post-<?php the_ID(); ?>" class="<?php sandbox_post_class(); ?>"> 19 <h3 class="entry-title"><a href="<?php the_permalink() ?>" title="<?php printf(__('Permalink to %s', 'sandbox'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark"><?php the_title(); ?></a></h3> 20 <div class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO'); ?>"><?php unset($previousday); printf(__('%1$s – %2$s', 'sandbox'), the_date('', '', '', false), get_the_time()) ?></abbr></div> 21 <div class="entry-content "> 22 <?php the_excerpt(''.__('Read More <span class="meta-nav">»</span>', 'sandbox').'') ?> 23 24 </div> 25 <div class="entry-meta"> 26 <span class="cat-links"><?php printf(__('Posted in %s', 'sandbox'), get_the_category_list(', ')) ?></span> 27 <span class="meta-sep">|</span> 28 <?php the_tags(__('<span class="tag-links">Tagged ', 'sandbox'), ", ", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n") ?> 29 <?php edit_post_link(__('Edit', 'sandbox'), "\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n"); ?> 30 <span class="comments-link"><?php comments_popup_link(__('Comments (0)', 'sandbox'), __('Comments (1)', 'sandbox'), __('Comments (%)', 'sandbox')) ?></span> 31 </div> 32 </div><!-- .post --> 33 34 <?php endwhile ?> 35 36 <div id="nav-below" class="navigation"> 37 <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'sandbox')) ?></div> 38 <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'sandbox')) ?></div> 39 </div> 40 41 </div><!-- #content --> 42 </div><!-- #container --> 43 44 <?php get_sidebar() ?> 45 <?php get_footer() ?> 46 No newline at end of file -
wp-content/themes/sandbox/archives.php
1 <?php 2 /* 3 Template Name: Archives Page 4 */ 5 ?> 6 <?php get_header() ?> 7 8 <div id="container"> 9 <div id="content"> 10 11 <?php the_post() ?> 12 13 <div id="post-<?php the_ID() ?>" class="<?php sandbox_post_class() ?>"> 14 <h2 class="entry-title"><?php the_title() ?></h2> 15 <div class="entry-content"> 16 <?php the_content(); ?> 17 18 <ul id="archives-page" class="xoxo"> 19 <li id="category-archives" class="content-column"> 20 <h3><?php _e('Archives by Category', 'sandbox') ?></h3> 21 <ul> 22 <?php wp_list_cats('sort_column=name&optioncount=1&feed=RSS') ?> 23 </ul> 24 </li> 25 <li id="monthly-archives" class="content-column"> 26 <h3><?php _e('Archives by Month', 'sandbox') ?></h3> 27 <ul> 28 <?php wp_get_archives('type=monthly&show_post_count=1') ?> 29 </ul> 30 </li> 31 </ul> 32 <?php edit_post_link(__('Edit', 'sandbox'),'<span class="edit-link">','</span>') ?> 33 34 </div> 35 </div><!-- .post --> 36 37 <?php if ( get_post_custom_values('comments') ) comments_template() // Add a key/value of "comments" to enable comments on pages! ?> 38 39 </div><!-- #content --> 40 </div><!-- #container --> 41 42 <?php get_sidebar() ?> 43 <?php get_footer() ?> 44 No newline at end of file -
wp-content/themes/sandbox/search.php
1 <?php get_header() ?> 2 3 <div id="container"> 4 <div id="content"> 5 6 <?php if (have_posts()) : ?> 7 8 <h2 class="page-title"><?php _e('Search Results for:', 'sandbox') ?> <span id="search-terms"><?php echo wp_specialchars(stripslashes($_GET['s']), true); ?></span></h2> 9 10 <div id="nav-above" class="navigation"> 11 <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'sandbox')) ?></div> 12 <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'sandbox')) ?></div> 13 </div> 14 15 <?php while ( have_posts() ) : the_post(); ?> 16 17 <div id="post-<?php the_ID() ?>" class="<?php sandbox_post_class() ?>"> 18 <h3 class="entry-title"><a href="<?php the_permalink() ?>" title="<?php printf(__('Permalink to %s', 'sandbox'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark"><?php the_title() ?></a></h3> 19 <div class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO'); ?>"><?php unset($previousday); printf(__('%1$s – %2$s', 'sandbox'), the_date('', '', '', false), get_the_time()) ?></abbr></div> 20 <div class="entry-content"> 21 <?php the_excerpt(''.__('Read More <span class="meta-nav">»</span>', 'sandbox').'') ?> 22 23 </div> 24 <div class="entry-meta"> 25 <span class="author vcard"><?php printf(__('By %s', 'sandbox'), '<a class="url fn n" href="'.get_author_link(false, $authordata->ID, $authordata->user_nicename).'" title="' . sprintf(__('View all posts by %s', 'sandbox'), $authordata->display_name) . '">'.get_the_author().'</a>') ?></span> 26 <span class="meta-sep">|</span> 27 <span class="cat-links"><?php printf(__('Posted in %s', 'sandbox'), get_the_category_list(', ')) ?></span> 28 <span class="meta-sep">|</span> 29 <span class="tag-links"><?php the_tags(__('Tagged ', 'sandbox'), ', ') ?></span> 30 <span class="meta-sep">|</span> 31 <?php edit_post_link(__('Edit', 'sandbox'), "\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n"); ?> 32 <span class="comments-link"><?php comments_popup_link(__('Comments (0)', 'sandbox'), __('Comments (1)', 'sandbox'), __('Comments (%)', 'sandbox')) ?></span> 33 </div> 34 </div><!-- .post --> 35 36 <?php endwhile; ?> 37 38 <div id="nav-below" class="navigation"> 39 <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'sandbox')) ?></div> 40 <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'sandbox')) ?></div> 41 </div> 42 43 <?php else : ?> 44 45 <div id="post-0" class="post noresults"> 46 <h2 class="entry-title"><?php _e('Nothing Found', 'sandbox') ?></h2> 47 <div class="entry-content"> 48 <p><?php _e('Sorry, but nothing matched your search criteria. Please try again with some different keywords.', 'sandbox') ?></p> 49 </div> 50 <form id="noresults-searchform" method="get" action="<?php bloginfo('home') ?>"> 51 <div> 52 <input id="noresults-s" name="s" type="text" value="<?php echo wp_specialchars(stripslashes($_GET['s']), true) ?>" size="40" /> 53 <input id="noresults-searchsubmit" name="searchsubmit" type="submit" value="<?php _e('Find', 'sandbox') ?>" /> 54 </div> 55 </form> 56 </div><!-- .post --> 57 58 <?php endif; ?> 59 60 </div><!-- #content --> 61 </div><!-- #container --> 62 63 <?php get_sidebar() ?> 64 <?php get_footer() ?> 65 No newline at end of file -
wp-content/themes/sandbox/404.php
1 <?php get_header() ?> 2 3 <div id="container"> 4 <div id="content"> 5 6 <div id="post-0" class="post error404"> 7 <h2 class="entry-title"><?php _e('Not Found', 'sandbox') ?></h2> 8 <div class="entry-content"> 9 <p><?php _e('Apologies, but we were unable to find what you were looking for. Perhaps searching will help.', 'sandbox') ?></p> 10 </div> 11 <form id="error404-searchform" method="get" action="<?php bloginfo('home') ?>"> 12 <div> 13 <input id="error404-s" name="s" type="text" value="<?php echo wp_specialchars(stripslashes($_GET['s']), true) ?>" size="40" /> 14 <input id="error404-searchsubmit" name="searchsubmit" type="submit" value="<?php _e('Find', 'sandbox') ?>" /> 15 </div> 16 </form> 17 </div><!-- .post --> 18 19 </div><!-- #content --> 20 </div><!-- #container --> 21 22 <?php get_sidebar() ?> 23 <?php get_footer() ?> 24 No newline at end of file -
wp-content/themes/sandbox/index.php
1 <?php get_header() ?> 2 3 <div id="container"> 4 <div id="content"> 5 6 <div id="nav-above" class="navigation"> 7 <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'sandbox')) ?></div> 8 <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'sandbox')) ?></div> 9 </div> 10 11 <?php while ( have_posts() ) : the_post() ?> 12 <div id="post-<?php the_ID() ?>" class="<?php sandbox_post_class() ?>"> 13 <h2 class="entry-title"><a href="<?php the_permalink() ?>" title="<?php printf(__('Permalink to %s', 'sandbox'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark"><?php the_title() ?></a></h2> 14 <div class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO'); ?>"><?php unset($previousday); printf(__('%1$s – %2$s', 'sandbox'), the_date('', '', '', false), get_the_time()) ?></abbr></div> 15 <div class="entry-content"> 16 <?php the_content(''.__('Read More <span class="meta-nav">»</span>', 'sandbox').''); ?> 17 18 <?php link_pages("\t\t\t\t\t<div class='page-link'>".__('Pages: ', 'sandbox'), "</div>\n", 'number'); ?> 19 </div> 20 <div class="entry-meta"> 21 <span class="author vcard"><?php printf(__('By %s', 'sandbox'), '<a class="url fn n" href="'.get_author_link(false, $authordata->ID, $authordata->user_nicename).'" title="' . sprintf(__('View all posts by %s', 'sandbox'), $authordata->display_name) . '">'.get_the_author().'</a>') ?></span> 22 <span class="meta-sep">|</span> 23 <span class="cat-links"><?php printf(__('Posted in %s', 'sandbox'), get_the_category_list(', ')) ?></span> 24 <span class="meta-sep">|</span> 25 <?php the_tags(__('<span class="tag-links">Tagged ', 'sandbox'), ", ", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n") ?> 26 <?php edit_post_link(__('Edit', 'sandbox'), "\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n"); ?> 27 <span class="comments-link"><?php comments_popup_link(__('Comments (0)', 'sandbox'), __('Comments (1)', 'sandbox'), __('Comments (%)', 'sandbox')) ?></span> 28 </div> 29 </div><!-- .post --> 30 31 <?php comments_template() ?> 32 <?php endwhile ?> 33 34 <div id="nav-below" class="navigation"> 35 <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'sandbox')) ?></div> 36 <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'sandbox')) ?></div> 37 </div> 38 39 </div><!-- #content --> 40 </div><!-- #container --> 41 42 <?php get_sidebar() ?> 43 <?php get_footer() ?> 44 No newline at end of file -
wp-content/themes/sandbox/functions.php
1 <?php 2 // Produces a list of pages in the header without whitespace -- er, I mean negative space. 3 function sandbox_globalnav() { 4 echo '<div id="menu"><ul>'; 5 $menu = wp_list_pages('title_li=&sort_column=menu_order&echo=0'); // Params for the page list in header.php 6 echo str_replace(array("\r", "\n", "\t"), '', $menu); 7 echo "</ul></div>\n"; 8 } 9 10 // Generates semantic classes for BODY element 11 function sandbox_body_class( $print = true ) { 12 global $wp_query, $current_user; 13 14 // It's surely a WordPress blog, right? 15 $c = array('wordpress'); 16 17 // Applies the time- and date-based classes (below) to BODY element 18 sandbox_date_classes(time(), $c); 19 20 // Generic semantic classes for what type of content is displayed 21 is_home() ? $c[] = 'home' : null; 22 is_archive() ? $c[] = 'archive' : null; 23 is_date() ? $c[] = 'date' : null; 24 is_search() ? $c[] = 'search' : null; 25 is_paged() ? $c[] = 'paged' : null; 26 is_attachment() ? $c[] = 'attachment' : null; 27 is_404() ? $c[] = 'four04' : null; // CSS does not allow a digit as first character 28 29 // Special classes for BODY element when a single post 30 if ( is_single() ) { 31 $postID = $wp_query->post->ID; 32 the_post(); 33 34 // Adds 'single' class and class with the post ID 35 $c[] = 'single postid-' . $postID; 36 37 // Adds classes for the month, day, and hour when the post was published 38 if ( isset($wp_query->post->post_date) ) 39 sandbox_date_classes(mysql2date('U', $wp_query->post->post_date), $c, 's-'); 40 41 // Adds category classes for each category on single posts 42 if ( $cats = get_the_category() ) 43 foreach ( $cats as $cat ) 44 $c[] = 's-category-' . $cat->slug; 45 46 // Adds tag classes for each tags on single posts 47 if ( $tags = get_the_tags() ) 48 foreach ( $tags as $tag ) 49 $c[] = 's-tag-' . $tag->slug; 50 51 // Adds MIME-specific classes for attachments 52 if ( is_attachment() ) { 53 $the_mime = get_post_mime_type(); 54 $boring_stuff = array("application/", "image/", "text/", "audio/", "video/", "music/"); 55 $c[] = 'attachment-' . str_replace($boring_stuff, "", "$the_mime"); 56 } 57 58 // Adds author class for the post author 59 $c[] = 's-author-' . sanitize_title_with_dashes(strtolower(get_the_author('login'))); 60 rewind_posts(); 61 } 62 63 // Author name classes for BODY on author archives 64 else if ( is_author() ) { 65 $author = $wp_query->get_queried_object(); 66 $c[] = 'author'; 67 $c[] = 'author-' . $author->user_nicename; 68 } 69 70 // Category name classes for BODY on category archvies 71 else if ( is_category() ) { 72 $cat = $wp_query->get_queried_object(); 73 $c[] = 'category'; 74 $c[] = 'category-' . $cat->slug; 75 } 76 77 // Tag name classes for BODY on tag archives 78 else if ( is_tag() ) { 79 $tags = $wp_query->get_queried_object(); 80 $c[] = 'tag'; 81 $c[] = 'tag-' . $tags->slug; // Does not work; however I try to return the tag I get a false. Grrr. 82 } 83 84 // Page author for BODY on 'pages' 85 else if ( is_page() ) { 86 $pageID = $wp_query->post->ID; 87 the_post(); 88 $c[] = 'page pageid-' . $pageID; 89 $c[] = 'page-author-' . sanitize_title_with_dashes(strtolower(get_the_author('login'))); 90 rewind_posts(); 91 } 92 93 // For when a visitor is logged in while browsing 94 if ( $current_user->ID ) 95 $c[] = 'loggedin'; 96 97 // Paged classes; for 'page X' classes of index, single, etc. 98 if ( ( ( $page = $wp_query->get("paged") ) || ( $page = $wp_query->get("page") ) ) && $page > 1 ) { 99 $c[] = 'paged-'.$page.''; 100 if ( is_single() ) { 101 $c[] = 'single-paged-'.$page.''; 102 } else if ( is_page() ) { 103 $c[] = 'page-paged-'.$page.''; 104 } else if ( is_category() ) { 105 $c[] = 'category-paged-'.$page.''; 106 } else if ( is_tag() ) { 107 $c[] = 'tag-paged-'.$page.''; 108 } else if ( is_date() ) { 109 $c[] = 'date-paged-'.$page.''; 110 } else if ( is_author() ) { 111 $c[] = 'author-paged-'.$page.''; 112 } else if ( is_search() ) { 113 $c[] = 'search-paged-'.$page.''; 114 } 115 } 116 117 // Separates classes with a single space, collates classes for BODY 118 $c = join(' ', apply_filters('body_class', $c)); 119 120 // And tada! 121 return $print ? print($c) : $c; 122 } 123 124 // Generates semantic classes for each post DIV element 125 function sandbox_post_class( $print = true ) { 126 global $post, $sandbox_post_alt; 127 128 // hentry for hAtom compliace, gets 'alt' for every other post DIV, describes the post type and p[n] 129 $c = array('hentry', "p$sandbox_post_alt", $post->post_type, $post->post_status); 130 131 // Author for the post queried 132 $c[] = 'author-' . sanitize_title_with_dashes(strtolower(get_the_author('login'))); 133 134 // Category for the post queried 135 foreach ( (array) get_the_category() as $cat ) 136 $c[] = 'category-' . $cat->slug; 137 138 // Tags for the post queried 139 foreach ( (array) get_the_tags() as $tag ) 140 $c[] = 'tag-' . $tag->slug; 141 142 // For password-protected posts 143 if ( $post->post_password ) 144 $c[] = 'protected'; 145 146 // Applies the time- and date-based classes (below) to post DIV 147 sandbox_date_classes(mysql2date('U', $post->post_date), $c); 148 149 // If it's the other to the every, then add 'alt' class 150 if ( ++$sandbox_post_alt % 2 ) 151 $c[] = 'alt'; 152 153 // Separates classes with a single space, collates classes for post DIV 154 $c = join(' ', apply_filters('post_class', $c)); 155 156 // And tada! 157 return $print ? print($c) : $c; 158 } 159 160 // Define the num val for 'alt' classes (in post DIV and comment LI) 161 $sandbox_post_alt = 1; 162 163 // Generates semantic classes for each comment LI element 164 function sandbox_comment_class( $print = true ) { 165 global $comment, $post, $sandbox_comment_alt; 166 167 // Collects the comment type (comment, trackback), 168 $c = array($comment->comment_type); 169 170 // Counts trackbacks (t[n]) or comments (c[n]) 171 if ($comment->comment_type == 'trackback') { 172 $c[] = "t$sandbox_comment_alt"; 173 } else { 174 $c[] = "c$sandbox_comment_alt"; 175 } 176 177 // If the comment author has an id (registered), then print the log in name 178 if ( $comment->user_id > 0 ) { 179 $user = get_userdata($comment->user_id); 180 181 // For all registered users, 'byuser'; to specificy the registered user, 'commentauthor+[log in name]' 182 $c[] = "byuser comment-author-" . sanitize_title_with_dashes(strtolower($user->user_login)); 183 // For comment authors who are the author of the post 184 if ( $comment->user_id === $post->post_author ) 185 $c[] = 'bypostauthor'; 186 } 187 188 // If it's the other to the every, then add 'alt' class; collects time- and date-based classes 189 sandbox_date_classes(mysql2date('U', $comment->comment_date), $c, 'c-'); 190 if ( ++$sandbox_comment_alt % 2 ) 191 $c[] = 'alt'; 192 193 // Separates classes with a single space, collates classes for comment LI 194 $c = join(' ', apply_filters('comment_class', $c)); 195 196 // Tada again! 197 return $print ? print($c) : $c; 198 } 199 200 // Generates time- and date-based classes for BODY, post DIVs, and comment LIs; relative to GMT (UTC) 201 function sandbox_date_classes($t, &$c, $p = '') { 202 $t = $t + (get_settings('gmt_offset') * 3600); 203 $c[] = $p . 'y' . gmdate('Y', $t); // Year 204 $c[] = $p . 'm' . gmdate('m', $t); // Month 205 $c[] = $p . 'd' . gmdate('d', $t); // Day 206 $c[] = $p . 'h' . gmdate('H', $t); // Hour 207 } 208 209 // For category lists on category archives: Returns other categories except the current one (redundant) 210 function sandbox_cats_meow($glue) { 211 $current_cat = single_cat_title('', false); 212 $separator = "\n"; 213 $cats = explode($separator, get_the_category_list($separator)); 214 215 foreach ( $cats as $i => $str ) { 216 if ( strstr($str, ">$current_cat<") ) { 217 unset($cats[$i]); 218 break; 219 } 220 } 221 222 if ( empty($cats) ) 223 return false; 224 225 return trim(join($glue, $cats)); 226 } 227 228 // For tag lists on tag archives: Returns other tags except the current one (redundant) 229 function sandbox_tag_ur_it($glue) { 230 $current_tag = single_tag_title('', '', false); 231 $separator = "\n"; 232 $tags = explode($separator, get_the_tag_list("", "$separator", "")); 233 234 foreach ( $tags as $i => $str ) { 235 if ( strstr($str, ">$current_tag<") ) { 236 unset($tags[$i]); 237 break; 238 } 239 } 240 241 if ( empty($tags) ) 242 return false; 243 244 return trim(join($glue, $tags)); 245 } 246 247 248 // Widget: Search; to match the Sandbox style and replace Widget plugin default 249 function widget_sandbox_search($args) { 250 extract($args); 251 if ( empty($title) ) 252 $title = __('Search', 'sandbox'); 253 ?> 254 <?php echo $before_widget ?> 255 <?php echo $before_title ?><label for="s"><?php echo $title ?></label><?php echo $after_title ?> 256 <form id="searchform" method="get" action="<?php bloginfo('home') ?>"> 257 <div> 258 <input id="s" name="s" type="text" value="<?php echo wp_specialchars(stripslashes($_GET['s']), true) ?>" size="10" tabindex="1" /> 259 <input id="searchsubmit" name="searchsubmit" type="submit" value="<?php _e('Find', 'sandbox') ?>" tabindex="2" /> 260 </div> 261 </form> 262 <?php echo $after_widget ?> 263 264 <?php 265 } 266 267 // Widget: Meta; to match the Sandbox style and replace Widget plugin default 268 function widget_sandbox_meta($args) { 269 extract($args); 270 if ( empty($title) ) 271 $title = __('Meta', 'sandbox'); 272 ?> 273 <?php echo $before_widget; ?> 274 <?php echo $before_title . $title . $after_title; ?> 275 <ul> 276 <?php wp_register() ?> 277 <li><?php wp_loginout() ?></li> 278 <?php wp_meta() ?> 279 </ul> 280 <?php echo $after_widget; ?> 281 <?php 282 } 283 284 // Widget: RSS links; to match the Sandbox style 285 function widget_sandbox_rsslinks($args) { 286 extract($args); 287 $options = get_option('widget_sandbox_rsslinks'); 288 $title = empty($options['title']) ? __('RSS Links', 'sandbox') : $options['title']; 289 ?> 290 <?php echo $before_widget; ?> 291 <?php echo $before_title . $title . $after_title; ?> 292 <ul> 293 <li><a href="<?php bloginfo('rss2_url') ?>" title="<?php echo wp_specialchars(get_bloginfo('name'), 1) ?> <?php _e('Posts RSS feed', 'sandbox'); ?>" rel="alternate" type="application/rss+xml"><?php _e('All posts', 'sandbox') ?></a></li> 294 <li><a href="<?php bloginfo('comments_rss2_url') ?>" title="<?php echo wp_specialchars(bloginfo('name'), 1) ?> <?php _e('Comments RSS feed', 'sandbox'); ?>" rel="alternate" type="application/rss+xml"><?php _e('All comments', 'sandbox') ?></a></li> 295 </ul> 296 <?php echo $after_widget; ?> 297 <?php 298 } 299 300 // Widget: RSS links; element controls for customizing text within Widget plugin 301 function widget_sandbox_rsslinks_control() { 302 $options = $newoptions = get_option('widget_sandbox_rsslinks'); 303 if ( $_POST["rsslinks-submit"] ) { 304 $newoptions['title'] = strip_tags(stripslashes($_POST["rsslinks-title"])); 305 } 306 if ( $options != $newoptions ) { 307 $options = $newoptions; 308 update_option('widget_sandbox_rsslinks', $options); 309 } 310 $title = htmlspecialchars($options['title'], ENT_QUOTES); 311 ?> 312 <p><label for="rsslinks-title"><?php _e('Title:'); ?> <input style="width: 250px;" id="rsslinks-title" name="rsslinks-title" type="text" value="<?php echo $title; ?>" /></label></p> 313 <input type="hidden" id="rsslinks-submit" name="rsslinks-submit" value="1" /> 314 <?php 315 } 316 317 // Widgets plugin: intializes the plugin after the widgets above have passed snuff 318 function sandbox_widgets_init() { 319 if ( !function_exists('register_sidebars') ) 320 return; 321 322 // Uses H3-level headings with all widgets to match Sandbox style 323 $p = array( 324 'before_title' => "<h3 class='widgettitle'>", 325 'after_title' => "</h3>\n", 326 ); 327 328 // Table for how many? Two? This way, please. 329 register_sidebars(2, $p); 330 331 // Finished intializing Widgets plugin, now let's load the Sandbox default widgets 332 register_sidebar_widget(__('Search', 'sandbox'), 'widget_sandbox_search', null, 'search'); 333 unregister_widget_control('search'); 334 register_sidebar_widget(__('Meta', 'sandbox'), 'widget_sandbox_meta', null, 'meta'); 335 unregister_widget_control('meta'); 336 register_sidebar_widget(array(__('RSS Links', 'sandbox'), 'widgets'), 'widget_sandbox_rsslinks'); 337 register_widget_control(array(__('RSS Links', 'sandbox'), 'widgets'), 'widget_sandbox_rsslinks_control', 300, 90); 338 } 339 340 // Translate, if applicable 341 load_theme_textdomain('sandbox'); 342 343 // Runs our code at the end to check that everything needed has loaded 344 add_action('init', 'sandbox_widgets_init'); 345 346 // Adds filters so that things run smoothly 347 add_filter('archive_meta', 'wptexturize'); 348 add_filter('archive_meta', 'convert_smilies'); 349 add_filter('archive_meta', 'convert_chars'); 350 add_filter('archive_meta', 'wpautop'); 351 352 // Remember: the Sandbox is for play. 353 ?> 354 No newline at end of file -
wp-content/themes/sandbox/sidebar.php
1 <div id="primary" class="sidebar"> 2 <ul class="xoxo"> 3 <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar(1) ) : // begin primary sidebar widgets ?> 4 5 <li id="pages"> 6 <h3><?php _e('Pages', 'sandbox') ?></h3> 7 <ul> 8 <?php wp_list_pages('title_li=&sort_column=post_title' ) ?> 9 </ul> 10 </li> 11 12 <li id="categories"> 13 <h3><?php _e('Categories', 'sandbox'); ?></h3> 14 <ul> 15 <?php wp_list_categories('title_li=&show_count=0&hierarchical=1') ?> 16 17 </ul> 18 </li> 19 20 <li id="archives"> 21 <h3><?php _e('Archives', 'sandbox') ?></h3> 22 <ul> 23 <?php wp_get_archives('type=monthly') ?> 24 25 </ul> 26 </li> 27 <?php endif; // end primary sidebar widgets ?> 28 </ul> 29 </div><!-- #primary .sidebar --> 30 31 <div id="secondary" class="sidebar"> 32 <ul class="xoxo"> 33 <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar(2) ) : // begin secondary sidebar widgets ?> 34 <li id="search"> 35 <h3><label for="s"><?php _e('Search', 'sandbox') ?></label></h3> 36 <form id="searchform" method="get" action="<?php bloginfo('home') ?>"> 37 <div> 38 <input id="s" name="s" type="text" value="<?php echo wp_specialchars(stripslashes($_GET['s']), true) ?>" size="10" tabindex="1" /> 39 <input id="searchsubmit" name="searchsubmit" type="submit" value="<?php _e('Find', 'sandbox') ?>" tabindex="2" /> 40 </div> 41 </form> 42 </li> 43 44 <?php wp_list_bookmarks('title_before=<h3>&title_after=</h3>&show_images=1') ?> 45 46 <li id="rss-links"> 47 <h3><?php _e('RSS Feeds', 'sandbox') ?></h3> 48 <ul> 49 <li><a href="<?php bloginfo('rss2_url') ?>" title="<?php echo wp_specialchars(get_bloginfo('name'), 1) ?> <?php _e('Posts RSS feed', 'sandbox'); ?>" rel="alternate" type="application/rss+xml"><?php _e('All posts', 'sandbox') ?></a></li> 50 <li><a href="<?php bloginfo('comments_rss2_url') ?>" title="<?php echo wp_specialchars(bloginfo('name'), 1) ?> <?php _e('Comments RSS feed', 'sandbox'); ?>" rel="alternate" type="application/rss+xml"><?php _e('All comments', 'sandbox') ?></a></li> 51 </ul> 52 </li> 53 54 <li id="meta"> 55 <h3><?php _e('Meta', 'sandbox') ?></h3> 56 <ul> 57 <?php wp_register() ?> 58 59 <li><?php wp_loginout() ?></li> 60 <?php wp_meta() ?> 61 62 </ul> 63 </li> 64 <?php endif; // end secondary sidebar widgets ?> 65 </ul> 66 </div><!-- #secondary .sidebar --> -
wp-content/themes/sandbox/readme.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" dir="ltr"> 3 <head profile="http://gmpg.org/xfn/11"> 4 <title>The Sandbox · An explanation</title> 5 <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> 6 <meta http-equiv="content-language" content="en-us" /> 7 <meta name="description" content="Sandbox: a highly semantic theme with powerful, dynamic class selectors" /> 8 <meta name="keywords" content="sandbox,xhtml,hatom,hcard,microformats,semantics,css,wordpress" /> 9 <style type="text/css" media="all"> 10 /*<![CDATA[*/ 11 body{background:#fcfcfc;color:#444;font:normal 70%/150% verdana,geneva,sans-serif;margin:0;padding:0;} 12 body blockquote{border-left:5px solid #f6f6f6;padding-left:0.5em;} 13 body code,body pre{font:1em/150% consolas,"courier new",courier,monospace;} 14 body div#readme{background:#fff;border-left:3px solid #f9f9f9;border-right:3px solid #f9f9f9;color:#444;margin:0 auto;padding:1em 2em;width:50em;} 15 body div#readme div#footer{margin:3em auto 1em;text-align:center;} 16 body div#readme div#footer p{background:#ffd;color:#666;display:inline;padding:0.2em 0.5em;} 17 body div#readme div#header{margin:0 auto;text-align:center;} 18 body div#readme div#header div.readme-version{font-size:0.9em;letter-spacing:0.1em;margin:0 0 0.5em;text-transform:uppercase;} 19 body h1{font-size:3.2em;} 20 body h1,body h2,body h3{font-family:garamond,georgia,times,serif;font-weight:400;} 21 body h2{font-size:2em;margin-top:3em;} 22 body h3{font-size:1.6em;margin-top:2em;} 23 body ol li ol li,body ol li#features ol li ol li{list-style:decimal;} 24 body ol li#functions h3{font-size:1.5em;} 25 body ol li#functions ol{list-style:lower-alpha;margin:0 0 0 2em;padding:0;} 26 body ol li#license blockquote a{color:#222;text-decoration:none;} 27 body ol li#license blockquote strong{font-size:0.9em;font-weight:400;text-transform:uppercase;} 28 body ol li,body ol#menu li ol li{list-style:upper-roman;} 29 body ol ul li{list-style:square;} 30 body ol#menu li{list-style:none;} 31 body ol#menu li ol li ol li,body ol li#functions ol li,body ol li#features ol li{list-style:lower-roman;} 32 body pre span,body span.bold{font-weight:700;} 33 body span.vcard span.family-name,body span.vcard span.additional-name{display:none;} 34 table{border-collapse:separate;border-color:#aaa;border-spacing:0;border-style:solid;border-width:1px;padding:0 0.5em;} 35 table tbody td{border-collapse:separate;border-color:#aaa;border-style:solid;border-width:0.5px 0;padding:0.2em 0.5em;} 36 table tbody th{border-bottom:1px solid #aaa;font-size:0.8em;text-align:left;text-transform:uppercase;} 37 table tbody tr.alt{background:#f5f5f5;} 38 table tfoot th{font-size:0.8em;padding-top:1em;text-align:left;text-transform:uppercase;} 39 table thead th{padding:0.5em;} 40 /*]]>*/ 41 </style> 42 </head> 43 <body> 44 <div id="readme"> 45 <div id="header"> 46 <h1 id="title">The Sandbox</h1> 47 <div class="readme-version">Version 1.0</div> 48 <div class="readme-subtitle">A theme rich and powerful with dynamic semantic class selectors</div> 49 </div><!-- #header --> 50 <ol id="menu" class="xoxo"> 51 <li> 52 <h2>Table of contents</h2> 53 <ol> 54 <li><a href="#introduction" title="Skip to Introduction">Introduction</a></li> 55 <li><a href="#installing" title="Skip to Installing">Installing</a></li> 56 <li><a href="#started" title="Skip to Getting started">Getting started</a></li> 57 <li><a href="#functions" title="Skip to Class functions">Class functions</a> 58 <ol> 59 <li><a href="#body-class" title="Skip to Class functions: sandbox_body_class()"><code>sandbox_body_class()</code></a></li> 60 <li><a href="#post-class" title="Skip to Class functions: sandbox_post_class()"><code>sandbox_post_class()</code></a></li> 61 <li><a href="#comment-class" title="Skip to Class functions: sandbox_comment_class()"><code>sandbox_comment_class()</code></a></li> 62 </ol> 63 </li> 64 <li><a href="#features" title="Skip to Other features">Other features</a> 65 <ol> 66 <li><a href="#comments" title="Skip to Other features: Comments on pages">Comments on pages</a></li> 67 <li><a href="#templates" title="Skip to Other features: Page templates">Page templates</a></li> 68 </ol> 69 </li> 70 <li><a href="#creating" title="Skip to Creating Sandbox templates">Creating a theme template</a></li> 71 <li><a href="#standards" title="Skip to Web standards">Web standards</a></li> 72 <li><a href="#microformats" title="Skip to Microformats">Microformats</a></li> 73 <li><a href="#credits" title="Skip to Credits and thanks">Credits and thanks</a></li> 74 <li><a href="#license" title="Skip to License">License</a></li> 75 </ol> 76 </li> 77 </ol><!-- #menu .xoxo --> 78 <ol id="content" class="xoxo"> 79 <li id="introduction"> 80 <h2>Introduction</h2> 81 <p>The Sandbox is a lot of things:</p> 82 <ul> 83 <li>Beautiful on the inside</li> 84 <li>For WordPress 2.3.x</li> 85 <li>Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr> 1.0 Transitional</li> 86 <li>Widgets friendly</li> 87 <li>The basis for your new, <abbr title="GNU Public Licence">GPL</abbr>-licensed theme</li> 88 </ul> 89 <p>More importantly, the Sandbox <em>can be</em> a lot of things.</p> 90 <p>What began as <span class="vcard"><a class="url fn n" href="http://www.plaintxt.org/" title="Scott, plaintxt.org" rel="me"><span class="given-name">Scott</span><span class="additional-name"> Allan</span><span class="family-name"> Wallick</span></a></span>'s leftovers has become an advanced, semantics-based theme. <span class="vcard"><a class="url fn n" href="http://andy.wordpress.com/" title="Andy, WordPress.com"><span class="given-name">Andy</span><span class="family-name"> Skelton</span></a></span> added his innovative semantic class-generating functions and Scott edited it to oblivion.</p> 91 <p>So what can you do with the Sandbox?</p> 92 <ul> 93 <li>You can just use it as-is and have a super-cool, truly minimalist theme.</li> 94 <li>You can totally customize it with <abbr title="Cascading Style Sheets">CSS</abbr> alone—no need to bother with other files.</li> 95 <li>You can use the functions, theme files, et al, as pleases you—even for your own theme.</li> 96 <li>You can use it as a good place to learn a few things about <abbr title="Cascading Style Sheets">CSS</abbr>, <abbr title="eXtensible HyperText Markup Language">XHTML</abbr>, and <abbr title="Hypertext Preprocessor">PHP</abbr>, perhaps.</li> 97 </ul> 98 <p>The real feature of the Sandbox is its markup. The use of class-generating functions in the <code>body</code>, post <code>div</code>, and comment/trackback <code>li</code> elements create an exceptionally extensible foundation. As Andy said, <q cite="http://andy.wordpress.com/2006/07/20/generated-semantic-classes-2/" title="Generated Semantic Classes 2">Given straightforward markup with plenty of selectors, there isn't much that can't be accomplished with <abbr title="Cascading Style Sheets">CSS</abbr> and a decent browser.</q></p> 99 <p>And the implementation of the hAtom and hCard microformats means we're looking forward (and pleasing the barons at <a href="http://www.technorait.com/" title="Technorati" rel="external">Technorati</a>). You might be able to improve on our markup, but, well, who wants to work that hard?</p> 100 </li><!-- #introduction --> 101 <li id="installing"> 102 <h2>Installing</h2> 103 <p>The Sandbox theme is installed just like any other WordPress theme. To install this theme:</p> 104 <ol> 105 <li>Download the <a href="http://www.plaintxt.org/themes/sandbox/" title="The Sandbox for WordPress" rel="me">Sandbox</a></li> 106 <li>Extract the <code>/sandbox/</code> folder from the archive</li> 107 <li>Upload this folder to the <code>/wp-contents/themes/</code> directory</li> 108 <li>Activate the theme in the <i>Dashboard › Presentation</i> menu</li> 109 <li>Enjoy</li> 110 </ol> 111 <p>You can read more detailed installation instructions on the <a href="http://codex.wordpress.org/Using_Themes#Adding_New_Themes" title="Adding new themes - WordPress Codex" rel="external">WordPress Codex</a>.</p> 112 <p>Developers interested in <a href="http://en.wikipedia.org/wiki/Subversion_(software)" title="Subersion - Wikipedia" rel="external">Subversion</a> access to the Sandbox repository may visit <a href="http://code.google.com/p/sandbox-theme" title="Sandbox theme on Google Code" rel="external">code.google.com/p/sandbox-theme</a>. Please ignore if unfamiliar with Subversion.</p> 113 </li><!-- #installing --> 114 <li id="started"> 115 <h2>Getting started</h2> 116 <p>To help beginners get started, example layouts in <code>/sandbox-layouts/</code> have been included. Instructions for using the included layouts and designs can be found in the folder.</p> 117 <p>The simplest way to get started with the Sandbox is to jump right in to <code>style.css</code>, using <abbr title="Cascading Style Sheets">CSS</abbr> to design the appearence of the Sandbox.</p> 118 <p>For help learning <abbr title="Cascading Style Sheets">CSS</abbr>, visit:</p> 119 <ul> 120 <li><a href="http://www.cssbasics.com/" title="CSS Basics.com" rel="external"><abbr title="Cascading Style Sheets">CSS</abbr> Basics.com</a></li> 121 <li><a href="http://www.html.net/tutorials/css/" title="HTML.net's CSS Tutorial" rel="external">HTML.net's <abbr title="Cascading Style Sheets">CSS</abbr> Tutorial</a></li> 122 <li><a href="http://www.htmldog.com/guides/cssbeginner/" title="HTML Dog's CSS Beginner Tutorial" rel="external">HTML Dog's <abbr title="Cascading Style Sheets">CSS</abbr> Beginner Tutorial</a></li> 123 <li><a href="http://www.stylegala.com/features/css-reference/" title="Stylegala's CSS Reference" rel="external">Stylegala's <abbr title="Cascading Style Sheets">CSS</abbr> Reference</a></li> 124 <li><a href="http://www.w3schools.com/css/default.asp" title="W3's CSS School" rel="external">W3's <abbr title="Cascading Style Sheets">CSS</abbr> School</a></li> 125 </ul> 126 <p>For Sandbox-related resources, including how-tos, Sandbox-based theme templates, and more, visit:</p> 127 <ul> 128 <li><a href="http://archgfx.net/" title="archGFX" rel="external">archGFX</a></li> 129 <li><a href="http://internetducttape.com/" title="InternetDuctTape" rel="external">Internet Duct Tape</a></li> 130 <li><a href="http://ntuat.wordpress.com/" title="Not (That) Ugly" rel="external">Sandbox Styles at <abbr title="Not (That) Ugly">NTU</abbr></a></li> 131 <li><a href="http://www.plaintxt.org/" title="plaintxt.org" rel="me">plaintxt.org</a></li> 132 <li><a href="http://www.sndbx.org/" title="Sandbox Designs Competition" rel="me">Sandbox Designs Competition</a></li> 133 <li><a href="http://www.sndbx.org/forums/" title="Sandbox Forums" rel="me">Sandbox Forums</a></li> 134 </ul> 135 <p>If you are interested in developing theme templates based on the Sandbox, see <a href="#creating" title="Creating theme templates">Creating theme templates</a> in this document.</p> 136 </li><!-- #started --> 137 <li id="functions"> 138 <h2>Class functions</h2> 139 <p>The three semantic class-generating functions used in the Sandbox are charted below, outlining what semantic classes are generated (“Class”), any related WordPress function (“WP Tag”), and the usage of these classes (“Usage”). For more on the WP Tag aspect, read <a href="http://codex.wordpress.org/Template_Tags" title="Template tags « WordPress Codex" rel="external">Template Tags</a> and <a href="http://codex.wordpress.org/Conditional_Tags" title="Conditional Tags « WordPress Codex" rel="external">Conditional Tags</a> on the WordPress Codex.</p> 140 <ol> 141 <li id="body-class"> 142 <h3><code>sandbox_body_class()</code></h3> 143 <p>The <code>sandbox_body_class()</code> function is definied in the <code>functions.php</code> file. It has no parameters. It adds semantic classes to the <code>body</code> element relative to the content of the page that is being displayed.</p> 144 <pre><body class="<span><?php sandbox_body_class() ?></span>"></pre> 145 <p>The chart below lists the semantic classes added to the <code>body</code> tag by this function.</p> 146 <table id="body-class-table" summary="Classes given to the body element sandbody_body_class()"> 147 <thead> 148 <tr> 149 <th colspan="3" scope="colgroup"><code>sandbox_body_class()</code></th> 150 </tr> 151 </thead> 152 <tfoot> 153 <tr> 154 <th colspan="3" scope="colgroup"><abbr title="Cascading Style Sheets">CSS</abbr> example</th> 155 </tr> 156 <tr> 157 <td colspan="3" scope="row" abbr="CSS example"><code>body.single div.sidebar { display: none; }</code></td> 158 </tr> 159 </tfoot> 160 <tbody> 161 <tr> 162 <th scope="col" abbr="class">Class</th> 163 <th scope="col" abbr="tag">WP Tag</th> 164 <th scope="col" abbr="use">Usage</th> 165 </tr> 166 <tr class="alt"> 167 <td scope="row">archive</td> 168 <td><code>is_archive()</code></td> 169 <td>When <em>any</em> archive page is displayed, i.e., applies to category-, date-, and author-based archive pages</td> 170 </tr> 171 <tr> 172 <td scope="row">attachment</td> 173 <td><code>is_attachment()</code></td> 174 <td>When the post subpage containing an attachment is displayed, as set with "Linked to Page" in the post editor</td> 175 </tr> 176 <tr class="alt"> 177 <td scope="row">attachment-[mime]</td> 178 <td><code>is_attachment()</code></td> 179 <td>For attachment posts (see above), where <i>[mime]</i> is the abbreviated <abbr title="Multipurpose Internet Mail Extensions">MIME</abbr> type, e.g., <code>attachment-jpeg</code></td> 180 </tr> 181 <tr> 182 <td scope="row">author</td> 183 <td><code>is_author()</code></td> 184 <td>When a author archive page is displayed</td> 185 </tr> 186 <tr class="alt"> 187 <td scope="row">author-[name]</td> 188 <td><code>is_author()</code></td> 189 <td>When a specific author archive page is displayed, where <i>[name]</i> is the author's login name, e.g., author-admin</td> 190 </tr> 191 <tr> 192 <td scope="row">author-paged-[n]</td> 193 <td><code>is_author()</code> & <code>is_paged()</code></td> 194 <td>Displays the "paged" number of author archive, where <i>[n]</i> is the paginated number</td> 195 </tr> 196 <tr class="alt"> 197 <td scope="row">category</td> 198 <td><code>is_category()</code></td> 199 <td>When a category archive page is displayed</td> 200 </tr> 201 <tr> 202 <td scope="row">category-[name]</td> 203 <td><code>is_category()</code></td> 204 <td>For a specific category, where <i>[name]</i> is the category slug, e.g., <code>category-useful-links</code></td> 205 </tr> 206 <tr class="alt"> 207 <td scope="row">category-paged-[n]</td> 208 <td><code>is_category()</code> & <code>is_paged()</code></td> 209 <td>Displays the "paged" number of category archive, where <i>[n]</i> is the paginated number</td> 210 </tr> 211 <tr> 212 <td scope="row">d01–31</td> 213 <td><code>gmdate('d')</code></td> 214 <td>The current day of when the page is displayed (Offset to GMT)</td> 215 </tr> 216 <tr class="alt"> 217 <td scope="row">date</td> 218 <td><code>is_date()</code></td> 219 <td>When a date archive page is displayed, e.g., by month, by year</td> 220 </tr> 221 <tr> 222 <td scope="row">date-paged-[n]</td> 223 <td><code>is_date()</code> & <code>is_paged()</code></td> 224 <td>Displays the "paged" number of date-based archive, where <i>[n]</i> is the paginated number</td> 225 </tr> 226 <tr class="alt"> 227 <td scope="row">h00–24</td> 228 <td><code>gmdate('h')</code></td> 229 <td>The current hour of when the page is displayed (Offset to GMT)</td> 230 </tr> 231 <tr> 232 <td scope="row">four04</td> 233 <td><code>is_404()</code></td> 234 <td>When a request results in zero posts, i.e., a 404 error page</td> 235 </tr> 236 <tr class="alt"> 237 <td scope="row">home</td> 238 <td><code>is_home()</code></td> 239 <td>When the home page is displayed</td> 240 </tr> 241 <tr> 242 <td scope="row">m00–12</td> 243 <td><code>gmdate('m')</code></td> 244 <td>The current month of when the page is displayed (Offset to GMT)</td> 245 </tr> 246 <tr class="alt"> 247 <td scope="row">loggedin</td> 248 <td>n/a</td> 249 <td>When the page is displayed by a logged-in user</td> 250 </tr> 251 <tr> 252 <td scope="row">page</td> 253 <td><code>is_page()</code></td> 254 <td>When a page is displayed</td> 255 </tr> 256 <tr class="alt"> 257 <td scope="row">page-author-[name]</td> 258 <td><code>is_page()</code></td> 259 <td>For a page by a specific author, where <i>[name]</i> is the user's login name, e.g., <code>page-author-admin</code></td> 260 </tr> 261 <tr> 262 <td scope="row">page-paged-[n]</td> 263 <td><code>is_page()</code> & <code>is_paged()</code></td> 264 <td>Displays the "paged" number of pages, where <i>[n]</i> is the paginated number</td> 265 </tr> 266 <tr class="alt"> 267 <td scope="row">paged</td> 268 <td><code>is_paged()</code></td> 269 <td>When whatever is displayed is "paged," e.g., page 2 of the index</td> 270 </tr> 271 <tr> 272 <td scope="row">paged-[n]</td> 273 <td><code>is_paged()</code></td> 274 <td>Displays the "paged" number, where <i>[n]</i> is the paginated number, e.g., <code>paged-3</code> for third page of index</td> 275 </tr> 276 <tr class="alt"> 277 <td scope="row">pageid-[n]</td> 278 <td><code>is_page()</code></td> 279 <td>Displays the page ID number of queried page, where <i>[n]</i> is the page ID, e.g., <code>pageid-20</code></td> 280 </tr> 281 <tr> 282 <td scope="row">postid-[n]</td> 283 <td><code>is_single()</code></td> 284 <td>Displays the post ID number of queried post, where <i>[n]</i> is the post ID, e.g., <code>postid-20</code></td> 285 </tr> 286 <tr class="alt"> 287 <td scope="row">search</td> 288 <td><code>is_search()</code></td> 289 <td>When the results of a search are displayed</td> 290 </tr> 291 <tr> 292 <td scope="row">single</td> 293 <td><code>is_single()</code></td> 294 <td>When a single post is displayed</td> 295 </tr> 296 <tr class="alt"> 297 <td scope="row">s-author-[name]</td> 298 <td><code>is_single()</code> & <code>is_author()</code></td> 299 <td>For a single post published by a specific author, where <i>[name]</i> is the user's login name, e.g., s-author-admin</td> 300 </tr> 301 <tr> 302 <td scope="row">s-category-[name]</td> 303 <td><code>is_single()</code> & <code>is_category()</code></td> 304 <td>For a single post published in a specific category, where <i>[name]</i> is the category slug, e.g., <code>s-category-news</code></td> 305 </tr> 306 <tr class="alt"> 307 <td scope="row">s-d01–31</td> 308 <td><code>gmdate('d')</code></td> 309 <td>For a single post published on a specific day (Offset to GMT)</td> 310 </tr> 311 <tr> 312 <td scope="row">s-h00–24</td> 313 <td><code>gmdate('h')</code></td> 314 <td>For a single post published at a specific hour (Offset to GMT)</td> 315 </tr> 316 <tr class="alt"> 317 <td scope="row">s-m00–12</td> 318 <td><code>gmdate('m')</code></td> 319 <td>For a single post published in a specific month (Offset to GMT)</td> 320 </tr> 321 <tr> 322 <td scope="row">s-tag-[name]</td> 323 <td><code>is_single()</code> & <code>is_tag()</code></td> 324 <td>For a single post published with a specific tag, where <i>[name]</i> is the tag slug, e.g., <code>s-category-foo-bar</code></td> 325 </tr> 326 <tr class="alt"> 327 <td scope="row">s-y2007</td> 328 <td><code>gmdate('Y')</code></td> 329 <td>For a single post published in a specific year (Offset to GMT)</td> 330 </tr> 331 <tr> 332 <td scope="row">tag</td> 333 <td><code>is_tag()</code></td> 334 <td>When a tag archive page is displayed</td> 335 </tr> 336 <tr class="alt"> 337 <td scope="row">tag-[name]</td> 338 <td><code>is_tag()</code></td> 339 <td>For a specific tag, where <i>[name]</i> is the tag slug, e.g., <code>tag-foo-bar</code></td> 340 </tr> 341 <tr> 342 <td scope="row">tag-paged-[n]</td> 343 <td><code>is_tag()</code> & <code>is_paged()</code></td> 344 <td>Displays the "paged" number of tag archive, where <i>[n]</i> is the paginated number</td> 345 </tr> 346 <tr class="alt"> 347 <td scope="row">wordpress</td> 348 <td>n/a</td> 349 <td>When anything is displayed; a class that is always applied</td> 350 </tr> 351 <tr> 352 <td scope="row">y2007</td> 353 <td><code>gmdate('Y')</code></td> 354 <td>The current year of when the page is display (Offset to GMT)</td> 355 </tr> 356 </tbody> 357 </table><!-- #body-class-table --> 358 </li><!-- #body-class --> 359 <li id="post-class"> 360 <h3><code>sandbox_post_class()</code></h3> 361 <p>The <code>sandbox_post_class()</code> function is definied in the <code>functions.php</code> file. It has no parameters. It adds semantic classes to each post <code>div</code> element, relative to the actual post it contains.</p> 362 <pre><div id="post-<?php the_ID(); ?>" class="<span><?php sandbox_post_class() ?></span>"></pre> 363 <p>The chart below lists the semantic classes added to each post <code>div</code> element by this function.</p> 364 <table id="post-class-table" summary="Classes given to individual posts by sandbody_post_class()"> 365 <thead> 366 <tr> 367 <th colspan="3" scope="colgroup"><code>sandbox_post_class()</code></th> 368 </tr> 369 </thead> 370 <tfoot> 371 <tr> 372 <th colspan="3" scope="colgroup"><abbr title="Cascading Style Sheets">CSS</abbr> example</th> 373 </tr> 374 <tr> 375 <td colspan="3" scope="row" abbr="CSS example"><code>div.category-news .entry-title { background: url('images/news.png'); }</code></td> 376 </tr> 377 </tfoot> 378 <tbody> 379 <tr> 380 <th scope="col" abbr="class">Class</th> 381 <th scope="col" abbr="tag">WP Tag</th> 382 <th scope="col" abbr="use">Usage</th> 383 </tr> 384 <tr class="alt"> 385 <td scope="row">alt</td> 386 <td>n/a</td> 387 <td>For odd-numbered posts, e.g., for the 1<sup>st</sup>, 3<sup>rd</sup>, 5<sup>th</sup> posts</td> 388 </tr> 389 <tr> 390 <td scope="row">author-[name]</td> 391 <td><code>is_author()</code></td> 392 <td>For any specific author, where <i>[name]</i> is the user's login name, e.g., <code>author-admin</code></td> 393 </tr> 394 <tr class="alt"> 395 <td scope="row">category-[name]</td> 396 <td><code>is_category()</code></td> 397 <td>For any specific category, where <i>[name]</i> is the category slug, e.g., <code>category-news</code></td> 398 </tr> 399 <tr> 400 <td scope="row">d01–31</td> 401 <td><code>gmdate('d')</code></td> 402 <td>For a post published on a specific day (Offset to GMT)</td> 403 </tr> 404 <tr class="alt"> 405 <td scope="row">draft</td> 406 <td>n/a</td> 407 <td>For a post saved as a draft, as contrasted with an published post</td> 408 </tr> 409 <tr> 410 <td scope="row">h00–24</td> 411 <td><code>gmdate('h')</code></td> 412 <td>For a post published at a specific hour (Offset to GMT)</td> 413 </tr> 414 <tr class="alt"> 415 <td scope="row">hentry</td> 416 <td>n/a</td> 417 <td>For the hAtom 0.1 specification, applied every post</td> 418 </tr> 419 <tr> 420 <td scope="row">m00–12</td> 421 <td><code>gmdate('m')</code></td> 422 <td>For a post published in a specific month (Offset to GMT)</td> 423 </tr> 424 <tr class="alt"> 425 <td scope="row">p[n]</td> 426 <td>n/a</td> 427 <td>For counting posts relative to the top of the page, where <i>[n]</i> is the number, e.g., <code>p1</code> for the first post, <code>p2</code> for the second, <code>p3</code> for the third</td> 428 </tr> 429 <tr> 430 <td scope="row">page</td> 431 <td>n/a</td> 432 <td>A general class, applied to every page</td> 433 </tr> 434 <tr class="alt"> 435 <td scope="row">post</td> 436 <td>n/a</td> 437 <td>A general class, applied to every post</td> 438 </tr> 439 <tr> 440 <td scope="row">private</td> 441 <td>n/a</td> 442 <td>For a post that has been saved as private</td> 443 </tr> 444 <tr class="alt"> 445 <td scope="row">protected</td> 446 <td>n/a</td> 447 <td>For a post protected by a password</td> 448 </tr> 449 <tr> 450 <td scope="row">publish</td> 451 <td>n/a</td> 452 <td>For any published post, as contrasted with an unpublished draft</td> 453 </tr> 454 <tr class="alt"> 455 <td scope="row">tag-[name]</td> 456 <td><code>is_tag()</code></td> 457 <td>For any specific tag, where <i>[name]</i> is the tag slug, e.g., <code>tag-foo-bar</code></td> 458 </tr> 459 <tr> 460 <td scope="row">y2007</td> 461 <td><code>gmdate('Y')</code></td> 462 <td>For a post published in a certain year (Offset to GMT)</td> 463 </tr> 464 </tbody> 465 </table><!-- #post-class-table --> 466 </li><!-- #post-class --> 467 <li id="comment-class"> 468 <h3><code>sandbox_comment_class()</code></h3> 469 <p>The <code>sandbox_comment_class()</code> function is definied in the <code>functions.php</code> file. It has no parameters. It adds semantic classes to the each comment <code>li</code> element (“comment” here meaning comments, trackbacks, and pingbacks).</p> 470 <pre><li id="comment-<?php comment_ID(); ?>" class="<span><?php sandbox_comment_class() ?></span>"></pre> 471 <p>The chart below lists the semantic classes added to each comment <code>li</code> element by this function.</p> 472 <table id="comment-class-table" summary="Classes given to individual comments by sandbody_comment_class()"> 473 <thead> 474 <tr> 475 <th colspan="3" scope="colgroup"><code>sandbox_comment_class()</code></th> 476 </tr> 477 </thead> 478 <tfoot> 479 <tr> 480 <th colspan="3" scope="colgroup"><abbr title="Cascading Style Sheets">CSS</abbr> example</th> 481 </tr> 482 <tr> 483 <td colspan="3" scope="row" abbr="CSS example"><code>div.comments li.bypostauthor { border: 1px solid red; }</code></td> 484 </tr> 485 </tfoot> 486 <tbody> 487 <tr> 488 <th scope="col" abbr="class">Class</th> 489 <th scope="col" abbr="tag">WP Tag</th> 490 <th scope="col" abbr="use">Usage</th> 491 </tr> 492 <tr class="alt"> 493 <td scope="row">alt</td> 494 <td>n/a</td> 495 <td>For odd-numbered comments, e.g., for the 1<sup>st</sup>, 3<sup>rd</sup>, 5<sup>th</sup> comments</td> 496 </tr> 497 <tr> 498 <td scope="row">bypostauthor</td> 499 <td>n/a</td> 500 <td>When the comment author is also the post author</td> 501 </tr> 502 <tr class="alt"> 503 <td scope="row">byuser</td> 504 <td>n/a</td> 505 <td>For comments by registered users</td> 506 </tr> 507 <tr> 508 <td scope="row">c-h00–24</td> 509 <td><code>gmdate('h')</code></td> 510 <td>For a comment posted at a specific hour (Offset to GMT)</td> 511 </tr> 512 <tr class="alt"> 513 <td scope="row">c[n]</td> 514 <td>n/a</td> 515 <td>For counting comments relative to the first, where <i>[n]</i> is the number, e.g., <code>c1</code> for the first comment, <code>c2</code> for the second, <code>c3</code> for the third</td> 516 </tr> 517 <tr> 518 <td scope="row">c-d01–31</td> 519 <td><code>gmdate('d')</code></td> 520 <td>For a comment posted on a specific date (Offset to GMT)</td> 521 </tr> 522 <tr class="alt"> 523 <td scope="row">c-m00–12</td> 524 <td><code>gmdate('m')</code></td> 525 <td>For a comment posted in a specific month (Offset to GMT)</td> 526 </tr> 527 <tr> 528 <td scope="row">c-y2007</td> 529 <td><code>gmdate('Y')</code></td> 530 <td>For a comment posted in a specific year (Offset to GMT)</td> 531 </tr> 532 <tr class="alt"> 533 <td scope="row">comment</td> 534 <td>n/a</td> 535 <td>A general class, applied to every comment</td> 536 </tr> 537 <tr> 538 <td scope="row">comment-author-[name]</td> 539 <td>n/a</td> 540 <td>For a comment by a specific registered user, where <i>[name]</i> is the user's login name, e.g., <code>comment-author-susan</code></td> 541 </tr> 542 <tr class="alt"> 543 <td scope="row">t[n]</td> 544 <td>n/a</td> 545 <td>For counting trackbacks relative to the first, where <i>[n]</i> is the number, e.g., <code>t1</code> for the first trackback, <code>t2</code> for the second, <code>t3</code> for the third</td> 546 </tr> 547 <tr> 548 <td scope="row">trackback</td> 549 <td>is_trackback()</td> 550 <td>When a comment is a trackback</td> 551 </tr> 552 </tbody> 553 </table><!-- #comment-class-table --> 554 </li><!-- #comment-class --> 555 </ol> 556 </li><!-- #functions --> 557 <li id="features"> 558 <h2>Other features</h2> 559 <p>In addition to the more advanced, code-related features of the Sandbox, there are at least two other features that make the Sandbox a highly viable choice as a base theme.</p> 560 <ol> 561 <li id="comments"> 562 <h3>Comments on pages</h3> 563 <p>Comments are not displayed on pages by default, but are displayed on posts, per the current convention. You can enable comments on a per page basis by adding a custom key/value with only the text <code>comments</code>.</p> 564 <p>To enable comments on a page:</p> 565 <ol> 566 <li>In the <i>Write › Page</i> menu, expand the <a href="http://codex.wordpress.org/Using_Custom_Fields" title="Custom Fields - WordPress Codex" rel="external">Custom Fields</a> box</li> 567 <li>In the <i>Custom Fields</i> box, add a new key with the exact text <code>comments</code></li> 568 <li>Add any text for a value (some text must be included for the key to save)</li> 569 <li>Click <i>Add Custom Field</i> to save the key/value</li> 570 <li>Comments should now be enabled on that page</li> 571 </ol> 572 <p>Enabling comments simply includes the <code>comments.php</code> file with the page. You can turn off comments on a page by deleting the <code>comments</code> key/value. This does not delete any exisiting comments, but simply disables <code>comments.php</code> from loading with the page.</p> 573 </li><!-- #comments --> 574 <li id="templates"> 575 <h3>Page templates</h3> 576 <p>There are two <a href="http://codex.wordpress.org/Pages#Page_Templates" title="Page templates - WordPress Codex" rel="external">page templates</a> included: Links Page (<code>links.php</code>) and Archives Page (<code>archives.php</code>). You can add a title, text, and enable comments (see above) with both of these page templates.</p> 577 <p>To use the page templates:</p> 578 <ol> 579 <li>In the <i>Write › Page</i> menu, expand the <i>Page Templates</i> box</li> 580 <li>From the drop-down, select the page template to use</li> 581 <li>Add a title and text (optional) for the page</li> 582 <li>Click <i>Create New Page / Save</i> to publish the page</li> 583 </ol> 584 <p>The Archive Page template displays archives by month and by category. The Links Page displays links by link category.</p> 585 </li><!-- #templates --> 586 </ol> 587 </li><!-- #features --> 588 <li id="creating"> 589 <h2>Creating a theme template</h2> 590 <p>If you are interested in creating a design for public release, consider creating a theme template based on the Sandbox. First read <a href="http://codex.wordpress.org/Designing_Themes_for_Public_Release" title="Designing Themes for Public Release - WordPress Codex" rel="external">Designing Themes for Public Release</a> on the WordPress Codex and seek support on the <a href="http://wordpress.org/support/" title="WordPress.org Support Forums" rel="external">WordPress.org Forums</a>.</p> 591 <p>A theme template is a WordPress theme that uses the <abbr title="Preprocessor Hypertext">PHP</abbr> files, e.g., <code>index.php</code>, <code>single.php</code>, in another theme folder but the <code>style.css</code> of the theme template.</p> 592 <p>For a collection of excellent theme templates designed for the Sandbox, visit the <a href="http://www.sndbx.org/" title="Sandbox Designs Competition" rel="me">Sandbox Designs Competition</a>. In 2007, there were 46 designs submitted in the competition. All are examples of theme templates based on the Sandbox.</p> 593 <p>Creating a theme template is essentially the same as creating a regular theme for WordPress, except you are not modifying any of the theme files and instead providing an alternate <code>style.css</code>.</p> 594 <pre class="css">/* 595 THEME NAME: My Design 596 THEME URI: http://www.sndbx.org/ 597 DESCRIPTION: New curtains for an old room 598 VERSION: 0.1 599 AUTHOR: Scott Allan Wallick 600 AUTHOR Uri: http://scottwallick.com/ 601 TEMPLATE: sandbox 602 */</pre> 603 <p>The line <code>TEMPLATE: sandbox</code> tells WordPress to use the theme files installed in the <code>/sandbox/</code> folder with the "My Design" <code>style.css</code> style sheet.</p> 604 <p>You can read more detailed information about developing <a href="http://codex.wordpress.org/Theme_Development#Theme_Style_Sheet" title="WordPress Theme Development - Theme Style Sheets" rel="external">WordPress Theme Style Sheets</a> on the WordPress Codex.</p> 605 </li><!-- #creating --> 606 <li id="standards"> 607 <h2>Web standards</h2> 608 <p>The Sandbox is compliant with both <abbr title="eXtensible HyperText Markup Language">XHTML</abbr> and <abbr title="Cascading Style Sheets">CSS</abbr> standards. What does this mean? An explanation of web standards from <a href="http://webstandards.org" title="Web Standards Project" rel="external">The Web Standards Project</a>:</p> 609 <blockquote cite="http://webstandards.org/learn/faq/" title="What are web standards and why should I use them?"> 610 <p>Complying with web standards can give your web pages greater visibility in web searches. The structural information present in compliant documents makes it easy for search engines to access and evaluate the information in those documents, and they get indexed more accurately.</p> 611 <p>Accessibility is an important idea behind many web standards. Not only does this mean allowing the web to be used by people with disabilities, but also allowing web pages to be understood by people using browsers other than the usual ones—including voice browsers that read web pages aloud to people with sight impairments, Braille browsers, hand-held browsers, teletext displays, and other unusual output devices.</p> 612 </blockquote> 613 <p>You can read more about developing with web standards at <a href="http://www.456bereastreet.com/lab/developing_with_web_standards/webstandards/" title="Developing with web standards" rel="external">456 Berea Street</a>.</p> 614 </li><!-- #standards--> 615 <li id="microformats"> 616 <h2>Microformats</h2> 617 <p><a href="http://microformats.org/" title="Microformats.org" rel="external">Microformats</a> are markup that express semantic information in your blog. People and machines can extract information from webpages marked up in a microformat much like feed readers extract information from Atom or <abbr title="Rich Site Summary">RSS</abbr> syndicated feeds. Essentially it's about making content more accessible.</p> 618 <p>Microformats that have been implemented in the Sandbox theme include (less <a href="http://gmpg.org/xfn/" title="XHTML Friends Network" rel="external"><abbr title="XHTML Friends Network">XFN</abbr></a>, which is built into WordPress):</p> 619 <ul> 620 <li><a href="http://microformats.org/wiki/hatom" title="hAtom - Microformats" rel="external">hAtom</a>: For all blog posts and pages</li> 621 <li><a href="http://microformats.org/wiki/hcard" title="hCard - Microformats" rel="external">hCard</a>: For all post and comment authors</li> 622 <li><a href="http://microformats.org/wiki/rel-home" title="rel-home - Microformats" rel="external">rel="home"</a>: For marking links pointing to the blog home page</li> 623 <li><a href="http://microformats.org/wiki/xoxo" title="XOXO - Microformats" rel="external">XOXO</a>: For menu, blogroll, archive, and sidebar lists</li> 624 </ul> 625 <p>Microformats help the Sandbox be an especially <abbr title="Plain old semantic HTML">POSH</abbr> WordPress theme. POSH stands for "plain old semantic <abbr title="HyperText Markup Language">HTML</abbr>." It is a term used to refer to best practices of semantic <abbr title="HyperText Markup Language">HTML</abbr> development. The Microformats Wiki <a href="http://microformats.org/wiki/posh" title="POSH - Microformats" rel="external"><abbr title="Plain old semantic HTML">POSH</abbr> article</a> has a working copy of these best practices:</p> 626 <ol> 627 <li>Validate your markup, meaning it should <em>be</em> valid, not just validated</li> 628 <li>No use of tables for presentational purposes—only for tabular data</li> 629 <li>Correct any "<span class="bold">B</span>ed and <span class="bold">BR</span>eakfast" markup, i.e., no presentational elements like <code>b</code>, and no <code><br /></code></li> 630 <li>Correct any "<span class="bold">A</span>norexic anchors," e.g., an <code>a</code> element with only a <code>name</code> attribute</li> 631 <li>Use well-formed, semantic class names (Sandbox does this for you)</li> 632 </ol> 633 <p>So the Sandbox can be highly <abbr title="Plain old semantic HTML">POSH</abbr>, but the semantic use of <abbr title="HyperText Markup Language">HTML</abbr> elements is completely up to you, the end user. To learn more about semantic <abbr title="HyperText Markup Language">HTML</abbr>, visit <a href="http://www.mezzoblue.com/downloads/markupguide/" title="mezzoblue § Markup Guide">Mezzoblue</a>.</p> 634 </li><!-- #microformats --> 635 <li id="credits"> 636 <h2>Credits and thanks</h2> 637 <p>The Sandbox is a collaboration between <span class="vcard"><a class="url fn n" href="http://andy.wordpress.com/" title="Andy, WordPress.com" rel="friend colleague external"><span class="given-name">Andy</span><span class="family-name"> Skelton</span></a></span> and <span class="vcard"><a class="url fn n" href="http://www.plaintxt.org/" title="Scott, plaintxt.org" rel="me"><span class="given-name">Scott</span><span class="additional-name"> Allan</span><span class="family-name"> Wallick</span></a></span>.</p> 638 <p>Thanks to all those who have provided their assistance, know-how, and generally sound advice on all things Sandbox. You are many. But a <em>special</em> thanks to the follow individuals:</p> 639 <ul> 640 <li class="vcard"><a class="fn n url" href="http://archgfx.net/" title="archGFX" rel="friend colleague external"><span class="given-name">Adam</span></a></li> 641 <li class="vcard"><a class="fn n url" href="http://ntuat.wordpress.com/" title="ntu sandbox styles" rel="friend external"><span class="given-name">Carolyn</span></a></li> 642 <li class="vcard"><a class="fn n url" href="http://internetducttape.com/" title="Internet Duct Tape" rel="friend external"><span class="given-name">Engtech</span></a></li> 643 <li class="vcard"><a class="fn n url" href="http://lorelle.wordpress.com/" title="Lorell on WordPress" rel="contact external"><span class="given-name">Lorelle</span></a></li> 644 </ul> 645 <p>Thanks are due to those who helped ensure the success of the <a href="http://www.sndbx.org/" title="Sandbox Designs Competition" rel="me">Sandbox Designs Competition</a>:</p> 646 <ul> 647 <li class="vcard"><a class="fn n url" href="http://www.css4design.com/blog/" title="CSS for Designr" rel="contact external"><span class="given-name">Bruno</span> <span class="family-name">Bichet</span></a></li> 648 <li class="vcard"><a class="fn n url" href="http://www.alistercameron.com/" title="Alister" rel="contact external"><span class="given-name">Alister</span> <span class="family-name">Cameron</span></a></li> 649 <li class="vcard"><a class="fn n url" href="http://www.websitestyle.com/" title="Nicole" rel="contact external"><span class="given-name">Nicole</span> <span class="family-name">Hernandez</span></a></li> 650 <li class="vcard"><a class="fn n url" href="http://alexking.org/" title="Alex" rel="contact external"><span class="given-name">Alex</span> <span class="family-name">King</span></a></li> 651 <li class="vcard"><a href="http://photomatt.net/" title="Matt" rel="contact external"><span class="given-name">Matt</span> <span class="family-name">Mullenweg</span></a></li> 652 <li class="vcard"><a class="fn n url" href="http://www.pressharbor.com/" title="PressHarbor" rel="contact external"><span class="org">PressHarbor</span></a></li> 653 <li class="vcard"><a class="fn n url" href="http://justagirlintheworld.com/" title="Lisa Sabin-Wilson" rel="contact external"><span class="given-name">Lisa</span> <span class="family-name">Sabin-Wilson</span></a></li> 654 <li class="vcard"><a class="fn n url" href="http://dowan.org/" title="Dowan.org" rel="contact external"><span class="given-name">Maja</span> <span class="family-name">Schmidt</span></a></li> 655 <li class="vcard"><a class="fn n url" href="http://theundersigned.net/" title="The undersigned" rel="contact external"><span class="given-name">Thomas</span> <span class="family-name">Silkjær</span></a></li> 656 <li class="vcard"><a class="fn n url" href="http://www.wpdesigner.com/" title="WP Designer" rel="contact external"><span class="nickname">Small Potato</span></a></li> 657 <li class="vcard"><a class="fn n url" href="http://paulstamatiou.com/" title="Paul Stamatiou" rel="contact external"><span class="given-name">Paul</span> <span class="family-name">Stamatiou</span></a></li> 658 <li class="vcard"><a class="fn n url" href="http://bryanveloso.com/" title="Bryan Veloso" rel="contact external"><span class="given-name">Bryan</span> <span class="family-name">Veloso</span></a></li> 659 <li class="vcard"><a class="fn n url" href="http://beccary.com/" title="Beccary" rel="contact external"><span class="given-name">Becca</span> <span class="family-name">Wei</span></a></li> 660 <li class="vcard"><a class="fn n url" href="http://www.elizzza.net/" title="eliZZZa.net" rel="contact external"><span class="given-name">Elisabeth</span> <span class="family-name">Wetsch</span></a></li> 661 <li class="vcard"><a class="fn n url" href="http://www.jonathanwold.com/" title="Jonathan Wold" rel="contact external"><span class="given-name">Jonathan</span> <span class="family-name">Wold</span></a></li> 662 <li class="vcard"><a class="fn n url" href="http://thedesigncanopy.com/" title="The Design Canopy" rel="contact external"><span class="given-name">David</span> <span class="family-name">Yeiser</span></a></li> 663 </ul> 664 </li><!-- #extra --> 665 <li id="license"> 666 <h2>License</h2> 667 <p>The Sandbox © 2006–2008 is licensed under the <a href="http://www.gnu.org/licenses/gpl.html" title="GNU General Public License" rel="license"><abbr title="GNU is Not Unix">GNU</abbr> General Public License</a>:</p> 668 <blockquote title="How to use the GPL or LPGL" cite="http://www.gnu.org/licenses/gpl-howto.html"> 669 <p>This program is free software; you can redistribute it and/or modify it under the terms of the <abbr title="GNU is Not Unix">GNU</abbr> General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.</p> 670 <p>This program is distributed in the hope that it will be useful, but <strong>without any warranty</strong>; without even the implied warranty of <strong>merchantability</strong> or <strong>fitness for a particular purpose</strong>. See the <abbr title="GNU is Not Unix">GNU</abbr> General Public License for more details.</p> 671 <p>You should have received a copy of the <abbr title="GNU is Not Unix">GNU</abbr> General Public License along with this program; if not, write to the <span class="vcard"><a class="url fn org" href="http://www.fsf.org/" rel="external">Free Software Foundation, Inc</a>, <span class="adr"><span class="street-address">51 Franklin Street, Fifth Floor</span>, <span class="locality">Boston</span>, <span class="region">MA</span> <span class="postal-code">02110-1301</span>, <span class="country-name">USA</span></span></span>.</p> 672 </blockquote> 673 </li><!-- #license --> 674 </ol><!-- #readme .xoxo --> 675 <div id="footer"> 676 <p>Last updated 25 August 2007</p> 677 </div><!-- #footer --> 678 </div><!-- #readme --> 679 </body> 680 </html> 681 No newline at end of file -
wp-content/themes/sandbox/tag.php
Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: wp-content\themes\sandbox\screenshot.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream
1 <?php get_header() ?> 2 3 <div id="container"> 4 <div id="content"> 5 6 <h2 class="page-title"><?php _e('Tag Archives:', 'sandbox') ?> <span><?php single_tag_title(); ?></span></h2> 7 8 <div id="nav-above" class="navigation"> 9 <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'sandbox')) ?></div> 10 <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'sandbox')) ?></div> 11 </div> 12 13 <?php while (have_posts()) : the_post(); ?> 14 15 <div id="post-<?php the_ID(); ?>" class="<?php sandbox_post_class(); ?>"> 16 <h3 class="entry-title"><a href="<?php the_permalink() ?>" title="<?php printf(__('Permalink to %s', 'sandbox'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark"><?php the_title() ?></a></h3> 17 <div class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO'); ?>"><?php unset($previousday); printf(__('%1$s – %2$s', 'sandbox'), the_date('', '', '', false), get_the_time()) ?></abbr></div> 18 <div class="entry-content"> 19 <?php the_excerpt(''.__('Read More <span class="meta-nav">»</span>', 'sandbox').'') ?> 20 21 </div> 22 <div class="entry-meta"> 23 <span class="author vcard"><?php printf(__('By %s', 'sandbox'), '<a class="url fn n" href="'.get_author_link(false, $authordata->ID, $authordata->user_nicename).'" title="' . sprintf(__('View all posts by %s', 'sandbox'), $authordata->display_name) . '">'.get_the_author().'</a>') ?></span> 24 <span class="meta-sep">|</span> 25 <span class="cat-links"><?php printf(__('Posted in %s', 'sandbox'), get_the_category_list(', ')) ?></span> 26 <span class="meta-sep">|</span> 27 <?php if ( $tag_ur_it = sandbox_tag_ur_it(', ') ) : ?> 28 <span class="tag-links"><?php printf(__('Also tagged %s', 'sandbox'), $tag_ur_it) ?></span> 29 <span class="meta-sep">|</span> 30 <?php endif ?> 31 <?php edit_post_link(__('Edit', 'sandbox'), "\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n"); ?> 32 <span class="comments-link"><?php comments_popup_link(__('Comments (0)', 'sandbox'), __('Comments (1)', 'sandbox'), __('Comments (%)', 'sandbox')) ?></span> 33 </div> 34 </div><!-- .post --> 35 36 <?php endwhile; ?> 37 38 <div id="nav-below" class="navigation"> 39 <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'sandbox')) ?></div> 40 <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'sandbox')) ?></div> 41 </div> 42 43 </div><!-- #content --> 44 </div><!-- #container --> 45 46 <?php get_sidebar() ?> 47 <?php get_footer() ?> -
wp-content/themes/sandbox/page.php
1 <?php get_header() ?> 2 3 <div id="container"> 4 <div id="content"> 5 6 <?php the_post() ?> 7 <div id="post-<?php the_ID(); ?>" class="<?php sandbox_post_class() ?>"> 8 <h2 class="entry-title"><?php the_title(); ?></h2> 9 <div class="entry-content"> 10 <?php the_content() ?> 11 12 <?php link_pages("\t\t\t\t\t<div class='page-link'>".__('Pages: ', 'sandbox'), "</div>\n", 'number'); ?> 13 14 <?php edit_post_link(__('Edit', 'sandbox'),'<span class="edit-link">','</span>') ?> 15 16 </div> 17 </div><!-- .post --> 18 19 <?php if ( get_post_custom_values('comments') ) comments_template() // Add a key+value of "comments" to enable comments on this page ?> 20 21 </div><!-- #content --> 22 </div><!-- #container --> 23 24 <?php get_sidebar() ?> 25 <?php get_footer() ?> 26 No newline at end of file -
wp-content/themes/sandbox/category.php
1 <?php get_header() ?> 2 3 <div id="container"> 4 <div id="content"> 5 6 <h2 class="page-title"><?php _e('Category Archives:', 'sandbox') ?> <span><?php echo single_cat_title(); ?></span></h2> 7 <div class="archive-meta"><?php if ( !(''== category_description()) ) : echo apply_filters('archive_meta', category_description()); endif; ?></div> 8 9 <div id="nav-above" class="navigation"> 10 <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'sandbox')) ?></div> 11 <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'sandbox')) ?></div> 12 </div> 13 14 <?php while (have_posts()) : the_post(); ?> 15 16 <div id="post-<?php the_ID(); ?>" class="<?php sandbox_post_class(); ?>"> 17 <h3 class="entry-title"><a href="<?php the_permalink() ?>" title="<?php printf(__('Permalink to %s', 'sandbox'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark"><?php the_title() ?></a></h3> 18 <div class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO'); ?>"><?php unset($previousday); printf(__('%1$s – %2$s', 'sandbox'), the_date('', '', '', false), get_the_time()) ?></abbr></div> 19 <div class="entry-content"> 20 <?php the_excerpt(''.__('Read More <span class="meta-nav">»</span>', 'sandbox').'') ?> 21 22 </div> 23 <div class="entry-meta"> 24 <span class="author vcard"><?php printf(__('By %s', 'sandbox'), '<a class="url fn n" href="'.get_author_link(false, $authordata->ID, $authordata->user_nicename).'" title="' . sprintf(__('View all posts by %s', 'sandbox'), $authordata->display_name) . '">'.get_the_author().'</a>') ?></span> 25 <span class="meta-sep">|</span> 26 <?php if ( $cats_meow = sandbox_cats_meow(', ') ) : /* Returns categories other than the one queried */ ?> 27 <span class="cat-links"><?php printf(__('Also posted in %s', 'sandbox'), $cats_meow) ?></span> 28 <span class="meta-sep">|</span> 29 <?php endif ?> 30 <?php the_tags(__('<span class="tag-links">Tagged ', 'sandbox'), ", ", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n") ?> 31 <?php edit_post_link(__('Edit', 'sandbox'), "\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n"); ?> 32 <span class="comments-link"><?php comments_popup_link(__('Comments (0)', 'sandbox'), __('Comments (1)', 'sandbox'), __('Comments (%)', 'sandbox')) ?></span> 33 </div> 34 </div><!-- .post --> 35 36 <?php endwhile; ?> 37 38 <div id="nav-below" class="navigation"> 39 <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'sandbox')) ?></div> 40 <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'sandbox')) ?></div> 41 </div> 42 43 </div><!-- #content --> 44 </div><!-- #container --> 45 46 <?php get_sidebar() ?> 47 <?php get_footer() ?> 48 No newline at end of file -
wp-content/themes/sandbox/links.php
1 <?php 2 /* 3 Template Name: Links Page 4 */ 5 ?> 6 <?php get_header() ?> 7 8 <div id="container"> 9 <div id="content"> 10 11 <?php the_post() ?> 12 <div id="post-<?php the_ID(); ?>" class="<?php sandbox_post_class() ?>"> 13 <h2 class="entry-title"><?php the_title() ?></h2> 14 <div class="entry-content"> 15 <?php the_content() ?> 16 17 <ul id="links-page" class="xoxo"> 18 <?php wp_list_bookmarks('title_before=<h3>&title_after=</h3>') ?> 19 </ul> 20 <?php edit_post_link(__('Edit', 'sandbox'),'<span class="edit-link">','</span>') ?> 21 22 </div> 23 </div><!-- .post --> 24 25 <?php if ( get_post_custom_values('comments') ) comments_template() // Add a key/value of "comments" to enable comments on pages! ?> 26 27 </div><!-- #content --> 28 </div><!-- #container --> 29 30 <?php get_sidebar() ?> 31 <?php get_footer() ?> 32 No newline at end of file -
wp-content/themes/sandbox/archive.php
1 <?php get_header() ?> 2 3 <div id="container"> 4 <div id="content"> 5 6 <?php the_post() ?> 7 8 <?php if ( is_day() ) : ?> 9 <h2 class="page-title"><?php printf(__('Daily Archives: <span>%s</span>', 'sandbox'), get_the_time(get_settings('date_format'))) ?></h2> 10 <?php elseif ( is_month() ) : ?> 11 <h2 class="page-title"><?php printf(__('Monthly Archives: <span>%s</span>', 'sandbox'), get_the_time('F Y')) ?></h2> 12 <?php elseif ( is_year() ) : ?> 13 <h2 class="page-title"><?php printf(__('Yearly Archives: <span>%s</span>', 'sandbox'), get_the_time('Y')) ?></h2> 14 <?php elseif ( isset($_GET['paged']) && !empty($_GET['paged']) ) : ?> 15 <h2 class="page-title"><?php _e('Blog Archives', 'sandbox') ?></h2> 16 <?php endif; ?> 17 18 <?php rewind_posts() ?> 19 20 <div id="nav-above" class="navigation"> 21 <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'sandbox')) ?></div> 22 <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'sandbox')) ?></div> 23 </div> 24 25 <?php while ( have_posts() ) : the_post(); ?> 26 27 <div id="post-<?php the_ID() ?>" class="<?php sandbox_post_class() ?>"> 28 <h3 class="entry-title"><a href="<?php the_permalink() ?>" title="<?php printf(__('Permalink to %s', 'sandbox'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark"><?php the_title() ?></a></h3> 29 <div class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO'); ?>"><?php unset($previousday); printf(__('%1$s – %2$s', 'sandbox'), the_date('', '', '', false), get_the_time()) ?></abbr></div> 30 <div class="entry-content"> 31 <?php the_excerpt(''.__('Read More <span class="meta-nav">»</span>', 'sandbox').'') ?> 32 33 </div> 34 <div class="entry-meta"> 35 <span class="author vcard"><?php printf(__('By %s', 'sandbox'), '<a class="url fn n" href="'.get_author_link(false, $authordata->ID, $authordata->user_nicename).'" title="' . sprintf(__('View all posts by %s', 'sandbox'), $authordata->display_name) . '">'.get_the_author().'</a>') ?></span> 36 <span class="meta-sep">|</span> 37 <span class="cat-links"><?php printf(__('Posted in %s', 'sandbox'), get_the_category_list(', ')) ?></span> 38 <span class="meta-sep">|</span> 39 <?php the_tags(__('<span class="tag-links">Tagged ', 'sandbox'), ", ", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n") ?> 40 <?php edit_post_link(__('Edit', 'sandbox'), "\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n"); ?> 41 <span class="comments-link"><?php comments_popup_link(__('Comments (0)', 'sandbox'), __('Comments (1)', 'sandbox'), __('Comments (%)', 'sandbox')) ?></span> 42 </div> 43 </div><!-- .post --> 44 45 <?php endwhile ?> 46 47 <div id="nav-below" class="navigation"> 48 <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'sandbox')) ?></div> 49 <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'sandbox')) ?></div> 50 </div> 51 52 </div><!-- #content .hfeed --> 53 </div><!-- #container --> 54 55 <?php get_sidebar() ?> 56 <?php get_footer() ?> 57 No newline at end of file -
wp-content/themes/sandbox/single.php
1 <?php get_header() ?> 2 3 <div id="container"> 4 <div id="content"> 5 6 <?php the_post(); ?> 7 <div id="nav-above" class="navigation"> 8 <div class="nav-previous"><?php previous_post_link('%link', '<span class="meta-nav">«</span> %title') ?></div> 9 <div class="nav-next"><?php next_post_link('%link', '%title <span class="meta-nav">»</span>') ?></div> 10 </div> 11 12 <div id="post-<?php the_ID(); ?>" class="<?php sandbox_post_class(); ?>"> 13 <h2 class="entry-title"><?php the_title(); ?></h2> 14 <div class="entry-content"> 15 <?php the_content(''.__('Read More <span class="meta-nav">»</span>', 'sandbox').''); ?> 16 17 <?php link_pages("\t\t\t\t\t<div class='page-link'>".__('Pages: ', 'sandbox'), "</div>\n", 'number'); ?> 18 </div> 19 <div class="entry-meta"> 20 <?php printf(__('This entry was written by %1$s, posted on <abbr class="published" title="%2$sT%3$s">%4$s at %5$s</abbr>, filed under %6$s%7$s. Bookmark the <a href="%8$s" title="Permalink to %9$s" rel="bookmark">permalink</a>. Follow any comments here with the <a href="%10$s" title="Comments RSS to %9$s" rel="alternate" type="application/rss+xml">RSS feed for this post</a>.', 'sandbox'), 21 '<span class="author vcard"><a class="url fn n" href="'.get_author_link(false, $authordata->ID, $authordata->user_nicename).'" title="' . sprintf(__('View all posts by %s', 'sandbox'), $authordata->display_name) . '">'.get_the_author().'</a></span>', 22 get_the_time('Y-m-d'), 23 get_the_time('H:i:sO'), 24 the_date('', '', '', false), 25 get_the_time(), 26 get_the_category_list(', '), 27 get_the_tag_list(' and tagged ', ', ', ''), 28 get_permalink(), 29 wp_specialchars(get_the_title(), 'double'), 30 comments_rss() ) ?> 31 32 <?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) : // Comments and trackbacks open ?> 33 <?php printf(__('<a class="comment-link" href="#respond" title="Post a comment">Post a comment</a> or leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'sandbox'), get_trackback_url()) ?> 34 <?php elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) : // Only trackbacks open ?> 35 <?php printf(__('Comments are closed, but you can leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'sandbox'), get_trackback_url()) ?> 36 <?php elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) : // Only comments open ?> 37 <?php printf(__('Trackbacks are closed, but you can <a class="comment-link" href="#respond" title="Post a comment">post a comment</a>.', 'sandbox')) ?> 38 <?php elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) : // Comments and trackbacks closed ?> 39 <?php _e('Both comments and trackbacks are currently closed.') ?> 40 <?php endif; ?> 41 <?php edit_post_link(__('Edit', 'sandbox'), "\n\t\t\t\t\t<span class=\"edit-link\">", "</span>"); ?> 42 43 </div> 44 </div><!-- .post --> 45 46 <div id="nav-below" class="navigation"> 47 <div class="nav-previous"><?php previous_post_link('%link', '<span class="meta-nav">«</span> %title') ?></div> 48 <div class="nav-next"><?php next_post_link('%link', '%title <span class="meta-nav">»</span>') ?></div> 49 </div> 50 51 <?php comments_template(); ?> 52 53 </div><!-- #content --> 54 </div><!-- #container --> 55 56 <?php get_sidebar() ?> 57 <?php get_footer() ?> -
wp-content/themes/sandbox/comments.php
1 <div id="comments"> 2 <?php 3 $req = get_settings('require_name_email'); // Checks if fields are required. Thanks, Adam. ;-) 4 if ( 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']) ) 5 die ( 'Please do not load this page directly. Thanks!' ); 6 if ( ! empty($post->post_password) ) : 7 if ( $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password ) : 8 ?> 9 <div class="nopassword"><?php _e('This post is password protected. Enter the password to view any comments.', 'sandbox') ?></div> 10 </div><!-- .comments --> 11 <?php 12 return; 13 endif; 14 endif; 15 ?> 16 <?php if ( $comments ) : ?> 17 <?php global $sandbox_comment_alt ?> 18 19 <?php /* numbers of pings and comments */ 20 $ping_count = $comment_count = 0; 21 foreach ( $comments as $comment ) 22 get_comment_type() == "comment" ? ++$comment_count : ++$ping_count; 23 ?> 24 <?php if ( $comment_count ) : ?> 25 <?php $sandbox_comment_alt = 0 ?> 26 27 <div id="comments-list" class="comments"> 28 <h3><?php printf($comment_count > 1 ? __('<span>%d</span> Comments', 'sandbox') : __('<span>One</span> Comment', 'sandbox'), $comment_count) ?></h3> 29 30 <ol> 31 <?php foreach ($comments as $comment) : ?> 32 <?php if ( get_comment_type() == "comment" ) : ?> 33 <li id="comment-<?php comment_ID() ?>" class="<?php sandbox_comment_class() ?>"> 34 <div class="comment-author vcard"><span class="fn n"><?php comment_author_link() ?></span></div> 35 <div class="comment-meta"><?php printf(__('Posted %1$s at %2$s <span class="meta-sep">|</span> <a href="%3$s" title="Permalink to this comment">Permalink</a>', 'sandbox'), 36 get_comment_date(), 37 get_comment_time(), 38 '#comment-' . get_comment_ID() ); 39 edit_comment_link(__('Edit', 'sandbox'), ' <span class="meta-sep">|</span> <span class="edit-link">', '</span>'); ?></div> 40 <?php if ($comment->comment_approved == '0') _e("\t\t\t\t\t<span class='unapproved'>Your comment is awaiting moderation.</span>\n", 'sandbox') ?> 41 <?php comment_text() ?> 42 </li> 43 <?php endif; /* if ( get_comment_type() == "comment" ) */ ?> 44 <?php endforeach; ?> 45 46 </ol> 47 </div><!-- #comments-list .comments --> 48 49 <?php endif; /* if ( $comment_count ) */ ?> 50 <?php if ( $ping_count ) : ?> 51 <?php $sandbox_comment_alt = 0 ?> 52 53 <div id="trackbacks-list" class="comments"> 54 <h3><?php printf($ping_count > 1 ? __('<span>%d</span> Trackbacks', 'sandbox') : __('<span>One</span> Trackback', 'sandbox'), $ping_count) ?></h3> 55 56 <ol> 57 <?php foreach ( $comments as $comment ) : ?> 58 <?php if ( get_comment_type() != "comment" ) : ?> 59 60 <li id="comment-<?php comment_ID() ?>" class="<?php sandbox_comment_class() ?>"> 61 <div class="comment-author"><?php printf(__('By %1$s on %2$s at %3$s', 'sandbox'), 62 get_comment_author_link(), 63 get_comment_date(), 64 get_comment_time() ); 65 edit_comment_link(__('Edit', 'sandbox'), ' <span class="meta-sep">|</span> <span class="edit-link">', '</span>'); ?></div> 66 <?php if ($comment->comment_approved == '0') _e('\t\t\t\t\t<span class="unapproved">Your trackback is awaiting moderation.</span>\n', 'sandbox') ?> 67 <?php comment_text() ?> 68 </li> 69 <?php endif /* if ( get_comment_type() != "comment" ) */ ?> 70 <?php endforeach; ?> 71 72 </ol> 73 </div><!-- #trackbacks-list .comments --> 74 75 <?php endif /* if ( $ping_count ) */ ?> 76 <?php endif /* if ( $comments ) */ ?> 77 <?php if ( 'open' == $post->comment_status ) : ?> 78 <div id="respond"> 79 <h3><?php _e('Post a Comment', 'sandbox') ?></h3> 80 81 <?php if ( get_option('comment_registration') && !$user_ID ) : ?> 82 <p id="login-req"><?php printf(__('You must be <a href="%s" title="Log in">logged in</a> to post a comment.', 'sandbox'), 83 get_option('siteurl') . '/wp-login.php?redirect_to=' . get_permalink() ) ?></p> 84 85 <?php else : ?> 86 <div class="formcontainer"> 87 <form id="commentform" action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post"> 88 89 <?php if ( $user_ID ) : ?> 90 <p id="login"><?php printf(__('<span class="loggedin">Logged in as <a href="%1$s" title="Logged in as %2$s">%2$s</a>.</span> <span class="logout"><a href="%3$s" title="Log out of this account">Log out?</a></span>', 'sandbox'), 91 get_option('siteurl') . '/wp-admin/profile.php', 92 wp_specialchars($user_identity, true), 93 get_option('siteurl') . '/wp-login.php?action=logout&redirect_to=' . get_permalink() ) ?></p> 94 95 <?php else : ?> 96 97 <p id="comment-notes"><?php _e('Your email is <em>never</em> published nor shared.', 'sandbox') ?> <?php if ($req) _e('Required fields are marked <span class="required">*</span>', 'sandbox') ?></p> 98 99 <div class="form-label"><label for="author"><?php _e('Name', 'sandbox') ?></label> <?php if ($req) _e('<span class="required">*</span>', 'sandbox') ?></div> 100 <div class="form-input"><input id="author" name="author" type="text" value="<?php echo $comment_author ?>" size="30" maxlength="20" tabindex="3" /></div> 101 102 <div class="form-label"><label for="email"><?php _e('Email', 'sandbox') ?></label> <?php if ($req) _e('<span class="required">*</span>', 'sandbox') ?></div> 103 <div class="form-input"><input id="email" name="email" type="text" value="<?php echo $comment_author_email ?>" size="30" maxlength="50" tabindex="4" /></div> 104 105 <div class="form-label"><label for="url"><?php _e('Website', 'sandbox') ?></label></div> 106 <div class="form-input"><input id="url" name="url" type="text" value="<?php echo $comment_author_url ?>" size="30" maxlength="50" tabindex="5" /></div> 107 108 <?php endif /* if ( $user_ID ) */ ?> 109 110 <div class="form-label"><label for="comment"><?php _e('Comment', 'sandbox') ?></label></div> 111 <div class="form-textarea"><textarea id="comment" name="comment" cols="45" rows="8" tabindex="6"></textarea></div> 112 113 <div class="form-submit"><input id="submit" name="submit" type="submit" value="<?php _e('Post Comment', 'sandbox') ?>" tabindex="7" /><input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /></div> 114 115 <?php do_action('comment_form', $post->ID); ?> 116 117 </form><!-- #commentform --> 118 </div><!-- .formcontainer --> 119 <?php endif /* if ( get_option('comment_registration') && !$user_ID ) */ ?> 120 121 </div><!-- #respond --> 122 <?php endif /* if ( 'open' == $post->comment_status ) */ ?> 123 124 </div><!-- #comments --> -
wp-content/themes/sandbox/attachment.php
1 <?php get_header() ?> 2 3 <div id="container"> 4 <div id="content"> 5 6 <?php the_post() ?> 7 8 <h2 class="page-title"><a href="<?php echo get_permalink($post->post_parent) ?>" rev="attachment"><?php echo get_the_title($post->post_parent) ?></a></h2> 9 <div id="post-<?php the_ID(); ?>" class="<?php sandbox_post_class() ?>"> 10 <h3 class="entry-title"><?php the_title() ?></h3> 11 <div class="entry-content"> 12 <div class="entry-attachment"><?php the_attachment_link($post->post_ID, true) ?></div> 13 <?php the_content(''.__('Read More <span class="meta-nav">»</span>', 'sandbox').''); ?> 14 15 <?php link_pages("\t\t\t\t\t<div class='page-link'>".__('Pages: ', 'sandbox'), "</div>\n", 'number'); ?> 16 17 </div> 18 <div class="entry-meta"> 19 <?php printf(__('This entry was written by %1$s, posted on <abbr class="published" title="%2$sT%3$s">%4$s at %5$s</abbr>, filed under %6$s and tagged %7$s. Bookmark the <a href="%8$s" title="Permalink to %9$s" rel="bookmark">permalink</a>. Follow any comments here with the <a href="%10$s" title="Comments RSS to %9$s" rel="alternate" type="application/rss+xml">RSS feed for this post</a>.', 'sandbox'), 20 '<span class="author vcard"><a class="url fn n" href="'.get_author_link(false, $authordata->ID, $authordata->user_nicename).'" title="' . sprintf(__('View all posts by %s', 'sandbox'), $authordata->display_name) . '">'.get_the_author().'</a></span>', 21 get_the_time('Y-m-d'), 22 get_the_time('H:i:sO'), 23 the_date('', '', '', false), 24 get_the_time(), 25 get_the_category_list(', '), 26 get_the_tag_list(' and tagged ', ', ', ''), 27 get_permalink(), 28 wp_specialchars(get_the_title(), 'double'), 29 comments_rss() ) ?> 30 31 <?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) : // Comments and trackbacks open ?> 32 <?php printf(__('<a class="comment-link" href="#respond" title="Post a comment">Post a comment</a> or leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'sandbox'), get_trackback_url()) ?> 33 <?php elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) : // Only trackbacks open ?> 34 <?php printf(__('Comments are closed, but you can leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'sandbox'), get_trackback_url()) ?> 35 <?php elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) : // Only comments open ?> 36 <?php printf(__('Trackbacks are closed, but you can <a class="comment-link" href="#respond" title="Post a comment">post a comment</a>.', 'sandbox')) ?> 37 <?php elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) : // Comments and trackbacks closed ?> 38 <?php _e('Both comments and trackbacks are currently closed.') ?> 39 <?php endif; ?> 40 <?php edit_post_link(__('Edit', 'sandbox'), "\n\t\t\t\t\t<span class=\"edit-link\">", "</span>"); ?> 41 42 </div> 43 </div><!-- .post --> 44 45 <?php comments_template(); ?> 46 47 </div><!-- #content --> 48 </div><!-- #container --> 49 50 <?php get_sidebar() ?> 51 <?php get_footer() ?> 52 No newline at end of file -
wp-content/themes/sandbox/header.php
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes() ?>> 3 <head profile="http://gmpg.org/xfn/11"> 4 <title><?php bloginfo('name'); if ( is_404() ) : _e(' » ', 'sandbox'); _e('Not Found', 'sandbox'); elseif ( is_home() ) : _e(' » ', 'sandbox'); bloginfo('description'); else : wp_title(); endif; ?></title> 5 <meta http-equiv="content-type" content="<?php bloginfo('html_type') ?>; charset=<?php bloginfo('charset') ?>" /> 6 <meta name="description" content="<?php bloginfo('description') ?>" /> 7 <meta name="generator" content="WordPress <?php bloginfo('version') ?>" /><!-- Please leave for stats --> 8 <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url'); ?>" /> 9 <link rel="alternate" type="application/rss+xml" href="<?php bloginfo('rss2_url') ?>" title="<?php echo wp_specialchars(get_bloginfo('name'), 1) ?> <?php _e('Posts RSS feed', 'sandbox'); ?>" /> 10 <link rel="alternate" type="application/rss+xml" href="<?php bloginfo('comments_rss2_url') ?>" title="<?php echo wp_specialchars(get_bloginfo('name'), 1) ?> <?php _e('Comments RSS feed', 'sandbox'); ?>" /> 11 <link rel="pingback" href="<?php bloginfo('pingback_url') ?>" /> 12 <?php wp_head() ?> 13 14 </head> 15 16 <body class="<?php sandbox_body_class() ?>"> 17 18 <div id="wrapper" class="hfeed"> 19 20 <div id="header"> 21 <h1 id="blog-title"><a href="<?php echo get_settings('home') ?>/" title="<?php bloginfo('name') ?>" rel="home"><?php bloginfo('name') ?></a></h1> 22 <div id="blog-description"><?php bloginfo('description') ?></div> 23 </div><!-- #header --> 24 25 <div id="access"> 26 <div class="skip-link"><a href="#content" title="<?php _e('Skip navigation to the content', 'sandbox'); ?>"><?php _e('Skip to content', 'sandbox'); ?></a></div> 27 <?php sandbox_globalnav() ?> 28 </div><!-- #access --> -
wp-content/themes/sandbox/404.php
1 <?php get_header() ?> 2 3 <div id="container"> 4 <div id="content"> 5 6 <div id="post-0" class="post error404"> 7 <h2 class="entry-title"><?php _e('Not Found', 'sandbox') ?></h2> 8 <div class="entry-content"> 9 <p><?php _e('Apologies, but we were unable to find what you were looking for. Perhaps searching will help.', 'sandbox') ?></p> 10 </div> 11 <form id="error404-searchform" method="get" action="<?php bloginfo('home') ?>"> 12 <div> 13 <input id="error404-s" name="s" type="text" value="<?php echo wp_specialchars(stripslashes($_GET['s']), true) ?>" size="40" /> 14 <input id="error404-searchsubmit" name="searchsubmit" type="submit" value="<?php _e('Find', 'sandbox') ?>" /> 15 </div> 16 </form> 17 </div><!-- .post --> 18 19 </div><!-- #content --> 20 </div><!-- #container --> 21 22 <?php get_sidebar() ?> 23 <?php get_footer() ?> 24 No newline at end of file -
wp-content/themes/sandbox/archive.php
1 <?php get_header() ?> 2 3 <div id="container"> 4 <div id="content"> 5 6 <?php the_post() ?> 7 8 <?php if ( is_day() ) : ?> 9 <h2 class="page-title"><?php printf(__('Daily Archives: <span>%s</span>', 'sandbox'), get_the_time(get_settings('date_format'))) ?></h2> 10 <?php elseif ( is_month() ) : ?> 11 <h2 class="page-title"><?php printf(__('Monthly Archives: <span>%s</span>', 'sandbox'), get_the_time('F Y')) ?></h2> 12 <?php elseif ( is_year() ) : ?> 13 <h2 class="page-title"><?php printf(__('Yearly Archives: <span>%s</span>', 'sandbox'), get_the_time('Y')) ?></h2> 14 <?php elseif ( isset($_GET['paged']) && !empty($_GET['paged']) ) : ?> 15 <h2 class="page-title"><?php _e('Blog Archives', 'sandbox') ?></h2> 16 <?php endif; ?> 17 18 <?php rewind_posts() ?> 19 20 <div id="nav-above" class="navigation"> 21 <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'sandbox')) ?></div> 22 <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'sandbox')) ?></div> 23 </div> 24 25 <?php while ( have_posts() ) : the_post(); ?> 26 27 <div id="post-<?php the_ID() ?>" class="<?php sandbox_post_class() ?>"> 28 <h3 class="entry-title"><a href="<?php the_permalink() ?>" title="<?php printf(__('Permalink to %s', 'sandbox'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark"><?php the_title() ?></a></h3> 29 <div class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO'); ?>"><?php unset($previousday); printf(__('%1$s – %2$s', 'sandbox'), the_date('', '', '', false), get_the_time()) ?></abbr></div> 30 <div class="entry-content"> 31 <?php the_excerpt(''.__('Read More <span class="meta-nav">»</span>', 'sandbox').'') ?> 32 33 </div> 34 <div class="entry-meta"> 35 <span class="author vcard"><?php printf(__('By %s', 'sandbox'), '<a class="url fn n" href="'.get_author_link(false, $authordata->ID, $authordata->user_nicename).'" title="' . sprintf(__('View all posts by %s', 'sandbox'), $authordata->display_name) . '">'.get_the_author().'</a>') ?></span> 36 <span class="meta-sep">|</span> 37 <span class="cat-links"><?php printf(__('Posted in %s', 'sandbox'), get_the_category_list(', ')) ?></span> 38 <span class="meta-sep">|</span> 39 <?php the_tags(__('<span class="tag-links">Tagged ', 'sandbox'), ", ", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n") ?> 40 <?php edit_post_link(__('Edit', 'sandbox'), "\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n"); ?> 41 <span class="comments-link"><?php comments_popup_link(__('Comments (0)', 'sandbox'), __('Comments (1)', 'sandbox'), __('Comments (%)', 'sandbox')) ?></span> 42 </div> 43 </div><!-- .post --> 44 45 <?php endwhile ?> 46 47 <div id="nav-below" class="navigation"> 48 <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'sandbox')) ?></div> 49 <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'sandbox')) ?></div> 50 </div> 51 52 </div><!-- #content .hfeed --> 53 </div><!-- #container --> 54 55 <?php get_sidebar() ?> 56 <?php get_footer() ?> 57 No newline at end of file -
wp-content/themes/sandbox/archives.php
1 <?php 2 /* 3 Template Name: Archives Page 4 */ 5 ?> 6 <?php get_header() ?> 7 8 <div id="container"> 9 <div id="content"> 10 11 <?php the_post() ?> 12 13 <div id="post-<?php the_ID() ?>" class="<?php sandbox_post_class() ?>"> 14 <h2 class="entry-title"><?php the_title() ?></h2> 15 <div class="entry-content"> 16 <?php the_content(); ?> 17 18 <ul id="archives-page" class="xoxo"> 19 <li id="category-archives" class="content-column"> 20 <h3><?php _e('Archives by Category', 'sandbox') ?></h3> 21 <ul> 22 <?php wp_list_cats('sort_column=name&optioncount=1&feed=RSS') ?> 23 </ul> 24 </li> 25 <li id="monthly-archives" class="content-column"> 26 <h3><?php _e('Archives by Month', 'sandbox') ?></h3> 27 <ul> 28 <?php wp_get_archives('type=monthly&show_post_count=1') ?> 29 </ul> 30 </li> 31 </ul> 32 <?php edit_post_link(__('Edit', 'sandbox'),'<span class="edit-link">','</span>') ?> 33 34 </div> 35 </div><!-- .post --> 36 37 <?php if ( get_post_custom_values('comments') ) comments_template() // Add a key/value of "comments" to enable comments on pages! ?> 38 39 </div><!-- #content --> 40 </div><!-- #container --> 41 42 <?php get_sidebar() ?> 43 <?php get_footer() ?> 44 No newline at end of file -
wp-content/themes/sandbox/attachment.php
1 <?php get_header() ?> 2 3 <div id="container"> 4 <div id="content"> 5 6 <?php the_post() ?> 7 8 <h2 class="page-title"><a href="<?php echo get_permalink($post->post_parent) ?>" rev="attachment"><?php echo get_the_title($post->post_parent) ?></a></h2> 9 <div id="post-<?php the_ID(); ?>" class="<?php sandbox_post_class() ?>"> 10 <h3 class="entry-title"><?php the_title() ?></h3> 11 <div class="entry-content"> 12 <div class="entry-attachment"><?php the_attachment_link($post->post_ID, true) ?></div> 13 <?php the_content(''.__('Read More <span class="meta-nav">»</span>', 'sandbox').''); ?> 14 15 <?php link_pages("\t\t\t\t\t<div class='page-link'>".__('Pages: ', 'sandbox'), "</div>\n", 'number'); ?> 16 17 </div> 18 <div class="entry-meta"> 19 <?php printf(__('This entry was written by %1$s, posted on <abbr class="published" title="%2$sT%3$s">%4$s at %5$s</abbr>, filed under %6$s and tagged %7$s. Bookmark the <a href="%8$s" title="Permalink to %9$s" rel="bookmark">permalink</a>. Follow any comments here with the <a href="%10$s" title="Comments RSS to %9$s" rel="alternate" type="application/rss+xml">RSS feed for this post</a>.', 'sandbox'), 20 '<span class="author vcard"><a class="url fn n" href="'.get_author_link(false, $authordata->ID, $authordata->user_nicename).'" title="' . sprintf(__('View all posts by %s', 'sandbox'), $authordata->display_name) . '">'.get_the_author().'</a></span>', 21 get_the_time('Y-m-d'), 22 get_the_time('H:i:sO'), 23 the_date('', '', '', false), 24 get_the_time(), 25 get_the_category_list(', '), 26 get_the_tag_list(' and tagged ', ', ', ''), 27 get_permalink(), 28 wp_specialchars(get_the_title(), 'double'), 29 comments_rss() ) ?> 30 31 <?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) : // Comments and trackbacks open ?> 32 <?php printf(__('<a class="comment-link" href="#respond" title="Post a comment">Post a comment</a> or leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'sandbox'), get_trackback_url()) ?> 33 <?php elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) : // Only trackbacks open ?> 34 <?php printf(__('Comments are closed, but you can leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'sandbox'), get_trackback_url()) ?> 35 <?php elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) : // Only comments open ?> 36 <?php printf(__('Trackbacks are closed, but you can <a class="comment-link" href="#respond" title="Post a comment">post a comment</a>.', 'sandbox')) ?> 37 <?php elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) : // Comments and trackbacks closed ?> 38 <?php _e('Both comments and trackbacks are currently closed.') ?> 39 <?php endif; ?> 40 <?php edit_post_link(__('Edit', 'sandbox'), "\n\t\t\t\t\t<span class=\"edit-link\">", "</span>"); ?> 41 42 </div> 43 </div><!-- .post --> 44 45 <?php comments_template(); ?> 46 47 </div><!-- #content --> 48 </div><!-- #container --> 49 50 <?php get_sidebar() ?> 51 <?php get_footer() ?> 52 No newline at end of file -
wp-content/themes/sandbox/author.php
1 <?php get_header() ?> 2 3 <div id="container"> 4 <div id="content"> 5 6 <?php the_post() ?> 7 8 <h2 class="page-title author"><?php printf(__('Author Archives: <span class="vcard">%s</span>', 'sandbox'), "<a class='url fn n' href='$authordata->user_url' title='$authordata->display_name' rel='me'>$authordata->display_name</a>") ?></h2> 9 <div class="archive-meta"><?php if ( !(''== $authordata->user_description) ) : echo apply_filters('archive_meta', $authordata->user_description); endif; ?></div> 10 11 <div id="nav-above" class="navigation"> 12 <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'sandbox')) ?></div> 13 <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'sandbox')) ?></div> 14 </div> 15 16 <?php rewind_posts(); while (have_posts()) : the_post(); ?> 17 18 <div id="post-<?php the_ID(); ?>" class="<?php sandbox_post_class(); ?>"> 19 <h3 class="entry-title"><a href="<?php the_permalink() ?>" title="<?php printf(__('Permalink to %s', 'sandbox'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark"><?php the_title(); ?></a></h3> 20 <div class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO'); ?>"><?php unset($previousday); printf(__('%1$s – %2$s', 'sandbox'), the_date('', '', '', false), get_the_time()) ?></abbr></div> 21 <div class="entry-content "> 22 <?php the_excerpt(''.__('Read More <span class="meta-nav">»</span>', 'sandbox').'') ?> 23 24 </div> 25 <div class="entry-meta"> 26 <span class="cat-links"><?php printf(__('Posted in %s', 'sandbox'), get_the_category_list(', ')) ?></span> 27 <span class="meta-sep">|</span> 28 <?php the_tags(__('<span class="tag-links">Tagged ', 'sandbox'), ", ", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n") ?> 29 <?php edit_post_link(__('Edit', 'sandbox'), "\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n"); ?> 30 <span class="comments-link"><?php comments_popup_link(__('Comments (0)', 'sandbox'), __('Comments (1)', 'sandbox'), __('Comments (%)', 'sandbox')) ?></span> 31 </div> 32 </div><!-- .post --> 33 34 <?php endwhile ?> 35 36 <div id="nav-below" class="navigation"> 37 <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'sandbox')) ?></div> 38 <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'sandbox')) ?></div> 39 </div> 40 41 </div><!-- #content --> 42 </div><!-- #container --> 43 44 <?php get_sidebar() ?> 45 <?php get_footer() ?> 46 No newline at end of file -
wp-content/themes/sandbox/category.php
1 <?php get_header() ?> 2 3 <div id="container"> 4 <div id="content"> 5 6 <h2 class="page-title"><?php _e('Category Archives:', 'sandbox') ?> <span><?php echo single_cat_title(); ?></span></h2> 7 <div class="archive-meta"><?php if ( !(''== category_description()) ) : echo apply_filters('archive_meta', category_description()); endif; ?></div> 8 9 <div id="nav-above" class="navigation"> 10 <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'sandbox')) ?></div> 11 <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'sandbox')) ?></div> 12 </div> 13 14 <?php while (have_posts()) : the_post(); ?> 15 16 <div id="post-<?php the_ID(); ?>" class="<?php sandbox_post_class(); ?>"> 17 <h3 class="entry-title"><a href="<?php the_permalink() ?>" title="<?php printf(__('Permalink to %s', 'sandbox'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark"><?php the_title() ?></a></h3> 18 <div class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO'); ?>"><?php unset($previousday); printf(__('%1$s – %2$s', 'sandbox'), the_date('', '', '', false), get_the_time()) ?></abbr></div> 19 <div class="entry-content"> 20 <?php the_excerpt(''.__('Read More <span class="meta-nav">»</span>', 'sandbox').'') ?> 21 22 </div> 23 <div class="entry-meta"> 24 <span class="author vcard"><?php printf(__('By %s', 'sandbox'), '<a class="url fn n" href="'.get_author_link(false, $authordata->ID, $authordata->user_nicename).'" title="' . sprintf(__('View all posts by %s', 'sandbox'), $authordata->display_name) . '">'.get_the_author().'</a>') ?></span> 25 <span class="meta-sep">|</span> 26 <?php if ( $cats_meow = sandbox_cats_meow(', ') ) : /* Returns categories other than the one queried */ ?> 27 <span class="cat-links"><?php printf(__('Also posted in %s', 'sandbox'), $cats_meow) ?></span> 28 <span class="meta-sep">|</span> 29 <?php endif ?> 30 <?php the_tags(__('<span class="tag-links">Tagged ', 'sandbox'), ", ", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n") ?> 31 <?php edit_post_link(__('Edit', 'sandbox'), "\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n"); ?> 32 <span class="comments-link"><?php comments_popup_link(__('Comments (0)', 'sandbox'), __('Comments (1)', 'sandbox'), __('Comments (%)', 'sandbox')) ?></span> 33 </div> 34 </div><!-- .post --> 35 36 <?php endwhile; ?> 37 38 <div id="nav-below" class="navigation"> 39 <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'sandbox')) ?></div> 40 <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'sandbox')) ?></div> 41 </div> 42 43 </div><!-- #content --> 44 </div><!-- #container --> 45 46 <?php get_sidebar() ?> 47 <?php get_footer() ?> 48 No newline at end of file -
wp-content/themes/sandbox/comments.php
1 <div id="comments"> 2 <?php 3 $req = get_settings('require_name_email'); // Checks if fields are required. Thanks, Adam. ;-) 4 if ( 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']) ) 5 die ( 'Please do not load this page directly. Thanks!' ); 6 if ( ! empty($post->post_password) ) : 7 if ( $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password ) : 8 ?> 9 <div class="nopassword"><?php _e('This post is password protected. Enter the password to view any comments.', 'sandbox') ?></div> 10 </div><!-- .comments --> 11 <?php 12 return; 13 endif; 14 endif; 15 ?> 16 <?php if ( $comments ) : ?> 17 <?php global $sandbox_comment_alt ?> 18 19 <?php /* numbers of pings and comments */ 20 $ping_count = $comment_count = 0; 21 foreach ( $comments as $comment ) 22 get_comment_type() == "comment" ? ++$comment_count : ++$ping_count; 23 ?> 24 <?php if ( $comment_count ) : ?> 25 <?php $sandbox_comment_alt = 0 ?> 26 27 <div id="comments-list" class="comments"> 28 <h3><?php printf($comment_count > 1 ? __('<span>%d</span> Comments', 'sandbox') : __('<span>One</span> Comment', 'sandbox'), $comment_count) ?></h3> 29 30 <ol> 31 <?php foreach ($comments as $comment) : ?> 32 <?php if ( get_comment_type() == "comment" ) : ?> 33 <li id="comment-<?php comment_ID() ?>" class="<?php sandbox_comment_class() ?>"> 34 <div class="comment-author vcard"><span class="fn n"><?php comment_author_link() ?></span></div> 35 <div class="comment-meta"><?php printf(__('Posted %1$s at %2$s <span class="meta-sep">|</span> <a href="%3$s" title="Permalink to this comment">Permalink</a>', 'sandbox'), 36 get_comment_date(), 37 get_comment_time(), 38 '#comment-' . get_comment_ID() ); 39 edit_comment_link(__('Edit', 'sandbox'), ' <span class="meta-sep">|</span> <span class="edit-link">', '</span>'); ?></div> 40 <?php if ($comment->comment_approved == '0') _e("\t\t\t\t\t<span class='unapproved'>Your comment is awaiting moderation.</span>\n", 'sandbox') ?> 41 <?php comment_text() ?> 42 </li> 43 <?php endif; /* if ( get_comment_type() == "comment" ) */ ?> 44 <?php endforeach; ?> 45 46 </ol> 47 </div><!-- #comments-list .comments --> 48 49 <?php endif; /* if ( $comment_count ) */ ?> 50 <?php if ( $ping_count ) : ?> 51 <?php $sandbox_comment_alt = 0 ?> 52 53 <div id="trackbacks-list" class="comments"> 54 <h3><?php printf($ping_count > 1 ? __('<span>%d</span> Trackbacks', 'sandbox') : __('<span>One</span> Trackback', 'sandbox'), $ping_count) ?></h3> 55 56 <ol> 57 <?php foreach ( $comments as $comment ) : ?> 58 <?php if ( get_comment_type() != "comment" ) : ?> 59 60 <li id="comment-<?php comment_ID() ?>" class="<?php sandbox_comment_class() ?>"> 61 <div class="comment-author"><?php printf(__('By %1$s on %2$s at %3$s', 'sandbox'), 62 get_comment_author_link(), 63 get_comment_date(), 64 get_comment_time() ); 65 edit_comment_link(__('Edit', 'sandbox'), ' <span class="meta-sep">|</span> <span class="edit-link">', '</span>'); ?></div> 66 <?php if ($comment->comment_approved == '0') _e('\t\t\t\t\t<span class="unapproved">Your trackback is awaiting moderation.</span>\n', 'sandbox') ?> 67 <?php comment_text() ?> 68 </li> 69 <?php endif /* if ( get_comment_type() != "comment" ) */ ?> 70 <?php endforeach; ?> 71 72 </ol> 73 </div><!-- #trackbacks-list .comments --> 74 75 <?php endif /* if ( $ping_count ) */ ?> 76 <?php endif /* if ( $comments ) */ ?> 77 <?php if ( 'open' == $post->comment_status ) : ?> 78 <div id="respond"> 79 <h3><?php _e('Post a Comment', 'sandbox') ?></h3> 80 81 <?php if ( get_option('comment_registration') && !$user_ID ) : ?> 82 <p id="login-req"><?php printf(__('You must be <a href="%s" title="Log in">logged in</a> to post a comment.', 'sandbox'), 83 get_option('siteurl') . '/wp-login.php?redirect_to=' . get_permalink() ) ?></p> 84 85 <?php else : ?> 86 <div class="formcontainer"> 87 <form id="commentform" action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post"> 88 89 <?php if ( $user_ID ) : ?> 90 <p id="login"><?php printf(__('<span class="loggedin">Logged in as <a href="%1$s" title="Logged in as %2$s">%2$s</a>.</span> <span class="logout"><a href="%3$s" title="Log out of this account">Log out?</a></span>', 'sandbox'), 91 get_option('siteurl') . '/wp-admin/profile.php', 92 wp_specialchars($user_identity, true), 93 get_option('siteurl') . '/wp-login.php?action=logout&redirect_to=' . get_permalink() ) ?></p> 94 95 <?php else : ?> 96 97 <p id="comment-notes"><?php _e('Your email is <em>never</em> published nor shared.', 'sandbox') ?> <?php if ($req) _e('Required fields are marked <span class="required">*</span>', 'sandbox') ?></p> 98 99 <div class="form-label"><label for="author"><?php _e('Name', 'sandbox') ?></label> <?php if ($req) _e('<span class="required">*</span>', 'sandbox') ?></div> 100 <div class="form-input"><input id="author" name="author" type="text" value="<?php echo $comment_author ?>" size="30" maxlength="20" tabindex="3" /></div> 101 102 <div class="form-label"><label for="email"><?php _e('Email', 'sandbox') ?></label> <?php if ($req) _e('<span class="required">*</span>', 'sandbox') ?></div> 103 <div class="form-input"><input id="email" name="email" type="text" value="<?php echo $comment_author_email ?>" size="30" maxlength="50" tabindex="4" /></div> 104 105 <div class="form-label"><label for="url"><?php _e('Website', 'sandbox') ?></label></div> 106 <div class="form-input"><input id="url" name="url" type="text" value="<?php echo $comment_author_url ?>" size="30" maxlength="50" tabindex="5" /></div> 107 108 <?php endif /* if ( $user_ID ) */ ?> 109 110 <div class="form-label"><label for="comment"><?php _e('Comment', 'sandbox') ?></label></div> 111 <div class="form-textarea"><textarea id="comment" name="comment" cols="45" rows="8" tabindex="6"></textarea></div> 112 113 <div class="form-submit"><input id="submit" name="submit" type="submit" value="<?php _e('Post Comment', 'sandbox') ?>" tabindex="7" /><input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /></div> 114 115 <?php do_action('comment_form', $post->ID); ?> 116 117 </form><!-- #commentform --> 118 </div><!-- .formcontainer --> 119 <?php endif /* if ( get_option('comment_registration') && !$user_ID ) */ ?> 120 121 </div><!-- #respond --> 122 <?php endif /* if ( 'open' == $post->comment_status ) */ ?> 123 124 </div><!-- #comments --> -
wp-content/themes/sandbox/footer.php
1 2 <div id="footer"> 3 <span id="generator-link"><a href="http://wordpress.org/" title="<?php _e('WordPress', 'sandbox'); ?>" rel="generator"><?php _e('WordPress', 'sandbox'); ?></a></span> 4 <span class="meta-sep">|</span> 5 <span id="theme-link"><a href="http://www.plaintxt.org/themes/sandbox/" title="<?php _e('Sandbox for WordPress', 'sandbox'); ?>" rel="designer"><?php _e('Sandbox', 'sandbox'); ?></a></span> 6 </div><!-- #footer --> 7 8 </div><!-- #wrapper .hfeed --> 9 10 <?php wp_footer() ?> 11 12 </body> 13 </html> 14 No newline at end of file -
wp-content/themes/sandbox/functions.php
1 <?php 2 // Produces a list of pages in the header without whitespace -- er, I mean negative space. 3 function sandbox_globalnav() { 4 echo '<div id="menu"><ul>'; 5 $menu = wp_list_pages('title_li=&sort_column=menu_order&echo=0'); // Params for the page list in header.php 6 echo str_replace(array("\r", "\n", "\t"), '', $menu); 7 echo "</ul></div>\n"; 8 } 9 10 // Generates semantic classes for BODY element 11 function sandbox_body_class( $print = true ) { 12 global $wp_query, $current_user; 13 14 // It's surely a WordPress blog, right? 15 $c = array('wordpress'); 16 17 // Applies the time- and date-based classes (below) to BODY element 18 sandbox_date_classes(time(), $c); 19 20 // Generic semantic classes for what type of content is displayed 21 is_home() ? $c[] = 'home' : null; 22 is_archive() ? $c[] = 'archive' : null; 23 is_date() ? $c[] = 'date' : null; 24 is_search() ? $c[] = 'search' : null; 25 is_paged() ? $c[] = 'paged' : null; 26 is_attachment() ? $c[] = 'attachment' : null; 27 is_404() ? $c[] = 'four04' : null; // CSS does not allow a digit as first character 28 29 // Special classes for BODY element when a single post 30 if ( is_single() ) { 31 $postID = $wp_query->post->ID; 32 the_post(); 33 34 // Adds 'single' class and class with the post ID 35 $c[] = 'single postid-' . $postID; 36 37 // Adds classes for the month, day, and hour when the post was published 38 if ( isset($wp_query->post->post_date) ) 39 sandbox_date_classes(mysql2date('U', $wp_query->post->post_date), $c, 's-'); 40 41 // Adds category classes for each category on single posts 42 if ( $cats = get_the_category() ) 43 foreach ( $cats as $cat ) 44 $c[] = 's-category-' . $cat->slug; 45 46 // Adds tag classes for each tags on single posts 47 if ( $tags = get_the_tags() ) 48 foreach ( $tags as $tag ) 49 $c[] = 's-tag-' . $tag->slug; 50 51 // Adds MIME-specific classes for attachments 52 if ( is_attachment() ) { 53 $the_mime = get_post_mime_type(); 54 $boring_stuff = array("application/", "image/", "text/", "audio/", "video/", "music/"); 55 $c[] = 'attachment-' . str_replace($boring_stuff, "", "$the_mime"); 56 } 57 58 // Adds author class for the post author 59 $c[] = 's-author-' . sanitize_title_with_dashes(strtolower(get_the_author('login'))); 60 rewind_posts(); 61 } 62 63 // Author name classes for BODY on author archives 64 else if ( is_author() ) { 65 $author = $wp_query->get_queried_object(); 66 $c[] = 'author'; 67 $c[] = 'author-' . $author->user_nicename; 68 } 69 70 // Category name classes for BODY on category archvies 71 else if ( is_category() ) { 72 $cat = $wp_query->get_queried_object(); 73 $c[] = 'category'; 74 $c[] = 'category-' . $cat->slug; 75 } 76 77 // Tag name classes for BODY on tag archives 78 else if ( is_tag() ) { 79 $tags = $wp_query->get_queried_object(); 80 $c[] = 'tag'; 81 $c[] = 'tag-' . $tags->slug; // Does not work; however I try to return the tag I get a false. Grrr. 82 } 83 84 // Page author for BODY on 'pages' 85 else if ( is_page() ) { 86 $pageID = $wp_query->post->ID; 87 the_post(); 88 $c[] = 'page pageid-' . $pageID; 89 $c[] = 'page-author-' . sanitize_title_with_dashes(strtolower(get_the_author('login'))); 90 rewind_posts(); 91 } 92 93 // For when a visitor is logged in while browsing 94 if ( $current_user->ID ) 95 $c[] = 'loggedin'; 96 97 // Paged classes; for 'page X' classes of index, single, etc. 98 if ( ( ( $page = $wp_query->get("paged") ) || ( $page = $wp_query->get("page") ) ) && $page > 1 ) { 99 $c[] = 'paged-'.$page.''; 100 if ( is_single() ) { 101 $c[] = 'single-paged-'.$page.''; 102 } else if ( is_page() ) { 103 $c[] = 'page-paged-'.$page.''; 104 } else if ( is_category() ) { 105 $c[] = 'category-paged-'.$page.''; 106 } else if ( is_tag() ) { 107 $c[] = 'tag-paged-'.$page.''; 108 } else if ( is_date() ) { 109 $c[] = 'date-paged-'.$page.''; 110 } else if ( is_author() ) { 111 $c[] = 'author-paged-'.$page.''; 112 } else if ( is_search() ) { 113 $c[] = 'search-paged-'.$page.''; 114 } 115 } 116 117 // Separates classes with a single space, collates classes for BODY 118 $c = join(' ', apply_filters('body_class', $c)); 119 120 // And tada! 121 return $print ? print($c) : $c; 122 } 123 124 // Generates semantic classes for each post DIV element 125 function sandbox_post_class( $print = true ) { 126 global $post, $sandbox_post_alt; 127 128 // hentry for hAtom compliace, gets 'alt' for every other post DIV, describes the post type and p[n] 129 $c = array('hentry', "p$sandbox_post_alt", $post->post_type, $post->post_status); 130 131 // Author for the post queried 132 $c[] = 'author-' . sanitize_title_with_dashes(strtolower(get_the_author('login'))); 133 134 // Category for the post queried 135 foreach ( (array) get_the_category() as $cat ) 136 $c[] = 'category-' . $cat->slug; 137 138 // Tags for the post queried 139 foreach ( (array) get_the_tags() as $tag ) 140 $c[] = 'tag-' . $tag->slug; 141 142 // For password-protected posts 143 if ( $post->post_password ) 144 $c[] = 'protected'; 145 146 // Applies the time- and date-based classes (below) to post DIV 147 sandbox_date_classes(mysql2date('U', $post->post_date), $c); 148 149 // If it's the other to the every, then add 'alt' class 150 if ( ++$sandbox_post_alt % 2 ) 151 $c[] = 'alt'; 152 153 // Separates classes with a single space, collates classes for post DIV 154 $c = join(' ', apply_filters('post_class', $c)); 155 156 // And tada! 157 return $print ? print($c) : $c; 158 } 159 160 // Define the num val for 'alt' classes (in post DIV and comment LI) 161 $sandbox_post_alt = 1; 162 163 // Generates semantic classes for each comment LI element 164 function sandbox_comment_class( $print = true ) { 165 global $comment, $post, $sandbox_comment_alt; 166 167 // Collects the comment type (comment, trackback), 168 $c = array($comment->comment_type); 169 170 // Counts trackbacks (t[n]) or comments (c[n]) 171 if ($comment->comment_type == 'trackback') { 172 $c[] = "t$sandbox_comment_alt"; 173 } else { 174 $c[] = "c$sandbox_comment_alt"; 175 } 176 177 // If the comment author has an id (registered), then print the log in name 178 if ( $comment->user_id > 0 ) { 179 $user = get_userdata($comment->user_id); 180 181 // For all registered users, 'byuser'; to specificy the registered user, 'commentauthor+[log in name]' 182 $c[] = "byuser comment-author-" . sanitize_title_with_dashes(strtolower($user->user_login)); 183 // For comment authors who are the author of the post 184 if ( $comment->user_id === $post->post_author ) 185 $c[] = 'bypostauthor'; 186 } 187 188 // If it's the other to the every, then add 'alt' class; collects time- and date-based classes 189 sandbox_date_classes(mysql2date('U', $comment->comment_date), $c, 'c-'); 190 if ( ++$sandbox_comment_alt % 2 ) 191 $c[] = 'alt'; 192 193 // Separates classes with a single space, collates classes for comment LI 194 $c = join(' ', apply_filters('comment_class', $c)); 195 196 // Tada again! 197 return $print ? print($c) : $c; 198 } 199 200 // Generates time- and date-based classes for BODY, post DIVs, and comment LIs; relative to GMT (UTC) 201 function sandbox_date_classes($t, &$c, $p = '') { 202 $t = $t + (get_settings('gmt_offset') * 3600); 203 $c[] = $p . 'y' . gmdate('Y', $t); // Year 204 $c[] = $p . 'm' . gmdate('m', $t); // Month 205 $c[] = $p . 'd' . gmdate('d', $t); // Day 206 $c[] = $p . 'h' . gmdate('H', $t); // Hour 207 } 208 209 // For category lists on category archives: Returns other categories except the current one (redundant) 210 function sandbox_cats_meow($glue) { 211 $current_cat = single_cat_title('', false); 212 $separator = "\n"; 213 $cats = explode($separator, get_the_category_list($separator)); 214 215 foreach ( $cats as $i => $str ) { 216 if ( strstr($str, ">$current_cat<") ) { 217 unset($cats[$i]); 218 break; 219 } 220 } 221 222 if ( empty($cats) ) 223 return false; 224 225 return trim(join($glue, $cats)); 226 } 227 228 // For tag lists on tag archives: Returns other tags except the current one (redundant) 229 function sandbox_tag_ur_it($glue) { 230 $current_tag = single_tag_title('', '', false); 231 $separator = "\n"; 232 $tags = explode($separator, get_the_tag_list("", "$separator", "")); 233 234 foreach ( $tags as $i => $str ) { 235 if ( strstr($str, ">$current_tag<") ) { 236 unset($tags[$i]); 237 break; 238 } 239 } 240 241 if ( empty($tags) ) 242 return false; 243 244 return trim(join($glue, $tags)); 245 } 246 247 248 // Widget: Search; to match the Sandbox style and replace Widget plugin default 249 function widget_sandbox_search($args) { 250 extract($args); 251 if ( empty($title) ) 252 $title = __('Search', 'sandbox'); 253 ?> 254 <?php echo $before_widget ?> 255 <?php echo $before_title ?><label for="s"><?php echo $title ?></label><?php echo $after_title ?> 256 <form id="searchform" method="get" action="<?php bloginfo('home') ?>"> 257 <div> 258 <input id="s" name="s" type="text" value="<?php echo wp_specialchars(stripslashes($_GET['s']), true) ?>" size="10" tabindex="1" /> 259 <input id="searchsubmit" name="searchsubmit" type="submit" value="<?php _e('Find', 'sandbox') ?>" tabindex="2" /> 260 </div> 261 </form> 262 <?php echo $after_widget ?> 263 264 <?php 265 } 266 267 // Widget: Meta; to match the Sandbox style and replace Widget plugin default 268 function widget_sandbox_meta($args) { 269 extract($args); 270 if ( empty($title) ) 271 $title = __('Meta', 'sandbox'); 272 ?> 273 <?php echo $before_widget; ?> 274 <?php echo $before_title . $title . $after_title; ?> 275 <ul> 276 <?php wp_register() ?> 277 <li><?php wp_loginout() ?></li> 278 <?php wp_meta() ?> 279 </ul> 280 <?php echo $after_widget; ?> 281 <?php 282 } 283 284 // Widget: RSS links; to match the Sandbox style 285 function widget_sandbox_rsslinks($args) { 286 extract($args); 287 $options = get_option('widget_sandbox_rsslinks'); 288 $title = empty($options['title']) ? __('RSS Links', 'sandbox') : $options['title']; 289 ?> 290 <?php echo $before_widget; ?> 291 <?php echo $before_title . $title . $after_title; ?> 292 <ul> 293 <li><a href="<?php bloginfo('rss2_url') ?>" title="<?php echo wp_specialchars(get_bloginfo('name'), 1) ?> <?php _e('Posts RSS feed', 'sandbox'); ?>" rel="alternate" type="application/rss+xml"><?php _e('All posts', 'sandbox') ?></a></li> 294 <li><a href="<?php bloginfo('comments_rss2_url') ?>" title="<?php echo wp_specialchars(bloginfo('name'), 1) ?> <?php _e('Comments RSS feed', 'sandbox'); ?>" rel="alternate" type="application/rss+xml"><?php _e('All comments', 'sandbox') ?></a></li> 295 </ul> 296 <?php echo $after_widget; ?> 297 <?php 298 } 299 300 // Widget: RSS links; element controls for customizing text within Widget plugin 301 function widget_sandbox_rsslinks_control() { 302 $options = $newoptions = get_option('widget_sandbox_rsslinks'); 303 if ( $_POST["rsslinks-submit"] ) { 304 $newoptions['title'] = strip_tags(stripslashes($_POST["rsslinks-title"])); 305 } 306 if ( $options != $newoptions ) { 307 $options = $newoptions; 308 update_option('widget_sandbox_rsslinks', $options); 309 } 310 $title = htmlspecialchars($options['title'], ENT_QUOTES); 311 ?> 312 <p><label for="rsslinks-title"><?php _e('Title:'); ?> <input style="width: 250px;" id="rsslinks-title" name="rsslinks-title" type="text" value="<?php echo $title; ?>" /></label></p> 313 <input type="hidden" id="rsslinks-submit" name="rsslinks-submit" value="1" /> 314 <?php 315 } 316 317 // Widgets plugin: intializes the plugin after the widgets above have passed snuff 318 function sandbox_widgets_init() { 319 if ( !function_exists('register_sidebars') ) 320 return; 321 322 // Uses H3-level headings with all widgets to match Sandbox style 323 $p = array( 324 'before_title' => "<h3 class='widgettitle'>", 325 'after_title' => "</h3>\n", 326 ); 327 328 // Table for how many? Two? This way, please. 329 register_sidebars(2, $p); 330 331 // Finished intializing Widgets plugin, now let's load the Sandbox default widgets 332 register_sidebar_widget(__('Search', 'sandbox'), 'widget_sandbox_search', null, 'search'); 333 unregister_widget_control('search'); 334 register_sidebar_widget(__('Meta', 'sandbox'), 'widget_sandbox_meta', null, 'meta'); 335 unregister_widget_control('meta'); 336 register_sidebar_widget(array(__('RSS Links', 'sandbox'), 'widgets'), 'widget_sandbox_rsslinks'); 337 register_widget_control(array(__('RSS Links', 'sandbox'), 'widgets'), 'widget_sandbox_rsslinks_control', 300, 90); 338 } 339 340 // Translate, if applicable 341 load_theme_textdomain('sandbox'); 342 343 // Runs our code at the end to check that everything needed has loaded 344 add_action('init', 'sandbox_widgets_init'); 345 346 // Adds filters so that things run smoothly 347 add_filter('archive_meta', 'wptexturize'); 348 add_filter('archive_meta', 'convert_smilies'); 349 add_filter('archive_meta', 'convert_chars'); 350 add_filter('archive_meta', 'wpautop'); 351 352 // Remember: the Sandbox is for play. 353 ?> 354 No newline at end of file -
wp-content/themes/sandbox/header.php
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes() ?>> 3 <head profile="http://gmpg.org/xfn/11"> 4 <title><?php bloginfo('name'); if ( is_404() ) : _e(' » ', 'sandbox'); _e('Not Found', 'sandbox'); elseif ( is_home() ) : _e(' » ', 'sandbox'); bloginfo('description'); else : wp_title(); endif; ?></title> 5 <meta http-equiv="content-type" content="<?php bloginfo('html_type') ?>; charset=<?php bloginfo('charset') ?>" /> 6 <meta name="description" content="<?php bloginfo('description') ?>" /> 7 <meta name="generator" content="WordPress <?php bloginfo('version') ?>" /><!-- Please leave for stats --> 8 <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url'); ?>" /> 9 <link rel="alternate" type="application/rss+xml" href="<?php bloginfo('rss2_url') ?>" title="<?php echo wp_specialchars(get_bloginfo('name'), 1) ?> <?php _e('Posts RSS feed', 'sandbox'); ?>" /> 10 <link rel="alternate" type="application/rss+xml" href="<?php bloginfo('comments_rss2_url') ?>" title="<?php echo wp_specialchars(get_bloginfo('name'), 1) ?> <?php _e('Comments RSS feed', 'sandbox'); ?>" /> 11 <link rel="pingback" href="<?php bloginfo('pingback_url') ?>" /> 12 <?php wp_head() ?> 13 14 </head> 15 16 <body class="<?php sandbox_body_class() ?>"> 17 18 <div id="wrapper" class="hfeed"> 19 20 <div id="header"> 21 <h1 id="blog-title"><a href="<?php echo get_settings('home') ?>/" title="<?php bloginfo('name') ?>" rel="home"><?php bloginfo('name') ?></a></h1> 22 <div id="blog-description"><?php bloginfo('description') ?></div> 23 </div><!-- #header --> 24 25 <div id="access"> 26 <div class="skip-link"><a href="#content" title="<?php _e('Skip navigation to the content', 'sandbox'); ?>"><?php _e('Skip to content', 'sandbox'); ?></a></div> 27 <?php sandbox_globalnav() ?> 28 </div><!-- #access --> -
wp-content/themes/sandbox/index.php
1 <?php get_header() ?> 2 3 <div id="container"> 4 <div id="content"> 5 6 <div id="nav-above" class="navigation"> 7 <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'sandbox')) ?></div> 8 <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'sandbox')) ?></div> 9 </div> 10 11 <?php while ( have_posts() ) : the_post() ?> 12 <div id="post-<?php the_ID() ?>" class="<?php sandbox_post_class() ?>"> 13 <h2 class="entry-title"><a href="<?php the_permalink() ?>" title="<?php printf(__('Permalink to %s', 'sandbox'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark"><?php the_title() ?></a></h2> 14 <div class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO'); ?>"><?php unset($previousday); printf(__('%1$s – %2$s', 'sandbox'), the_date('', '', '', false), get_the_time()) ?></abbr></div> 15 <div class="entry-content"> 16 <?php the_content(''.__('Read More <span class="meta-nav">»</span>', 'sandbox').''); ?> 17 18 <?php link_pages("\t\t\t\t\t<div class='page-link'>".__('Pages: ', 'sandbox'), "</div>\n", 'number'); ?> 19 </div> 20 <div class="entry-meta"> 21 <span class="author vcard"><?php printf(__('By %s', 'sandbox'), '<a class="url fn n" href="'.get_author_link(false, $authordata->ID, $authordata->user_nicename).'" title="' . sprintf(__('View all posts by %s', 'sandbox'), $authordata->display_name) . '">'.get_the_author().'</a>') ?></span> 22 <span class="meta-sep">|</span> 23 <span class="cat-links"><?php printf(__('Posted in %s', 'sandbox'), get_the_category_list(', ')) ?></span> 24 <span class="meta-sep">|</span> 25 <?php the_tags(__('<span class="tag-links">Tagged ', 'sandbox'), ", ", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n") ?> 26 <?php edit_post_link(__('Edit', 'sandbox'), "\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n"); ?> 27 <span class="comments-link"><?php comments_popup_link(__('Comments (0)', 'sandbox'), __('Comments (1)', 'sandbox'), __('Comments (%)', 'sandbox')) ?></span> 28 </div> 29 </div><!-- .post --> 30 31 <?php comments_template() ?> 32 <?php endwhile ?> 33 34 <div id="nav-below" class="navigation"> 35 <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'sandbox')) ?></div> 36 <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'sandbox')) ?></div> 37 </div> 38 39 </div><!-- #content --> 40 </div><!-- #container --> 41 42 <?php get_sidebar() ?> 43 <?php get_footer() ?> 44 No newline at end of file -
wp-content/themes/sandbox/links.php
1 <?php 2 /* 3 Template Name: Links Page 4 */ 5 ?> 6 <?php get_header() ?> 7 8 <div id="container"> 9 <div id="content"> 10 11 <?php the_post() ?> 12 <div id="post-<?php the_ID(); ?>" class="<?php sandbox_post_class() ?>"> 13 <h2 class="entry-title"><?php the_title() ?></h2> 14 <div class="entry-content"> 15 <?php the_content() ?> 16 17 <ul id="links-page" class="xoxo"> 18 <?php wp_list_bookmarks('title_before=<h3>&title_after=</h3>') ?> 19 </ul> 20 <?php edit_post_link(__('Edit', 'sandbox'),'<span class="edit-link">','</span>') ?> 21 22 </div> 23 </div><!-- .post --> 24 25 <?php if ( get_post_custom_values('comments') ) comments_template() // Add a key/value of "comments" to enable comments on pages! ?> 26 27 </div><!-- #content --> 28 </div><!-- #container --> 29 30 <?php get_sidebar() ?> 31 <?php get_footer() ?> 32 No newline at end of file -
wp-content/themes/sandbox/page.php
1 <?php get_header() ?> 2 3 <div id="container"> 4 <div id="content"> 5 6 <?php the_post() ?> 7 <div id="post-<?php the_ID(); ?>" class="<?php sandbox_post_class() ?>"> 8 <h2 class="entry-title"><?php the_title(); ?></h2> 9 <div class="entry-content"> 10 <?php the_content() ?> 11 12 <?php link_pages("\t\t\t\t\t<div class='page-link'>".__('Pages: ', 'sandbox'), "</div>\n", 'number'); ?> 13 14 <?php edit_post_link(__('Edit', 'sandbox'),'<span class="edit-link">','</span>') ?> 15 16 </div> 17 </div><!-- .post --> 18 19 <?php if ( get_post_custom_values('comments') ) comments_template() // Add a key+value of "comments" to enable comments on this page ?> 20 21 </div><!-- #content --> 22 </div><!-- #container --> 23 24 <?php get_sidebar() ?> 25 <?php get_footer() ?> 26 No newline at end of file -
wp-content/themes/sandbox/readme.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" dir="ltr"> 3 <head profile="http://gmpg.org/xfn/11"> 4 <title>The Sandbox · An explanation</title> 5 <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> 6 <meta http-equiv="content-language" content="en-us" /> 7 <meta name="description" content="Sandbox: a highly semantic theme with powerful, dynamic class selectors" /> 8 <meta name="keywords" content="sandbox,xhtml,hatom,hcard,microformats,semantics,css,wordpress" /> 9 <style type="text/css" media="all"> 10 /*<![CDATA[*/ 11 body{background:#fcfcfc;color:#444;font:normal 70%/150% verdana,geneva,sans-serif;margin:0;padding:0;} 12 body blockquote{border-left:5px solid #f6f6f6;padding-left:0.5em;} 13 body code,body pre{font:1em/150% consolas,"courier new",courier,monospace;} 14 body div#readme{background:#fff;border-left:3px solid #f9f9f9;border-right:3px solid #f9f9f9;color:#444;margin:0 auto;padding:1em 2em;width:50em;} 15 body div#readme div#footer{margin:3em auto 1em;text-align:center;} 16 body div#readme div#footer p{background:#ffd;color:#666;display:inline;padding:0.2em 0.5em;} 17 body div#readme div#header{margin:0 auto;text-align:center;} 18 body div#readme div#header div.readme-version{font-size:0.9em;letter-spacing:0.1em;margin:0 0 0.5em;text-transform:uppercase;} 19 body h1{font-size:3.2em;} 20 body h1,body h2,body h3{font-family:garamond,georgia,times,serif;font-weight:400;} 21 body h2{font-size:2em;margin-top:3em;} 22 body h3{font-size:1.6em;margin-top:2em;} 23 body ol li ol li,body ol li#features ol li ol li{list-style:decimal;} 24 body ol li#functions h3{font-size:1.5em;} 25 body ol li#functions ol{list-style:lower-alpha;margin:0 0 0 2em;padding:0;} 26 body ol li#license blockquote a{color:#222;text-decoration:none;} 27 body ol li#license blockquote strong{font-size:0.9em;font-weight:400;text-transform:uppercase;} 28 body ol li,body ol#menu li ol li{list-style:upper-roman;} 29 body ol ul li{list-style:square;} 30 body ol#menu li{list-style:none;} 31 body ol#menu li ol li ol li,body ol li#functions ol li,body ol li#features ol li{list-style:lower-roman;} 32 body pre span,body span.bold{font-weight:700;} 33 body span.vcard span.family-name,body span.vcard span.additional-name{display:none;} 34 table{border-collapse:separate;border-color:#aaa;border-spacing:0;border-style:solid;border-width:1px;padding:0 0.5em;} 35 table tbody td{border-collapse:separate;border-color:#aaa;border-style:solid;border-width:0.5px 0;padding:0.2em 0.5em;} 36 table tbody th{border-bottom:1px solid #aaa;font-size:0.8em;text-align:left;text-transform:uppercase;} 37 table tbody tr.alt{background:#f5f5f5;} 38 table tfoot th{font-size:0.8em;padding-top:1em;text-align:left;text-transform:uppercase;} 39 table thead th{padding:0.5em;} 40 /*]]>*/ 41 </style> 42 </head> 43 <body> 44 <div id="readme"> 45 <div id="header"> 46 <h1 id="title">The Sandbox</h1> 47 <div class="readme-version">Version 1.0</div> 48 <div class="readme-subtitle">A theme rich and powerful with dynamic semantic class selectors</div> 49 </div><!-- #header --> 50 <ol id="menu" class="xoxo"> 51 <li> 52 <h2>Table of contents</h2> 53 <ol> 54 <li><a href="#introduction" title="Skip to Introduction">Introduction</a></li> 55 <li><a href="#installing" title="Skip to Installing">Installing</a></li> 56 <li><a href="#started" title="Skip to Getting started">Getting started</a></li> 57 <li><a href="#functions" title="Skip to Class functions">Class functions</a> 58 <ol> 59 <li><a href="#body-class" title="Skip to Class functions: sandbox_body_class()"><code>sandbox_body_class()</code></a></li> 60 <li><a href="#post-class" title="Skip to Class functions: sandbox_post_class()"><code>sandbox_post_class()</code></a></li> 61 <li><a href="#comment-class" title="Skip to Class functions: sandbox_comment_class()"><code>sandbox_comment_class()</code></a></li> 62 </ol> 63 </li> 64 <li><a href="#features" title="Skip to Other features">Other features</a> 65 <ol> 66 <li><a href="#comments" title="Skip to Other features: Comments on pages">Comments on pages</a></li> 67 <li><a href="#templates" title="Skip to Other features: Page templates">Page templates</a></li> 68 </ol> 69 </li> 70 <li><a href="#creating" title="Skip to Creating Sandbox templates">Creating a theme template</a></li> 71 <li><a href="#standards" title="Skip to Web standards">Web standards</a></li> 72 <li><a href="#microformats" title="Skip to Microformats">Microformats</a></li> 73 <li><a href="#credits" title="Skip to Credits and thanks">Credits and thanks</a></li> 74 <li><a href="#license" title="Skip to License">License</a></li> 75 </ol> 76 </li> 77 </ol><!-- #menu .xoxo --> 78 <ol id="content" class="xoxo"> 79 <li id="introduction"> 80 <h2>Introduction</h2> 81 <p>The Sandbox is a lot of things:</p> 82 <ul> 83 <li>Beautiful on the inside</li> 84 <li>For WordPress 2.3.x</li> 85 <li>Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr> 1.0 Transitional</li> 86 <li>Widgets friendly</li> 87 <li>The basis for your new, <abbr title="GNU Public Licence">GPL</abbr>-licensed theme</li> 88 </ul> 89 <p>More importantly, the Sandbox <em>can be</em> a lot of things.</p> 90 <p>What began as <span class="vcard"><a class="url fn n" href="http://www.plaintxt.org/" title="Scott, plaintxt.org" rel="me"><span class="given-name">Scott</span><span class="additional-name"> Allan</span><span class="family-name"> Wallick</span></a></span>'s leftovers has become an advanced, semantics-based theme. <span class="vcard"><a class="url fn n" href="http://andy.wordpress.com/" title="Andy, WordPress.com"><span class="given-name">Andy</span><span class="family-name"> Skelton</span></a></span> added his innovative semantic class-generating functions and Scott edited it to oblivion.</p> 91 <p>So what can you do with the Sandbox?</p> 92 <ul> 93 <li>You can just use it as-is and have a super-cool, truly minimalist theme.</li> 94 <li>You can totally customize it with <abbr title="Cascading Style Sheets">CSS</abbr> alone—no need to bother with other files.</li> 95 <li>You can use the functions, theme files, et al, as pleases you—even for your own theme.</li> 96 <li>You can use it as a good place to learn a few things about <abbr title="Cascading Style Sheets">CSS</abbr>, <abbr title="eXtensible HyperText Markup Language">XHTML</abbr>, and <abbr title="Hypertext Preprocessor">PHP</abbr>, perhaps.</li> 97 </ul> 98 <p>The real feature of the Sandbox is its markup. The use of class-generating functions in the <code>body</code>, post <code>div</code>, and comment/trackback <code>li</code> elements create an exceptionally extensible foundation. As Andy said, <q cite="http://andy.wordpress.com/2006/07/20/generated-semantic-classes-2/" title="Generated Semantic Classes 2">Given straightforward markup with plenty of selectors, there isn't much that can't be accomplished with <abbr title="Cascading Style Sheets">CSS</abbr> and a decent browser.</q></p> 99 <p>And the implementation of the hAtom and hCard microformats means we're looking forward (and pleasing the barons at <a href="http://www.technorait.com/" title="Technorati" rel="external">Technorati</a>). You might be able to improve on our markup, but, well, who wants to work that hard?</p> 100 </li><!-- #introduction --> 101 <li id="installing"> 102 <h2>Installing</h2> 103 <p>The Sandbox theme is installed just like any other WordPress theme. To install this theme:</p> 104 <ol> 105 <li>Download the <a href="http://www.plaintxt.org/themes/sandbox/" title="The Sandbox for WordPress" rel="me">Sandbox</a></li> 106 <li>Extract the <code>/sandbox/</code> folder from the archive</li> 107 <li>Upload this folder to the <code>/wp-contents/themes/</code> directory</li> 108 <li>Activate the theme in the <i>Dashboard › Presentation</i> menu</li> 109 <li>Enjoy</li> 110 </ol> 111 <p>You can read more detailed installation instructions on the <a href="http://codex.wordpress.org/Using_Themes#Adding_New_Themes" title="Adding new themes - WordPress Codex" rel="external">WordPress Codex</a>.</p> 112 <p>Developers interested in <a href="http://en.wikipedia.org/wiki/Subversion_(software)" title="Subersion - Wikipedia" rel="external">Subversion</a> access to the Sandbox repository may visit <a href="http://code.google.com/p/sandbox-theme" title="Sandbox theme on Google Code" rel="external">code.google.com/p/sandbox-theme</a>. Please ignore if unfamiliar with Subversion.</p> 113 </li><!-- #installing --> 114 <li id="started"> 115 <h2>Getting started</h2> 116 <p>To help beginners get started, example layouts in <code>/sandbox-layouts/</code> have been included. Instructions for using the included layouts and designs can be found in the folder.</p> 117 <p>The simplest way to get started with the Sandbox is to jump right in to <code>style.css</code>, using <abbr title="Cascading Style Sheets">CSS</abbr> to design the appearence of the Sandbox.</p> 118 <p>For help learning <abbr title="Cascading Style Sheets">CSS</abbr>, visit:</p> 119 <ul> 120 <li><a href="http://www.cssbasics.com/" title="CSS Basics.com" rel="external"><abbr title="Cascading Style Sheets">CSS</abbr> Basics.com</a></li> 121 <li><a href="http://www.html.net/tutorials/css/" title="HTML.net's CSS Tutorial" rel="external">HTML.net's <abbr title="Cascading Style Sheets">CSS</abbr> Tutorial</a></li> 122 <li><a href="http://www.htmldog.com/guides/cssbeginner/" title="HTML Dog's CSS Beginner Tutorial" rel="external">HTML Dog's <abbr title="Cascading Style Sheets">CSS</abbr> Beginner Tutorial</a></li> 123 <li><a href="http://www.stylegala.com/features/css-reference/" title="Stylegala's CSS Reference" rel="external">Stylegala's <abbr title="Cascading Style Sheets">CSS</abbr> Reference</a></li> 124 <li><a href="http://www.w3schools.com/css/default.asp" title="W3's CSS School" rel="external">W3's <abbr title="Cascading Style Sheets">CSS</abbr> School</a></li> 125 </ul> 126 <p>For Sandbox-related resources, including how-tos, Sandbox-based theme templates, and more, visit:</p> 127 <ul> 128 <li><a href="http://archgfx.net/" title="archGFX" rel="external">archGFX</a></li> 129 <li><a href="http://internetducttape.com/" title="InternetDuctTape" rel="external">Internet Duct Tape</a></li> 130 <li><a href="http://ntuat.wordpress.com/" title="Not (That) Ugly" rel="external">Sandbox Styles at <abbr title="Not (That) Ugly">NTU</abbr></a></li> 131 <li><a href="http://www.plaintxt.org/" title="plaintxt.org" rel="me">plaintxt.org</a></li> 132 <li><a href="http://www.sndbx.org/" title="Sandbox Designs Competition" rel="me">Sandbox Designs Competition</a></li> 133 <li><a href="http://www.sndbx.org/forums/" title="Sandbox Forums" rel="me">Sandbox Forums</a></li> 134 </ul> 135 <p>If you are interested in developing theme templates based on the Sandbox, see <a href="#creating" title="Creating theme templates">Creating theme templates</a> in this document.</p> 136 </li><!-- #started --> 137 <li id="functions"> 138 <h2>Class functions</h2> 139 <p>The three semantic class-generating functions used in the Sandbox are charted below, outlining what semantic classes are generated (“Class”), any related WordPress function (“WP Tag”), and the usage of these classes (“Usage”). For more on the WP Tag aspect, read <a href="http://codex.wordpress.org/Template_Tags" title="Template tags « WordPress Codex" rel="external">Template Tags</a> and <a href="http://codex.wordpress.org/Conditional_Tags" title="Conditional Tags « WordPress Codex" rel="external">Conditional Tags</a> on the WordPress Codex.</p> 140 <ol> 141 <li id="body-class"> 142 <h3><code>sandbox_body_class()</code></h3> 143 <p>The <code>sandbox_body_class()</code> function is definied in the <code>functions.php</code> file. It has no parameters. It adds semantic classes to the <code>body</code> element relative to the content of the page that is being displayed.</p> 144 <pre><body class="<span><?php sandbox_body_class() ?></span>"></pre> 145 <p>The chart below lists the semantic classes added to the <code>body</code> tag by this function.</p> 146 <table id="body-class-table" summary="Classes given to the body element sandbody_body_class()"> 147 <thead> 148 <tr> 149 <th colspan="3" scope="colgroup"><code>sandbox_body_class()</code></th> 150 </tr> 151 </thead> 152 <tfoot> 153 <tr> 154 <th colspan="3" scope="colgroup"><abbr title="Cascading Style Sheets">CSS</abbr> example</th> 155 </tr> 156 <tr> 157 <td colspan="3" scope="row" abbr="CSS example"><code>body.single div.sidebar { display: none; }</code></td> 158 </tr> 159 </tfoot> 160 <tbody> 161 <tr> 162 <th scope="col" abbr="class">Class</th> 163 <th scope="col" abbr="tag">WP Tag</th> 164 <th scope="col" abbr="use">Usage</th> 165 </tr> 166 <tr class="alt"> 167 <td scope="row">archive</td> 168 <td><code>is_archive()</code></td> 169 <td>When <em>any</em> archive page is displayed, i.e., applies to category-, date-, and author-based archive pages</td> 170 </tr> 171 <tr> 172 <td scope="row">attachment</td> 173 <td><code>is_attachment()</code></td> 174 <td>When the post subpage containing an attachment is displayed, as set with "Linked to Page" in the post editor</td> 175 </tr> 176 <tr class="alt"> 177 <td scope="row">attachment-[mime]</td> 178 <td><code>is_attachment()</code></td> 179 <td>For attachment posts (see above), where <i>[mime]</i> is the abbreviated <abbr title="Multipurpose Internet Mail Extensions">MIME</abbr> type, e.g., <code>attachment-jpeg</code></td> 180 </tr> 181 <tr> 182 <td scope="row">author</td> 183 <td><code>is_author()</code></td> 184 <td>When a author archive page is displayed</td> 185 </tr> 186 <tr class="alt"> 187 <td scope="row">author-[name]</td> 188 <td><code>is_author()</code></td> 189 <td>When a specific author archive page is displayed, where <i>[name]</i> is the author's login name, e.g., author-admin</td> 190 </tr> 191 <tr> 192 <td scope="row">author-paged-[n]</td> 193 <td><code>is_author()</code> & <code>is_paged()</code></td> 194 <td>Displays the "paged" number of author archive, where <i>[n]</i> is the paginated number</td> 195 </tr> 196 <tr class="alt"> 197 <td scope="row">category</td> 198 <td><code>is_category()</code></td> 199 <td>When a category archive page is displayed</td> 200 </tr> 201 <tr> 202 <td scope="row">category-[name]</td> 203 <td><code>is_category()</code></td> 204 <td>For a specific category, where <i>[name]</i> is the category slug, e.g., <code>category-useful-links</code></td> 205 </tr> 206 <tr class="alt"> 207 <td scope="row">category-paged-[n]</td> 208 <td><code>is_category()</code> & <code>is_paged()</code></td> 209 <td>Displays the "paged" number of category archive, where <i>[n]</i> is the paginated number</td> 210 </tr> 211 <tr> 212 <td scope="row">d01–31</td> 213 <td><code>gmdate('d')</code></td> 214 <td>The current day of when the page is displayed (Offset to GMT)</td> 215 </tr> 216 <tr class="alt"> 217 <td scope="row">date</td> 218 <td><code>is_date()</code></td> 219 <td>When a date archive page is displayed, e.g., by month, by year</td> 220 </tr> 221 <tr> 222 <td scope="row">date-paged-[n]</td> 223 <td><code>is_date()</code> & <code>is_paged()</code></td> 224 <td>Displays the "paged" number of date-based archive, where <i>[n]</i> is the paginated number</td> 225 </tr> 226 <tr class="alt"> 227 <td scope="row">h00–24</td> 228 <td><code>gmdate('h')</code></td> 229 <td>The current hour of when the page is displayed (Offset to GMT)</td> 230 </tr> 231 <tr> 232 <td scope="row">four04</td> 233 <td><code>is_404()</code></td> 234 <td>When a request results in zero posts, i.e., a 404 error page</td> 235 </tr> 236 <tr class="alt"> 237 <td scope="row">home</td> 238 <td><code>is_home()</code></td> 239 <td>When the home page is displayed</td> 240 </tr> 241 <tr> 242 <td scope="row">m00–12</td> 243 <td><code>gmdate('m')</code></td> 244 <td>The current month of when the page is displayed (Offset to GMT)</td> 245 </tr> 246 <tr class="alt"> 247 <td scope="row">loggedin</td> 248 <td>n/a</td> 249 <td>When the page is displayed by a logged-in user</td> 250 </tr> 251 <tr> 252 <td scope="row">page</td> 253 <td><code>is_page()</code></td> 254 <td>When a page is displayed</td> 255 </tr> 256 <tr class="alt"> 257 <td scope="row">page-author-[name]</td> 258 <td><code>is_page()</code></td> 259 <td>For a page by a specific author, where <i>[name]</i> is the user's login name, e.g., <code>page-author-admin</code></td> 260 </tr> 261 <tr> 262 <td scope="row">page-paged-[n]</td> 263 <td><code>is_page()</code> & <code>is_paged()</code></td> 264 <td>Displays the "paged" number of pages, where <i>[n]</i> is the paginated number</td> 265 </tr> 266 <tr class="alt"> 267 <td scope="row">paged</td> 268 <td><code>is_paged()</code></td> 269 <td>When whatever is displayed is "paged," e.g., page 2 of the index</td> 270 </tr> 271 <tr> 272 <td scope="row">paged-[n]</td> 273 <td><code>is_paged()</code></td> 274 <td>Displays the "paged" number, where <i>[n]</i> is the paginated number, e.g., <code>paged-3</code> for third page of index</td> 275 </tr> 276 <tr class="alt"> 277 <td scope="row">pageid-[n]</td> 278 <td><code>is_page()</code></td> 279 <td>Displays the page ID number of queried page, where <i>[n]</i> is the page ID, e.g., <code>pageid-20</code></td> 280 </tr> 281 <tr> 282 <td scope="row">postid-[n]</td> 283 <td><code>is_single()</code></td> 284 <td>Displays the post ID number of queried post, where <i>[n]</i> is the post ID, e.g., <code>postid-20</code></td> 285 </tr> 286 <tr class="alt"> 287 <td scope="row">search</td> 288 <td><code>is_search()</code></td> 289 <td>When the results of a search are displayed</td> 290 </tr> 291 <tr> 292 <td scope="row">single</td> 293 <td><code>is_single()</code></td> 294 <td>When a single post is displayed</td> 295 </tr> 296 <tr class="alt"> 297 <td scope="row">s-author-[name]</td> 298 <td><code>is_single()</code> & <code>is_author()</code></td> 299 <td>For a single post published by a specific author, where <i>[name]</i> is the user's login name, e.g., s-author-admin</td> 300 </tr> 301 <tr> 302 <td scope="row">s-category-[name]</td> 303 <td><code>is_single()</code> & <code>is_category()</code></td> 304 <td>For a single post published in a specific category, where <i>[name]</i> is the category slug, e.g., <code>s-category-news</code></td> 305 </tr> 306 <tr class="alt"> 307 <td scope="row">s-d01–31</td> 308 <td><code>gmdate('d')</code></td> 309 <td>For a single post published on a specific day (Offset to GMT)</td> 310 </tr> 311 <tr> 312 <td scope="row">s-h00–24</td> 313 <td><code>gmdate('h')</code></td> 314 <td>For a single post published at a specific hour (Offset to GMT)</td> 315 </tr> 316 <tr class="alt"> 317 <td scope="row">s-m00–12</td> 318 <td><code>gmdate('m')</code></td> 319 <td>For a single post published in a specific month (Offset to GMT)</td> 320 </tr> 321 <tr> 322 <td scope="row">s-tag-[name]</td> 323 <td><code>is_single()</code> & <code>is_tag()</code></td> 324 <td>For a single post published with a specific tag, where <i>[name]</i> is the tag slug, e.g., <code>s-category-foo-bar</code></td> 325 </tr> 326 <tr class="alt"> 327 <td scope="row">s-y2007</td> 328 <td><code>gmdate('Y')</code></td> 329 <td>For a single post published in a specific year (Offset to GMT)</td> 330 </tr> 331 <tr> 332 <td scope="row">tag</td> 333 <td><code>is_tag()</code></td> 334 <td>When a tag archive page is displayed</td> 335 </tr> 336 <tr class="alt"> 337 <td scope="row">tag-[name]</td> 338 <td><code>is_tag()</code></td> 339 <td>For a specific tag, where <i>[name]</i> is the tag slug, e.g., <code>tag-foo-bar</code></td> 340 </tr> 341 <tr> 342 <td scope="row">tag-paged-[n]</td> 343 <td><code>is_tag()</code> & <code>is_paged()</code></td> 344 <td>Displays the "paged" number of tag archive, where <i>[n]</i> is the paginated number</td> 345 </tr> 346 <tr class="alt"> 347 <td scope="row">wordpress</td> 348 <td>n/a</td> 349 <td>When anything is displayed; a class that is always applied</td> 350 </tr> 351 <tr> 352 <td scope="row">y2007</td> 353 <td><code>gmdate('Y')</code></td> 354 <td>The current year of when the page is display (Offset to GMT)</td> 355 </tr> 356 </tbody> 357 </table><!-- #body-class-table --> 358 </li><!-- #body-class --> 359 <li id="post-class"> 360 <h3><code>sandbox_post_class()</code></h3> 361 <p>The <code>sandbox_post_class()</code> function is definied in the <code>functions.php</code> file. It has no parameters. It adds semantic classes to each post <code>div</code> element, relative to the actual post it contains.</p> 362 <pre><div id="post-<?php the_ID(); ?>" class="<span><?php sandbox_post_class() ?></span>"></pre> 363 <p>The chart below lists the semantic classes added to each post <code>div</code> element by this function.</p> 364 <table id="post-class-table" summary="Classes given to individual posts by sandbody_post_class()"> 365 <thead> 366 <tr> 367 <th colspan="3" scope="colgroup"><code>sandbox_post_class()</code></th> 368 </tr> 369 </thead> 370 <tfoot> 371 <tr> 372 <th colspan="3" scope="colgroup"><abbr title="Cascading Style Sheets">CSS</abbr> example</th> 373 </tr> 374 <tr> 375 <td colspan="3" scope="row" abbr="CSS example"><code>div.category-news .entry-title { background: url('images/news.png'); }</code></td> 376 </tr> 377 </tfoot> 378 <tbody> 379 <tr> 380 <th scope="col" abbr="class">Class</th> 381 <th scope="col" abbr="tag">WP Tag</th> 382 <th scope="col" abbr="use">Usage</th> 383 </tr> 384 <tr class="alt"> 385 <td scope="row">alt</td> 386 <td>n/a</td> 387 <td>For odd-numbered posts, e.g., for the 1<sup>st</sup>, 3<sup>rd</sup>, 5<sup>th</sup> posts</td> 388 </tr> 389 <tr> 390 <td scope="row">author-[name]</td> 391 <td><code>is_author()</code></td> 392 <td>For any specific author, where <i>[name]</i> is the user's login name, e.g., <code>author-admin</code></td> 393 </tr> 394 <tr class="alt"> 395 <td scope="row">category-[name]</td> 396 <td><code>is_category()</code></td> 397 <td>For any specific category, where <i>[name]</i> is the category slug, e.g., <code>category-news</code></td> 398 </tr> 399 <tr> 400 <td scope="row">d01–31</td> 401 <td><code>gmdate('d')</code></td> 402 <td>For a post published on a specific day (Offset to GMT)</td> 403 </tr> 404 <tr class="alt"> 405 <td scope="row">draft</td> 406 <td>n/a</td> 407 <td>For a post saved as a draft, as contrasted with an published post</td> 408 </tr> 409 <tr> 410 <td scope="row">h00–24</td> 411 <td><code>gmdate('h')</code></td> 412 <td>For a post published at a specific hour (Offset to GMT)</td> 413 </tr> 414 <tr class="alt"> 415 <td scope="row">hentry</td> 416 <td>n/a</td> 417 <td>For the hAtom 0.1 specification, applied every post</td> 418 </tr> 419 <tr> 420 <td scope="row">m00–12</td> 421 <td><code>gmdate('m')</code></td> 422 <td>For a post published in a specific month (Offset to GMT)</td> 423 </tr> 424 <tr class="alt"> 425 <td scope="row">p[n]</td> 426 <td>n/a</td> 427 <td>For counting posts relative to the top of the page, where <i>[n]</i> is the number, e.g., <code>p1</code> for the first post, <code>p2</code> for the second, <code>p3</code> for the third</td> 428 </tr> 429 <tr> 430 <td scope="row">page</td> 431 <td>n/a</td> 432 <td>A general class, applied to every page</td> 433 </tr> 434 <tr class="alt"> 435 <td scope="row">post</td> 436 <td>n/a</td> 437 <td>A general class, applied to every post</td> 438 </tr> 439 <tr> 440 <td scope="row">private</td> 441 <td>n/a</td> 442 <td>For a post that has been saved as private</td> 443 </tr> 444 <tr class="alt"> 445 <td scope="row">protected</td> 446 <td>n/a</td> 447 <td>For a post protected by a password</td> 448 </tr> 449 <tr> 450 <td scope="row">publish</td> 451 <td>n/a</td> 452 <td>For any published post, as contrasted with an unpublished draft</td> 453 </tr> 454 <tr class="alt"> 455 <td scope="row">tag-[name]</td> 456 <td><code>is_tag()</code></td> 457 <td>For any specific tag, where <i>[name]</i> is the tag slug, e.g., <code>tag-foo-bar</code></td> 458 </tr> 459 <tr> 460 <td scope="row">y2007</td> 461 <td><code>gmdate('Y')</code></td> 462 <td>For a post published in a certain year (Offset to GMT)</td> 463 </tr> 464 </tbody> 465 </table><!-- #post-class-table --> 466 </li><!-- #post-class --> 467 <li id="comment-class"> 468 <h3><code>sandbox_comment_class()</code></h3> 469 <p>The <code>sandbox_comment_class()</code> function is definied in the <code>functions.php</code> file. It has no parameters. It adds semantic classes to the each comment <code>li</code> element (“comment” here meaning comments, trackbacks, and pingbacks).</p> 470 <pre><li id="comment-<?php comment_ID(); ?>" class="<span><?php sandbox_comment_class() ?></span>"></pre> 471 <p>The chart below lists the semantic classes added to each comment <code>li</code> element by this function.</p> 472 <table id="comment-class-table" summary="Classes given to individual comments by sandbody_comment_class()"> 473 <thead> 474 <tr> 475 <th colspan="3" scope="colgroup"><code>sandbox_comment_class()</code></th> 476 </tr> 477 </thead> 478 <tfoot> 479 <tr> 480 <th colspan="3" scope="colgroup"><abbr title="Cascading Style Sheets">CSS</abbr> example</th> 481 </tr> 482 <tr> 483 <td colspan="3" scope="row" abbr="CSS example"><code>div.comments li.bypostauthor { border: 1px solid red; }</code></td> 484 </tr> 485 </tfoot> 486 <tbody> 487 <tr> 488 <th scope="col" abbr="class">Class</th> 489 <th scope="col" abbr="tag">WP Tag</th> 490 <th scope="col" abbr="use">Usage</th> 491 </tr> 492 <tr class="alt"> 493 <td scope="row">alt</td> 494 <td>n/a</td> 495 <td>For odd-numbered comments, e.g., for the 1<sup>st</sup>, 3<sup>rd</sup>, 5<sup>th</sup> comments</td> 496 </tr> 497 <tr> 498 <td scope="row">bypostauthor</td> 499 <td>n/a</td> 500 <td>When the comment author is also the post author</td> 501 </tr> 502 <tr class="alt"> 503 <td scope="row">byuser</td> 504 <td>n/a</td> 505 <td>For comments by registered users</td> 506 </tr> 507 <tr> 508 <td scope="row">c-h00–24</td> 509 <td><code>gmdate('h')</code></td> 510 <td>For a comment posted at a specific hour (Offset to GMT)</td> 511 </tr> 512 <tr class="alt"> 513 <td scope="row">c[n]</td> 514 <td>n/a</td> 515 <td>For counting comments relative to the first, where <i>[n]</i> is the number, e.g., <code>c1</code> for the first comment, <code>c2</code> for the second, <code>c3</code> for the third</td> 516 </tr> 517 <tr> 518 <td scope="row">c-d01–31</td> 519 <td><code>gmdate('d')</code></td> 520 <td>For a comment posted on a specific date (Offset to GMT)</td> 521 </tr> 522 <tr class="alt"> 523 <td scope="row">c-m00–12</td> 524 <td><code>gmdate('m')</code></td> 525 <td>For a comment posted in a specific month (Offset to GMT)</td> 526 </tr> 527 <tr> 528 <td scope="row">c-y2007</td> 529 <td><code>gmdate('Y')</code></td> 530 <td>For a comment posted in a specific year (Offset to GMT)</td> 531 </tr> 532 <tr class="alt"> 533 <td scope="row">comment</td> 534 <td>n/a</td> 535 <td>A general class, applied to every comment</td> 536 </tr> 537 <tr> 538 <td scope="row">comment-author-[name]</td> 539 <td>n/a</td> 540 <td>For a comment by a specific registered user, where <i>[name]</i> is the user's login name, e.g., <code>comment-author-susan</code></td> 541 </tr> 542 <tr class="alt"> 543 <td scope="row">t[n]</td> 544 <td>n/a</td> 545 <td>For counting trackbacks relative to the first, where <i>[n]</i> is the number, e.g., <code>t1</code> for the first trackback, <code>t2</code> for the second, <code>t3</code> for the third</td> 546 </tr> 547 <tr> 548 <td scope="row">trackback</td> 549 <td>is_trackback()</td> 550 <td>When a comment is a trackback</td> 551 </tr> 552 </tbody> 553 </table><!-- #comment-class-table --> 554 </li><!-- #comment-class --> 555 </ol> 556 </li><!-- #functions --> 557 <li id="features"> 558 <h2>Other features</h2> 559 <p>In addition to the more advanced, code-related features of the Sandbox, there are at least two other features that make the Sandbox a highly viable choice as a base theme.</p> 560 <ol> 561 <li id="comments"> 562 <h3>Comments on pages</h3> 563 <p>Comments are not displayed on pages by default, but are displayed on posts, per the current convention. You can enable comments on a per page basis by adding a custom key/value with only the text <code>comments</code>.</p> 564 <p>To enable comments on a page:</p> 565 <ol> 566 <li>In the <i>Write › Page</i> menu, expand the <a href="http://codex.wordpress.org/Using_Custom_Fields" title="Custom Fields - WordPress Codex" rel="external">Custom Fields</a> box</li> 567 <li>In the <i>Custom Fields</i> box, add a new key with the exact text <code>comments</code></li> 568 <li>Add any text for a value (some text must be included for the key to save)</li> 569 <li>Click <i>Add Custom Field</i> to save the key/value</li> 570 <li>Comments should now be enabled on that page</li> 571 </ol> 572 <p>Enabling comments simply includes the <code>comments.php</code> file with the page. You can turn off comments on a page by deleting the <code>comments</code> key/value. This does not delete any exisiting comments, but simply disables <code>comments.php</code> from loading with the page.</p> 573 </li><!-- #comments --> 574 <li id="templates"> 575 <h3>Page templates</h3> 576 <p>There are two <a href="http://codex.wordpress.org/Pages#Page_Templates" title="Page templates - WordPress Codex" rel="external">page templates</a> included: Links Page (<code>links.php</code>) and Archives Page (<code>archives.php</code>). You can add a title, text, and enable comments (see above) with both of these page templates.</p> 577 <p>To use the page templates:</p> 578 <ol> 579 <li>In the <i>Write › Page</i> menu, expand the <i>Page Templates</i> box</li> 580 <li>From the drop-down, select the page template to use</li> 581 <li>Add a title and text (optional) for the page</li> 582 <li>Click <i>Create New Page / Save</i> to publish the page</li> 583 </ol> 584 <p>The Archive Page template displays archives by month and by category. The Links Page displays links by link category.</p> 585 </li><!-- #templates --> 586 </ol> 587 </li><!-- #features --> 588 <li id="creating"> 589 <h2>Creating a theme template</h2> 590 <p>If you are interested in creating a design for public release, consider creating a theme template based on the Sandbox. First read <a href="http://codex.wordpress.org/Designing_Themes_for_Public_Release" title="Designing Themes for Public Release - WordPress Codex" rel="external">Designing Themes for Public Release</a> on the WordPress Codex and seek support on the <a href="http://wordpress.org/support/" title="WordPress.org Support Forums" rel="external">WordPress.org Forums</a>.</p> 591 <p>A theme template is a WordPress theme that uses the <abbr title="Preprocessor Hypertext">PHP</abbr> files, e.g., <code>index.php</code>, <code>single.php</code>, in another theme folder but the <code>style.css</code> of the theme template.</p> 592 <p>For a collection of excellent theme templates designed for the Sandbox, visit the <a href="http://www.sndbx.org/" title="Sandbox Designs Competition" rel="me">Sandbox Designs Competition</a>. In 2007, there were 46 designs submitted in the competition. All are examples of theme templates based on the Sandbox.</p> 593 <p>Creating a theme template is essentially the same as creating a regular theme for WordPress, except you are not modifying any of the theme files and instead providing an alternate <code>style.css</code>.</p> 594 <pre class="css">/* 595 THEME NAME: My Design 596 THEME URI: http://www.sndbx.org/ 597 DESCRIPTION: New curtains for an old room 598 VERSION: 0.1 599 AUTHOR: Scott Allan Wallick 600 AUTHOR Uri: http://scottwallick.com/ 601 TEMPLATE: sandbox 602 */</pre> 603 <p>The line <code>TEMPLATE: sandbox</code> tells WordPress to use the theme files installed in the <code>/sandbox/</code> folder with the "My Design" <code>style.css</code> style sheet.</p> 604 <p>You can read more detailed information about developing <a href="http://codex.wordpress.org/Theme_Development#Theme_Style_Sheet" title="WordPress Theme Development - Theme Style Sheets" rel="external">WordPress Theme Style Sheets</a> on the WordPress Codex.</p> 605 </li><!-- #creating --> 606 <li id="standards"> 607 <h2>Web standards</h2> 608 <p>The Sandbox is compliant with both <abbr title="eXtensible HyperText Markup Language">XHTML</abbr> and <abbr title="Cascading Style Sheets">CSS</abbr> standards. What does this mean? An explanation of web standards from <a href="http://webstandards.org" title="Web Standards Project" rel="external">The Web Standards Project</a>:</p> 609 <blockquote cite="http://webstandards.org/learn/faq/" title="What are web standards and why should I use them?"> 610 <p>Complying with web standards can give your web pages greater visibility in web searches. The structural information present in compliant documents makes it easy for search engines to access and evaluate the information in those documents, and they get indexed more accurately.</p> 611 <p>Accessibility is an important idea behind many web standards. Not only does this mean allowing the web to be used by people with disabilities, but also allowing web pages to be understood by people using browsers other than the usual ones—including voice browsers that read web pages aloud to people with sight impairments, Braille browsers, hand-held browsers, teletext displays, and other unusual output devices.</p> 612 </blockquote> 613 <p>You can read more about developing with web standards at <a href="http://www.456bereastreet.com/lab/developing_with_web_standards/webstandards/" title="Developing with web standards" rel="external">456 Berea Street</a>.</p> 614 </li><!-- #standards--> 615 <li id="microformats"> 616 <h2>Microformats</h2> 617 <p><a href="http://microformats.org/" title="Microformats.org" rel="external">Microformats</a> are markup that express semantic information in your blog. People and machines can extract information from webpages marked up in a microformat much like feed readers extract information from Atom or <abbr title="Rich Site Summary">RSS</abbr> syndicated feeds. Essentially it's about making content more accessible.</p> 618 <p>Microformats that have been implemented in the Sandbox theme include (less <a href="http://gmpg.org/xfn/" title="XHTML Friends Network" rel="external"><abbr title="XHTML Friends Network">XFN</abbr></a>, which is built into WordPress):</p> 619 <ul> 620 <li><a href="http://microformats.org/wiki/hatom" title="hAtom - Microformats" rel="external">hAtom</a>: For all blog posts and pages</li> 621 <li><a href="http://microformats.org/wiki/hcard" title="hCard - Microformats" rel="external">hCard</a>: For all post and comment authors</li> 622 <li><a href="http://microformats.org/wiki/rel-home" title="rel-home - Microformats" rel="external">rel="home"</a>: For marking links pointing to the blog home page</li> 623 <li><a href="http://microformats.org/wiki/xoxo" title="XOXO - Microformats" rel="external">XOXO</a>: For menu, blogroll, archive, and sidebar lists</li> 624 </ul> 625 <p>Microformats help the Sandbox be an especially <abbr title="Plain old semantic HTML">POSH</abbr> WordPress theme. POSH stands for "plain old semantic <abbr title="HyperText Markup Language">HTML</abbr>." It is a term used to refer to best practices of semantic <abbr title="HyperText Markup Language">HTML</abbr> development. The Microformats Wiki <a href="http://microformats.org/wiki/posh" title="POSH - Microformats" rel="external"><abbr title="Plain old semantic HTML">POSH</abbr> article</a> has a working copy of these best practices:</p> 626 <ol> 627 <li>Validate your markup, meaning it should <em>be</em> valid, not just validated</li> 628 <li>No use of tables for presentational purposes—only for tabular data</li> 629 <li>Correct any "<span class="bold">B</span>ed and <span class="bold">BR</span>eakfast" markup, i.e., no presentational elements like <code>b</code>, and no <code><br /></code></li> 630 <li>Correct any "<span class="bold">A</span>norexic anchors," e.g., an <code>a</code> element with only a <code>name</code> attribute</li> 631 <li>Use well-formed, semantic class names (Sandbox does this for you)</li> 632 </ol> 633 <p>So the Sandbox can be highly <abbr title="Plain old semantic HTML">POSH</abbr>, but the semantic use of <abbr title="HyperText Markup Language">HTML</abbr> elements is completely up to you, the end user. To learn more about semantic <abbr title="HyperText Markup Language">HTML</abbr>, visit <a href="http://www.mezzoblue.com/downloads/markupguide/" title="mezzoblue § Markup Guide">Mezzoblue</a>.</p> 634 </li><!-- #microformats --> 635 <li id="credits"> 636 <h2>Credits and thanks</h2> 637 <p>The Sandbox is a collaboration between <span class="vcard"><a class="url fn n" href="http://andy.wordpress.com/" title="Andy, WordPress.com" rel="friend colleague external"><span class="given-name">Andy</span><span class="family-name"> Skelton</span></a></span> and <span class="vcard"><a class="url fn n" href="http://www.plaintxt.org/" title="Scott, plaintxt.org" rel="me"><span class="given-name">Scott</span><span class="additional-name"> Allan</span><span class="family-name"> Wallick</span></a></span>.</p> 638 <p>Thanks to all those who have provided their assistance, know-how, and generally sound advice on all things Sandbox. You are many. But a <em>special</em> thanks to the follow individuals:</p> 639 <ul> 640 <li class="vcard"><a class="fn n url" href="http://archgfx.net/" title="archGFX" rel="friend colleague external"><span class="given-name">Adam</span></a></li> 641 <li class="vcard"><a class="fn n url" href="http://ntuat.wordpress.com/" title="ntu sandbox styles" rel="friend external"><span class="given-name">Carolyn</span></a></li> 642 <li class="vcard"><a class="fn n url" href="http://internetducttape.com/" title="Internet Duct Tape" rel="friend external"><span class="given-name">Engtech</span></a></li> 643 <li class="vcard"><a class="fn n url" href="http://lorelle.wordpress.com/" title="Lorell on WordPress" rel="contact external"><span class="given-name">Lorelle</span></a></li> 644 </ul> 645 <p>Thanks are due to those who helped ensure the success of the <a href="http://www.sndbx.org/" title="Sandbox Designs Competition" rel="me">Sandbox Designs Competition</a>:</p> 646 <ul> 647 <li class="vcard"><a class="fn n url" href="http://www.css4design.com/blog/" title="CSS for Designr" rel="contact external"><span class="given-name">Bruno</span> <span class="family-name">Bichet</span></a></li> 648 <li class="vcard"><a class="fn n url" href="http://www.alistercameron.com/" title="Alister" rel="contact external"><span class="given-name">Alister</span> <span class="family-name">Cameron</span></a></li> 649 <li class="vcard"><a class="fn n url" href="http://www.websitestyle.com/" title="Nicole" rel="contact external"><span class="given-name">Nicole</span> <span class="family-name">Hernandez</span></a></li> 650 <li class="vcard"><a class="fn n url" href="http://alexking.org/" title="Alex" rel="contact external"><span class="given-name">Alex</span> <span class="family-name">King</span></a></li> 651 <li class="vcard"><a href="http://photomatt.net/" title="Matt" rel="contact external"><span class="given-name">Matt</span> <span class="family-name">Mullenweg</span></a></li> 652 <li class="vcard"><a class="fn n url" href="http://www.pressharbor.com/" title="PressHarbor" rel="contact external"><span class="org">PressHarbor</span></a></li> 653 <li class="vcard"><a class="fn n url" href="http://justagirlintheworld.com/" title="Lisa Sabin-Wilson" rel="contact external"><span class="given-name">Lisa</span> <span class="family-name">Sabin-Wilson</span></a></li> 654 <li class="vcard"><a class="fn n url" href="http://dowan.org/" title="Dowan.org" rel="contact external"><span class="given-name">Maja</span> <span class="family-name">Schmidt</span></a></li> 655 <li class="vcard"><a class="fn n url" href="http://theundersigned.net/" title="The undersigned" rel="contact external"><span class="given-name">Thomas</span> <span class="family-name">Silkjær</span></a></li> 656 <li class="vcard"><a class="fn n url" href="http://www.wpdesigner.com/" title="WP Designer" rel="contact external"><span class="nickname">Small Potato</span></a></li> 657 <li class="vcard"><a class="fn n url" href="http://paulstamatiou.com/" title="Paul Stamatiou" rel="contact external"><span class="given-name">Paul</span> <span class="family-name">Stamatiou</span></a></li> 658 <li class="vcard"><a class="fn n url" href="http://bryanveloso.com/" title="Bryan Veloso" rel="contact external"><span class="given-name">Bryan</span> <span class="family-name">Veloso</span></a></li> 659 <li class="vcard"><a class="fn n url" href="http://beccary.com/" title="Beccary" rel="contact external"><span class="given-name">Becca</span> <span class="family-name">Wei</span></a></li> 660 <li class="vcard"><a class="fn n url" href="http://www.elizzza.net/" title="eliZZZa.net" rel="contact external"><span class="given-name">Elisabeth</span> <span class="family-name">Wetsch</span></a></li> 661 <li class="vcard"><a class="fn n url" href="http://www.jonathanwold.com/" title="Jonathan Wold" rel="contact external"><span class="given-name">Jonathan</span> <span class="family-name">Wold</span></a></li> 662 <li class="vcard"><a class="fn n url" href="http://thedesigncanopy.com/" title="The Design Canopy" rel="contact external"><span class="given-name">David</span> <span class="family-name">Yeiser</span></a></li> 663 </ul> 664 </li><!-- #extra --> 665 <li id="license"> 666 <h2>License</h2> 667 <p>The Sandbox © 2006–2008 is licensed under the <a href="http://www.gnu.org/licenses/gpl.html" title="GNU General Public License" rel="license"><abbr title="GNU is Not Unix">GNU</abbr> General Public License</a>:</p> 668 <blockquote title="How to use the GPL or LPGL" cite="http://www.gnu.org/licenses/gpl-howto.html"> 669 <p>This program is free software; you can redistribute it and/or modify it under the terms of the <abbr title="GNU is Not Unix">GNU</abbr> General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.</p> 670 <p>This program is distributed in the hope that it will be useful, but <strong>without any warranty</strong>; without even the implied warranty of <strong>merchantability</strong> or <strong>fitness for a particular purpose</strong>. See the <abbr title="GNU is Not Unix">GNU</abbr> General Public License for more details.</p> 671 <p>You should have received a copy of the <abbr title="GNU is Not Unix">GNU</abbr> General Public License along with this program; if not, write to the <span class="vcard"><a class="url fn org" href="http://www.fsf.org/" rel="external">Free Software Foundation, Inc</a>, <span class="adr"><span class="street-address">51 Franklin Street, Fifth Floor</span>, <span class="locality">Boston</span>, <span class="region">MA</span> <span class="postal-code">02110-1301</span>, <span class="country-name">USA</span></span></span>.</p> 672 </blockquote> 673 </li><!-- #license --> 674 </ol><!-- #readme .xoxo --> 675 <div id="footer"> 676 <p>Last updated 25 August 2007</p> 677 </div><!-- #footer --> 678 </div><!-- #readme --> 679 </body> 680 </html> 681 No newline at end of file -
wp-content/themes/sandbox/sandbox-layouts/2c-l.css
1 /* 2 LAYOUT: Two-Column (Left) 3 DESCRIPTION: Two-column fluid layout with one sidebars left of content 4 */ 5 div#container { 6 float: right; 7 margin: 0 0 0 -200px; 8 width: 100%; 9 } 10 div#content { 11 margin: 0 0 0 200px; 12 } 13 div.sidebar { 14 float: left; 15 width: 180px; 16 overflow: hidden; 17 } 18 div#secondary { 19 clear: left; 20 } 21 div#footer { 22 clear: both; 23 width: 100%; 24 } 25 No newline at end of file -
wp-content/themes/sandbox/sandbox-layouts/3c-l.css
1 /* 2 LAYOUT: Three-Column (Left) 3 DESCRIPTION: Three-column fluid layout with two sidebars left of content 4 */ 5 div#container { 6 float: right; 7 margin: 0 0 0 -400px; 8 width: 100%; 9 } 10 div#content { 11 margin: 0 0 0 400px; 12 } 13 div.sidebar { 14 float: right; 15 overflow: hidden; 16 width: 180px; 17 } 18 div#footer { 19 clear: both; 20 width: 100% 21 } 22 No newline at end of file -
wp-content/themes/sandbox/sandbox-layouts/1c-b.css
1 /* 2 LAYOUT: One-Column 3 DESCRIPTION: One-column fluid layout with sidebars stacked in two columns below content 4 */ 5 div.sidebar { 6 float: left; 7 overflow: hidden; 8 padding: 10px 1.9%; 9 width: 46%; 10 } 11 div#primary { 12 clear: both; 13 } 14 div#footer { 15 clear: left; 16 width: 100%; 17 } 18 No newline at end of file -
wp-content/themes/sandbox/sandbox-layouts/layouts-readme.txt
1 --- Layout Style Sheets --- 2 This folder contains the original Sandbox layouts and examples of base layouts. 3 4 You can cut and paste these into your own style sheet, use them as references, or completely ignore them. 5 No newline at end of file -
wp-content/themes/sandbox/sandbox-layouts/2c-r.css
1 /* 2 LAYOUT: Two-Column (Right) 3 DESCRIPTION: Two-column fluid layout with one sidebars right of content 4 */ 5 div#container { 6 float: left; 7 margin: 0 -200px 0 0; 8 width: 100%; 9 } 10 div#content { 11 margin: 0 200px 0 0; 12 } 13 div.sidebar { 14 float: right; 15 overflow: hidden; 16 width: 180px; 17 } 18 div#secondary { 19 clear: right; 20 } 21 div#footer { 22 clear: both; 23 width: 100%; 24 } 25 No newline at end of file -
wp-content/themes/sandbox/sandbox-layouts/3c-b.css
1 /* 2 LAYOUT: Three-Column 3 DESCRIPTION: Three-column fluid layout with two sidebars on both sides of content 4 */ 5 div#container { 6 float: left; 7 width: 100%; 8 } 9 div#content { 10 margin: 0 200px; 11 } 12 div.sidebar { 13 float: left; 14 overflow: hidden; 15 width: 180px; 16 } 17 div#primary { 18 margin: 0 0 0 -100%; 19 } 20 * html div#primary { 21 left: 20px; 22 position: relative; 23 } 24 div#secondary { 25 margin: 0 0 0 -200px; 26 } 27 div#footer { 28 clear: left; 29 width: 100%; 30 } 31 No newline at end of file -
wp-content/themes/sandbox/sandbox-layouts/3c-r.css
1 /* 2 LAYOUT: Three-Column (Right) 3 DESCRIPTION: Three-column fluid layout with two sidebars right of content 4 */ 5 div#container { 6 float: left; 7 width: 100%; 8 } 9 div#content { 10 margin: 0 400px 0 0; 11 } 12 div.sidebar { 13 float: left; 14 overflow: hidden; 15 width: 180px; 16 } 17 div#primary { 18 margin: 0 0 0 -400px; 19 } 20 div#secondary { 21 margin: 0 0 0 -200px; 22 } 23 div#footer { 24 clear: left; 25 width: 100% 26 } 27 No newline at end of file -
wp-content/themes/sandbox/sandbox-layouts/1c-b.css
1 /* 2 LAYOUT: One-Column 3 DESCRIPTION: One-column fluid layout with sidebars stacked in two columns below content 4 */ 5 div.sidebar { 6 float: left; 7 overflow: hidden; 8 padding: 10px 1.9%; 9 width: 46%; 10 } 11 div#primary { 12 clear: both; 13 } 14 div#footer { 15 clear: left; 16 width: 100%; 17 } 18 No newline at end of file -
wp-content/themes/sandbox/sandbox-layouts/2c-l.css
1 /* 2 LAYOUT: Two-Column (Left) 3 DESCRIPTION: Two-column fluid layout with one sidebars left of content 4 */ 5 div#container { 6 float: right; 7 margin: 0 0 0 -200px; 8 width: 100%; 9 } 10 div#content { 11 margin: 0 0 0 200px; 12 } 13 div.sidebar { 14 float: left; 15 width: 180px; 16 overflow: hidden; 17 } 18 div#secondary { 19 clear: left; 20 } 21 div#footer { 22 clear: both; 23 width: 100%; 24 } 25 No newline at end of file -
wp-content/themes/sandbox/sandbox-layouts/2c-r.css
1 /* 2 LAYOUT: Two-Column (Right) 3 DESCRIPTION: Two-column fluid layout with one sidebars right of content 4 */ 5 div#container { 6 float: left; 7 margin: 0 -200px 0 0; 8 width: 100%; 9 } 10 div#content { 11 margin: 0 200px 0 0; 12 } 13 div.sidebar { 14 float: right; 15 overflow: hidden; 16 width: 180px; 17 } 18 div#secondary { 19 clear: right; 20 } 21 div#footer { 22 clear: both; 23 width: 100%; 24 } 25 No newline at end of file -
wp-content/themes/sandbox/sandbox-layouts/3c-b.css
1 /* 2 LAYOUT: Three-Column 3 DESCRIPTION: Three-column fluid layout with two sidebars on both sides of content 4 */ 5 div#container { 6 float: left; 7 width: 100%; 8 } 9 div#content { 10 margin: 0 200px; 11 } 12 div.sidebar { 13 float: left; 14 overflow: hidden; 15 width: 180px; 16 } 17 div#primary { 18 margin: 0 0 0 -100%; 19 } 20 * html div#primary { 21 left: 20px; 22 position: relative; 23 } 24 div#secondary { 25 margin: 0 0 0 -200px; 26 } 27 div#footer { 28 clear: left; 29 width: 100%; 30 } 31 No newline at end of file -
wp-content/themes/sandbox/sandbox-layouts/3c-l.css
1 /* 2 LAYOUT: Three-Column (Left) 3 DESCRIPTION: Three-column fluid layout with two sidebars left of content 4 */ 5 div#container { 6 float: right; 7 margin: 0 0 0 -400px; 8 width: 100%; 9 } 10 div#content { 11 margin: 0 0 0 400px; 12 } 13 div.sidebar { 14 float: right; 15 overflow: hidden; 16 width: 180px; 17 } 18 div#footer { 19 clear: both; 20 width: 100% 21 } 22 No newline at end of file -
wp-content/themes/sandbox/sandbox-layouts/3c-r.css
1 /* 2 LAYOUT: Three-Column (Right) 3 DESCRIPTION: Three-column fluid layout with two sidebars right of content 4 */ 5 div#container { 6 float: left; 7 width: 100%; 8 } 9 div#content { 10 margin: 0 400px 0 0; 11 } 12 div.sidebar { 13 float: left; 14 overflow: hidden; 15 width: 180px; 16 } 17 div#primary { 18 margin: 0 0 0 -400px; 19 } 20 div#secondary { 21 margin: 0 0 0 -200px; 22 } 23 div#footer { 24 clear: left; 25 width: 100% 26 } 27 No newline at end of file -
wp-content/themes/sandbox/sandbox-layouts/layouts-readme.txt
1 --- Layout Style Sheets --- 2 This folder contains the original Sandbox layouts and examples of base layouts. 3 4 You can cut and paste these into your own style sheet, use them as references, or completely ignore them. 5 No newline at end of file -
wp-content/themes/sandbox/search.php
Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: wp-content\themes\sandbox\screenshot.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream
1 <?php get_header() ?> 2 3 <div id="container"> 4 <div id="content"> 5 6 <?php if (have_posts()) : ?> 7 8 <h2 class="page-title"><?php _e('Search Results for:', 'sandbox') ?> <span id="search-terms"><?php echo wp_specialchars(stripslashes($_GET['s']), true); ?></span></h2> 9 10 <div id="nav-above" class="navigation"> 11 <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'sandbox')) ?></div> 12 <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'sandbox')) ?></div> 13 </div> 14 15 <?php while ( have_posts() ) : the_post(); ?> 16 17 <div id="post-<?php the_ID() ?>" class="<?php sandbox_post_class() ?>"> 18 <h3 class="entry-title"><a href="<?php the_permalink() ?>" title="<?php printf(__('Permalink to %s', 'sandbox'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark"><?php the_title() ?></a></h3> 19 <div class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO'); ?>"><?php unset($previousday); printf(__('%1$s – %2$s', 'sandbox'), the_date('', '', '', false), get_the_time()) ?></abbr></div> 20 <div class="entry-content"> 21 <?php the_excerpt(''.__('Read More <span class="meta-nav">»</span>', 'sandbox').'') ?> 22 23 </div> 24 <div class="entry-meta"> 25 <span class="author vcard"><?php printf(__('By %s', 'sandbox'), '<a class="url fn n" href="'.get_author_link(false, $authordata->ID, $authordata->user_nicename).'" title="' . sprintf(__('View all posts by %s', 'sandbox'), $authordata->display_name) . '">'.get_the_author().'</a>') ?></span> 26 <span class="meta-sep">|</span> 27 <span class="cat-links"><?php printf(__('Posted in %s', 'sandbox'), get_the_category_list(', ')) ?></span> 28 <span class="meta-sep">|</span> 29 <span class="tag-links"><?php the_tags(__('Tagged ', 'sandbox'), ', ') ?></span> 30 <span class="meta-sep">|</span> 31 <?php edit_post_link(__('Edit', 'sandbox'), "\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n"); ?> 32 <span class="comments-link"><?php comments_popup_link(__('Comments (0)', 'sandbox'), __('Comments (1)', 'sandbox'), __('Comments (%)', 'sandbox')) ?></span> 33 </div> 34 </div><!-- .post --> 35 36 <?php endwhile; ?> 37 38 <div id="nav-below" class="navigation"> 39 <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'sandbox')) ?></div> 40 <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'sandbox')) ?></div> 41 </div> 42 43 <?php else : ?> 44 45 <div id="post-0" class="post noresults"> 46 <h2 class="entry-title"><?php _e('Nothing Found', 'sandbox') ?></h2> 47 <div class="entry-content"> 48 <p><?php _e('Sorry, but nothing matched your search criteria. Please try again with some different keywords.', 'sandbox') ?></p> 49 </div> 50 <form id="noresults-searchform" method="get" action="<?php bloginfo('home') ?>"> 51 <div> 52 <input id="noresults-s" name="s" type="text" value="<?php echo wp_specialchars(stripslashes($_GET['s']), true) ?>" size="40" /> 53 <input id="noresults-searchsubmit" name="searchsubmit" type="submit" value="<?php _e('Find', 'sandbox') ?>" /> 54 </div> 55 </form> 56 </div><!-- .post --> 57 58 <?php endif; ?> 59 60 </div><!-- #content --> 61 </div><!-- #container --> 62 63 <?php get_sidebar() ?> 64 <?php get_footer() ?> 65 No newline at end of file -
wp-content/themes/sandbox/sidebar.php
1 <div id="primary" class="sidebar"> 2 <ul class="xoxo"> 3 <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar(1) ) : // begin primary sidebar widgets ?> 4 5 <li id="pages"> 6 <h3><?php _e('Pages', 'sandbox') ?></h3> 7 <ul> 8 <?php wp_list_pages('title_li=&sort_column=post_title' ) ?> 9 </ul> 10 </li> 11 12 <li id="categories"> 13 <h3><?php _e('Categories', 'sandbox'); ?></h3> 14 <ul> 15 <?php wp_list_categories('title_li=&show_count=0&hierarchical=1') ?> 16 17 </ul> 18 </li> 19 20 <li id="archives"> 21 <h3><?php _e('Archives', 'sandbox') ?></h3> 22 <ul> 23 <?php wp_get_archives('type=monthly') ?> 24 25 </ul> 26 </li> 27 <?php endif; // end primary sidebar widgets ?> 28 </ul> 29 </div><!-- #primary .sidebar --> 30 31 <div id="secondary" class="sidebar"> 32 <ul class="xoxo"> 33 <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar(2) ) : // begin secondary sidebar widgets ?> 34 <li id="search"> 35 <h3><label for="s"><?php _e('Search', 'sandbox') ?></label></h3> 36 <form id="searchform" method="get" action="<?php bloginfo('home') ?>"> 37 <div> 38 <input id="s" name="s" type="text" value="<?php echo wp_specialchars(stripslashes($_GET['s']), true) ?>" size="10" tabindex="1" /> 39 <input id="searchsubmit" name="searchsubmit" type="submit" value="<?php _e('Find', 'sandbox') ?>" tabindex="2" /> 40 </div> 41 </form> 42 </li> 43 44 <?php wp_list_bookmarks('title_before=<h3>&title_after=</h3>&show_images=1') ?> 45 46 <li id="rss-links"> 47 <h3><?php _e('RSS Feeds', 'sandbox') ?></h3> 48 <ul> 49 <li><a href="<?php bloginfo('rss2_url') ?>" title="<?php echo wp_specialchars(get_bloginfo('name'), 1) ?> <?php _e('Posts RSS feed', 'sandbox'); ?>" rel="alternate" type="application/rss+xml"><?php _e('All posts', 'sandbox') ?></a></li> 50 <li><a href="<?php bloginfo('comments_rss2_url') ?>" title="<?php echo wp_specialchars(bloginfo('name'), 1) ?> <?php _e('Comments RSS feed', 'sandbox'); ?>" rel="alternate" type="application/rss+xml"><?php _e('All comments', 'sandbox') ?></a></li> 51 </ul> 52 </li> 53 54 <li id="meta"> 55 <h3><?php _e('Meta', 'sandbox') ?></h3> 56 <ul> 57 <?php wp_register() ?> 58 59 <li><?php wp_loginout() ?></li> 60 <?php wp_meta() ?> 61 62 </ul> 63 </li> 64 <?php endif; // end secondary sidebar widgets ?> 65 </ul> 66 </div><!-- #secondary .sidebar --> -
wp-content/themes/sandbox/single.php
1 <?php get_header() ?> 2 3 <div id="container"> 4 <div id="content"> 5 6 <?php the_post(); ?> 7 <div id="nav-above" class="navigation"> 8 <div class="nav-previous"><?php previous_post_link('%link', '<span class="meta-nav">«</span> %title') ?></div> 9 <div class="nav-next"><?php next_post_link('%link', '%title <span class="meta-nav">»</span>') ?></div> 10 </div> 11 12 <div id="post-<?php the_ID(); ?>" class="<?php sandbox_post_class(); ?>"> 13 <h2 class="entry-title"><?php the_title(); ?></h2> 14 <div class="entry-content"> 15 <?php the_content(''.__('Read More <span class="meta-nav">»</span>', 'sandbox').''); ?> 16 17 <?php link_pages("\t\t\t\t\t<div class='page-link'>".__('Pages: ', 'sandbox'), "</div>\n", 'number'); ?> 18 </div> 19 <div class="entry-meta"> 20 <?php printf(__('This entry was written by %1$s, posted on <abbr class="published" title="%2$sT%3$s">%4$s at %5$s</abbr>, filed under %6$s%7$s. Bookmark the <a href="%8$s" title="Permalink to %9$s" rel="bookmark">permalink</a>. Follow any comments here with the <a href="%10$s" title="Comments RSS to %9$s" rel="alternate" type="application/rss+xml">RSS feed for this post</a>.', 'sandbox'), 21 '<span class="author vcard"><a class="url fn n" href="'.get_author_link(false, $authordata->ID, $authordata->user_nicename).'" title="' . sprintf(__('View all posts by %s', 'sandbox'), $authordata->display_name) . '">'.get_the_author().'</a></span>', 22 get_the_time('Y-m-d'), 23 get_the_time('H:i:sO'), 24 the_date('', '', '', false), 25 get_the_time(), 26 get_the_category_list(', '), 27 get_the_tag_list(' and tagged ', ', ', ''), 28 get_permalink(), 29 wp_specialchars(get_the_title(), 'double'), 30 comments_rss() ) ?> 31 32 <?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) : // Comments and trackbacks open ?> 33 <?php printf(__('<a class="comment-link" href="#respond" title="Post a comment">Post a comment</a> or leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'sandbox'), get_trackback_url()) ?> 34 <?php elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) : // Only trackbacks open ?> 35 <?php printf(__('Comments are closed, but you can leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'sandbox'), get_trackback_url()) ?> 36 <?php elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) : // Only comments open ?> 37 <?php printf(__('Trackbacks are closed, but you can <a class="comment-link" href="#respond" title="Post a comment">post a comment</a>.', 'sandbox')) ?> 38 <?php elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) : // Comments and trackbacks closed ?> 39 <?php _e('Both comments and trackbacks are currently closed.') ?> 40 <?php endif; ?> 41 <?php edit_post_link(__('Edit', 'sandbox'), "\n\t\t\t\t\t<span class=\"edit-link\">", "</span>"); ?> 42 43 </div> 44 </div><!-- .post --> 45 46 <div id="nav-below" class="navigation"> 47 <div class="nav-previous"><?php previous_post_link('%link', '<span class="meta-nav">«</span> %title') ?></div> 48 <div class="nav-next"><?php next_post_link('%link', '%title <span class="meta-nav">»</span>') ?></div> 49 </div> 50 51 <?php comments_template(); ?> 52 53 </div><!-- #content --> 54 </div><!-- #container --> 55 56 <?php get_sidebar() ?> 57 <?php get_footer() ?> -
wp-content/themes/sandbox/style.css
1 /* 2 THEME NAME: Sandbox 3 THEME URI: http://www.plaintxt.org/themes/sandbox/ 4 DESCRIPTION: A theme rich with powerful and dynamic semantic class selectors; a canvas for CSS artists 5 VERSION: 1.0 6 AUTHOR: <a href="http://andy.wordpress.com/">Andy Skelton</a> & <a href="http://www.plaintxt.org/">Scott Allan Wallick</a> 7 AUTHOR URI: 8 */ 9 10 /* Two-column with sidebar on left from the /sandbox-layouts/ folder */ 11 @import url('sandbox-layouts/2c-l.css'); 12 13 /* Just some example content */ 14 div#header{text-align:center;margin-bottom:2em;} 15 div#access div.skip-link{position:absolute;top:1em;right:1em;} 16 div#menu{font-size:0.9em;height:1.5em;padding-top:0.3em;background:#eee;width:100%;} 17 div#menu ul a{font-weight:700;text-decoration:none;} 18 div#menu ul,div#menu ul ul,div#menu ul li{list-style:none;margin:0;padding:0;} 19 div#menu ul li{float:left;} 20 div#menu ul li a{background:#eee;padding:0.3em 0.5em;} 21 div#menu ul ul{display:none;} 22 div#menu ul ul li{float:none;} 23 div#menu ul ul li a{margin:0;padding:0;} 24 div#menu ul li:hover ul{display:block;font-size:0.9em;padding-top:0.5em;position:absolute;} 25 div#menu ul li:hover ul li a{background:#f5f5f5;border:none;display:block;padding:0.1em;width:10em;} 26 27 .entry-title{clear:both;} 28 div#container,div.sidebar{margin-top:2em;} 29 div#nav-above,div#nav-below{width:100%;height:1em;} 30 div#nav-above{margin-bottom:1em;} 31 div#nav-below{margin-top:1em;} 32 .alignleft,div.nav-previous{float: left;} 33 .alignright,div.nav-next{float: right;} 34 form#commentform .form-label{margin:1em 0 0;} 35 form#commentform span.required{background:#fff;color:red;} 36 form#commentform,form#commentform p{padding:0;} 37 input#author,input#email,input#url{width:50%;} 38 input#author,input#email,input#url,textarea#comment{padding:0.2em;} 39 div.comments ol li{margin:0 0 3.5em;} 40 textarea#comment{height:13em;margin:0 0 0.5em;overflow:auto;width:66%;} 41 42 div.sidebar div,div.sidebar h3,div.sidebar ul,div.sidebar li{margin:0;padding:0;} 43 div.sidebar h3{font-size:1.2em;} 44 div.sidebar input#s{width:7em;} 45 div.sidebar li{list-style:none;margin:0 0 1em;} 46 div.sidebar li form{margin:0.2em 0 0;padding:0;} 47 div.sidebar ul ul{margin:0 0 0 1em;} 48 div.sidebar ul ul li{list-style:disc;margin:0;} 49 div.sidebar ul ul ul{margin:0 0 0 0.5em;} 50 div.sidebar ul ul ul li{list-style:circle;} 51 52 div#footer{text-align:center;} 53 No newline at end of file -
wp-content/themes/sandbox/tag.php
1 <?php get_header() ?> 2 3 <div id="container"> 4 <div id="content"> 5 6 <h2 class="page-title"><?php _e('Tag Archives:', 'sandbox') ?> <span><?php single_tag_title(); ?></span></h2> 7 8 <div id="nav-above" class="navigation"> 9 <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'sandbox')) ?></div> 10 <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'sandbox')) ?></div> 11 </div> 12 13 <?php while (have_posts()) : the_post(); ?> 14 15 <div id="post-<?php the_ID(); ?>" class="<?php sandbox_post_class(); ?>"> 16 <h3 class="entry-title"><a href="<?php the_permalink() ?>" title="<?php printf(__('Permalink to %s', 'sandbox'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark"><?php the_title() ?></a></h3> 17 <div class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO'); ?>"><?php unset($previousday); printf(__('%1$s – %2$s', 'sandbox'), the_date('', '', '', false), get_the_time()) ?></abbr></div> 18 <div class="entry-content"> 19 <?php the_excerpt(''.__('Read More <span class="meta-nav">»</span>', 'sandbox').'') ?> 20 21 </div> 22 <div class="entry-meta"> 23 <span class="author vcard"><?php printf(__('By %s', 'sandbox'), '<a class="url fn n" href="'.get_author_link(false, $authordata->ID, $authordata->user_nicename).'" title="' . sprintf(__('View all posts by %s', 'sandbox'), $authordata->display_name) . '">'.get_the_author().'</a>') ?></span> 24 <span class="meta-sep">|</span> 25 <span class="cat-links"><?php printf(__('Posted in %s', 'sandbox'), get_the_category_list(', ')) ?></span> 26 <span class="meta-sep">|</span> 27 <?php if ( $tag_ur_it = sandbox_tag_ur_it(', ') ) : ?> 28 <span class="tag-links"><?php printf(__('Also tagged %s', 'sandbox'), $tag_ur_it) ?></span> 29 <span class="meta-sep">|</span> 30 <?php endif ?> 31 <?php edit_post_link(__('Edit', 'sandbox'), "\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n"); ?> 32 <span class="comments-link"><?php comments_popup_link(__('Comments (0)', 'sandbox'), __('Comments (1)', 'sandbox'), __('Comments (%)', 'sandbox')) ?></span> 33 </div> 34 </div><!-- .post --> 35 36 <?php endwhile; ?> 37 38 <div id="nav-below" class="navigation"> 39 <div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">«</span> Older posts', 'sandbox')) ?></div> 40 <div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">»</span>', 'sandbox')) ?></div> 41 </div> 42 43 </div><!-- #content --> 44 </div><!-- #container --> 45 46 <?php get_sidebar() ?> 47 <?php get_footer() ?> -
wp-includes/theme.php
248 248 // theme is first keeps the name. Subsequent themes get a suffix applied. 249 249 // The Default and Classic themes always trump their pretenders. 250 250 if ( isset($themes[$name]) ) { 251 if ( ('WordPress Default' == $name || 'WordPress Classic' == $name ) &&252 ('default' == $stylesheet || 'classic' == $stylesheet ) ) {251 if ( ('WordPress Default' == $name || 'WordPress Classic' == $name || 'Sandbox' == $name) && 252 ('default' == $stylesheet || 'classic' == $stylesheet || 'sandbox' == $stylesheet) ) { 253 253 // If another theme has claimed to be one of our default themes, move 254 254 // them aside. 255 255 $suffix = $themes[$name]['Stylesheet'];