-
Notifications
You must be signed in to change notification settings - Fork 1
Linux Plumbers Conf Wordpress Theme
philips/lpcwp
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
Repository files navigation
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" dir="ltr"> <head profile="http://gmpg.org/xfn/11"> <title>The Sandbox · An explanation</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <meta http-equiv="content-language" content="en-us" /> <meta name="description" content="Sandbox: A highly semantic theme with powerful, dynamic class selectors" /> <meta name="keywords" content="sandbox,xhtml,hatom,hcard,microformats,semantics,css,wordpress" /> <style type="text/css" media="screen,projection"> /*<![CDATA[*/ body{background:#fcfcfc;color:#444;font:normal 70%/150% verdana,geneva,sans-serif;margin:0;padding:0;} body blockquote{border-left:5px solid #f6f6f6;padding-left:0.5em;} body code,body pre{font:1em/150% consolas,"courier new",courier,monospace;} 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;} body div#readme div#footer{margin:3em auto 1em;text-align:center;} body div#readme div#footer p{background:#ffd;color:#666;display:inline;padding:0.2em 0.5em;} body div#readme div#header{margin:0 auto;text-align:center;} body div#readme div#header div.readme-version{font-size:0.9em;letter-spacing:0.1em;margin:0 0 0.5em;text-transform:uppercase;} body h1{font-size:3.2em;} body h1,body h2,body h3{font-family:garamond,georgia,times,serif;font-weight:400;} body h2{font-size:2em;margin-top:3em;} body h3{font-size:1.6em;margin-top:2em;} body ol li ol li,body ol li#features ol li ol li{list-style:decimal;} body ol li#functions h3{font-size:1.5em;} body ol li#functions ol{list-style:lower-alpha;margin:0 0 0 2em;padding:0;} body ol li#license blockquote a{color:#222;text-decoration:none;} body ol li#license blockquote strong{font-size:0.9em;font-weight:400;text-transform:uppercase;} body ol li,body ol#menu li ol li{list-style:upper-roman;} body ol ul li{list-style:square;} body ol li pre.shell{margin:-0.5em 2.5em 1em 1em;padding:0.2em 0.5em;background:#eee;} body ol#menu li{list-style:none;} body ol#menu li ol li ol li,body ol li#functions ol li,body ol li#features ol li{list-style:lower-roman;} body pre span,body span.bold{font-weight:700;} body p span.vcard span.family-name,body p span.vcard span.additional-name{display:none;} table {width:100%;} table *{border:none;} table tbody th,table tfoot th{background:#ddd;text-align:left;} table tbody tr.alt{background:#eee;} table tr td,table tr th{padding:0.1em 0.5em;} /*]]>*/ </style> </head> <body> <div id="readme"> <div id="header"> <h1 id="title">The Sandbox</h1> <div class="readme-version">Version 1.6</div> <div class="readme-subtitle">A theme rich and powerful with dynamic semantic class selectors</div> </div><!-- #header --> <ol id="menu" class="xoxo"> <li> <h2>Table of contents</h2> <ol> <li><a href="#introduction" title="Skip to Introduction">Introduction</a></li> <li><a href="#installing" title="Skip to Installing">Installing</a></li> <li><a href="#started" title="Skip to Getting started">Getting started</a></li> <li><a href="#functions" title="Skip to Class functions">Class functions</a> <ol> <li><a href="#body-class" title="Skip to Class functions: sandbox_body_class()"><code>sandbox_body_class()</code></a></li> <li><a href="#post-class" title="Skip to Class functions: sandbox_post_class()"><code>sandbox_post_class()</code></a></li> <li><a href="#comment-class" title="Skip to Class functions: sandbox_comment_class()"><code>sandbox_comment_class()</code></a></li> </ol> </li> <li><a href="#features" title="Skip to Other features">Other features</a> <ol> <li><a href="#comments" title="Skip to Other features: Comments on pages">Comments on pages</a></li> <li><a href="#templates" title="Skip to Other features: Page templates">Page templates</a></li> </ol> </li> <li><a href="#creating" title="Skip to Creating Sandbox templates">Creating a theme template</a></li> <li><a href="#filters" title="Skip to Available filters">Using filters</a></li> <li><a href="#translations" title="Skip to Translations">Translations</a></li> <li><a href="#standards" title="Skip to Web standards">Web standards</a></li> <li><a href="#microformats" title="Skip to Microformats">Microformats</a></li> <li><a href="#credits" title="Skip to Credits and thanks">Credits and thanks</a></li> <li><a href="#license" title="Skip to License">License</a></li> </ol> </li> </ol><!-- #menu .xoxo --> <ol id="content" class="xoxo"> <li id="introduction"> <h2>Introduction</h2> <p>Sandbox is a lot of things:</p> <ul> <li>For WordPress 2.5.x</li> <li>Beautiful on the inside</li> <li>Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr> 1.0 Transitional</li> <li>Widgets friendly</li> <li>The basis for your <abbr title="GNU General Public Licence">GPL</abbr>-licensed theme</li> </ul> <p>More importantly, the Sandbox <em>can be</em> a lot of things.</p> <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> <p>So what can you do with the Sandbox?</p> <ul> <li>You can just use it as-is and have a super-cool, truly minimalist theme.</li> <li>You can thoroughly customize it with <abbr title="Cascading Style Sheets">CSS</abbr> alone.</li> <li>You can use its functions, files, et al, as pleases you.</li> <li>You can use it 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>.</li> </ul> <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> <p>And the implementation of the hAtom and hCard microformats means we're looking forward. You might be able to improve on our markup, but who wants to work that hard?</p> </li><!-- #introduction --> <li id="installing"> <h2>Installing</h2> <p>The Sandbox theme is installed just like any other WordPress theme. To install this theme:</p> <ol> <li>Download the latest <a href="http://www.plaintxt.org/themes/sandbox/" title="Sandbox theme for WordPress" rel="me">Sandbox</a> release</li> <li>Extract the <code>/sandbox/</code> folder from the archive</li> <li>Upload it to the <code>../wp-contents/themes/</code> directory</li> <li>Activate the theme in the <i>Design</i> submenu</li> <li>Enjoy</li> </ol> <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> <h3>Subversion Access</h3> <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> <p>For the latest and possibly unstable version, check out the <code>/trunk/</code>:</p> <pre class="shell">svn checkout http://sandbox-theme.googlecode.com/svn/trunk/</pre> <p>A legacy version for WordPress 2.0.x is in <code>/branches/0.9/</code>. Otherwise, please check out tagged versions in the <code>/tags/</code> subdirectory. Tagged versions are stable and the latest release will be for the current stable version of WordPress.</p> </li><!-- #installing --> <li id="started"> <h2>Getting started</h2> <p>For beginners getting started, see the example layouts in <code>/sandbox-layouts/</code>. Instructions for using the included layouts can be found in the folder.</p> <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> <p>For help learning <abbr title="Cascading Style Sheets">CSS</abbr>, visit:</p> <ul> <li><a href="http://www.cssbasics.com/" title="CSS Basics.com" rel="external"><abbr title="Cascading Style Sheets">CSS</abbr> Basics.com</a></li> <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> <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> <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> <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> </ul> <p>For Sandbox-related resources, including how-tos, Sandbox-based theme templates, and more, visit:</p> <ul> <li><a href="http://archgfx.net/" title="archGFX" rel="external">archGFX</a></li> <li><a href="http://internetducttape.com/" title="InternetDuctTape" rel="external">Internet Duct Tape</a></li> <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> <li><a href="http://www.plaintxt.org/" title="plaintxt.org" rel="me">plaintxt.org</a></li> <li><a href="http://www.sndbx.org/" title="Sandbox Designs Competition" rel="me">Sandbox Designs Competition</a></li> <li><a href="http://www.sndbx.org/forums/" title="Sandbox Forums" rel="me">Sandbox Forums</a></li> </ul> <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> </li><!-- #started --> <li id="functions"> <h2>Class functions</h2> <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> <ol> <li id="body-class"> <h3><code>sandbox_body_class()</code></h3> <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> <pre><body class="<span><?php sandbox_body_class() ?></span>"></pre> <p>The chart below lists the semantic classes added to the <code>body</code> tag by this function.</p> <table id="body-class-table" summary="Classes given to the body element sandbody_body_class()"> <thead> <tr> <th colspan="3" scope="colgroup"><code>sandbox_body_class()</code></th> </tr> </thead> <tfoot> <tr> <th colspan="3" scope="colgroup"><abbr title="Cascading Style Sheets">CSS</abbr> example</th> </tr> <tr> <td colspan="3" scope="row" abbr="CSS example"><code>body.single div.sidebar { display: none; }</code></td> </tr> </tfoot> <tbody> <tr> <th scope="col" abbr="class">Class</th> <th scope="col" abbr="tag">WP Tag</th> <th scope="col" abbr="use">Usage</th> </tr> <tr> <td scope="row">archive</td> <td><code>is_archive()</code></td> <td>When <em>any</em> archive page is displayed, i.e., applies to category-, date-, and author-based archive pages</td> </tr> <tr class="alt"> <td scope="row">attachment</td> <td><code>is_attachment()</code></td> <td>When the post subpage containing an attachment is displayed, as set with "Linked to Page" in the post editor</td> </tr> <tr> <td scope="row">attachmentid-[n]</td> <td><code>is_attachment()</code></td> <td>Displays the ID number of queried attachment page, where <i>[n]</i> is the ID, e.g., <code>attachmentid-20</code></td> </tr> <tr class="alt"> <td scope="row">attachment-[mime]</td> <td><code>is_attachment()</code></td> <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> </tr> <tr> <td scope="row">author</td> <td><code>is_author()</code></td> <td>When a author archive page is displayed</td> </tr> <tr class="alt"> <td scope="row">author-[name]</td> <td><code>is_author()</code></td> <td>When a specific author archive page is displayed, where <i>[name]</i> is the author's login name, e.g., author-admin</td> </tr> <tr> <td scope="row">author-paged-[n]</td> <td><code>is_author()</code> & <code>is_paged()</code></td> <td>Displays the "paged" number of author archive, where <i>[n]</i> is the paginated number</td> </tr> <tr class="alt"> <td scope="row">blog</td> <td><code>is_home()</code></td> <td>When the page containing blog posts is displayed</td> </tr> <tr> <td scope="row">category</td> <td><code>is_category()</code></td> <td>When a category archive page is displayed</td> </tr> <tr class="alt"> <td scope="row">category-[name]</td> <td><code>is_category()</code></td> <td>For a specific category, where <i>[name]</i> is the category slug, e.g., <code>category-useful-links</code></td> </tr> <tr> <td scope="row">category-paged-[n]</td> <td><code>is_category()</code> & <code>is_paged()</code></td> <td>Displays the "paged" number of category archive, where <i>[n]</i> is the paginated number</td> </tr> <tr class="alt"> <td scope="row">d01–31</td> <td><code>gmdate('d')</code></td> <td>The current day of when the page is displayed (Offset to GMT)</td> </tr> <tr> <td scope="row">date</td> <td><code>is_date()</code></td> <td>When a date archive page is displayed, e.g., by month, by year</td> </tr> <tr class="alt"> <td scope="row">date-paged-[n]</td> <td><code>is_date()</code> & <code>is_paged()</code></td> <td>Displays the "paged" number of date-based archive, where <i>[n]</i> is the paginated number</td> </tr> <tr> <td scope="row">h00–24</td> <td><code>gmdate('h')</code></td> <td>The current hour of when the page is displayed (Offset to GMT)</td> </tr> <tr class="alt"> <td scope="row">four04</td> <td><code>is_404()</code></td> <td>When a request results in zero posts, i.e., a 404 error page</td> </tr> <tr> <td scope="row">home</td> <td><code>is_front_page()</code></td> <td>When the front page is displayed</td> </tr> <tr class="alt"> <td scope="row">m00–12</td> <td><code>gmdate('m')</code></td> <td>The current month of when the page is displayed (Offset to GMT)</td> </tr> <tr> <td scope="row">loggedin</td> <td>n/a</td> <td>When the page is displayed by a logged-in user</td> </tr> <tr class="alt"> <td scope="row">page</td> <td><code>is_page()</code></td> <td>When a page is displayed</td> </tr> <tr> <td scope="row">page-author-[name]</td> <td><code>is_page()</code></td> <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> </tr> <tr class="alt"> <td scope="row">page-child</td> <td><code>is_page()</code></td> <td>When the page is a child page to another page</td> </tr> <tr> <td scope="row">page-paged-[n]</td> <td><code>is_page()</code> & <code>is_paged()</code></td> <td>Displays the "paged" number of pages, where <i>[n]</i> is the paginated number</td> </tr> <tr class="alt"> <td scope="row">page-parent</td> <td><code>is_page()</code></td> <td>When the page has one or more child pages</td> </tr> <tr> <td scope="row">page-template</td> <td><code>is_page()</code></td> <td>When the page is using a page template</td> </tr> <tr class="alt"> <td scope="row">page-template-[name]</td> <td><code>is_page()</code></td> <td>When the page is using a page template, where <i>[name]</i> is the file name of the page template</td> </tr> <tr> <td scope="row">paged</td> <td><code>is_paged()</code></td> <td>When whatever is displayed is "paged," e.g., page 2 of the index</td> </tr> <tr class="alt"> <td scope="row">paged-[n]</td> <td><code>is_paged()</code></td> <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> </tr> <tr> <td scope="row">pageid-[n]</td> <td><code>is_page()</code></td> <td>Displays the page ID number of queried page, where <i>[n]</i> is the ID, e.g., <code>pageid-20</code></td> </tr> <tr class="alt"> <td scope="row">parent-pageid-[n]</td> <td><code>is_page()</code></td> <td>Displays the page ID of the current page's parent, where <i>[n]</i> is the ID, e.g., <code>parent-pageid-20</code></td> </tr> <tr> <td scope="row">postid-[n]</td> <td><code>is_single()</code></td> <td>Displays the post ID number of queried post, where <i>[n]</i> is the post ID, e.g., <code>postid-20</code></td> </tr> <tr class="alt"> <td scope="row">search</td> <td><code>is_search()</code></td> <td>When the results of a search are displayed</td> </tr> <tr> <td scope="row">single</td> <td><code>is_single()</code></td> <td>When a single post is displayed</td> </tr> <tr class="alt"> <td scope="row">s-author-[name]</td> <td><code>is_single()</code> & <code>is_author()</code></td> <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> </tr> <tr> <td scope="row">s-category-[name]</td> <td><code>is_single()</code> & <code>is_category()</code></td> <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> </tr> <tr class="alt"> <td scope="row">s-d01–31</td> <td><code>gmdate('d')</code></td> <td>For a single post published on a specific day (Offset to GMT)</td> </tr> <tr> <td scope="row">s-h00–24</td> <td><code>gmdate('h')</code></td> <td>For a single post published at a specific hour (Offset to GMT)</td> </tr> <tr class="alt"> <td scope="row">s-m00–12</td> <td><code>gmdate('m')</code></td> <td>For a single post published in a specific month (Offset to GMT)</td> </tr> <tr> <td scope="row">s-tag-[name]</td> <td><code>is_single()</code> & <code>is_tag()</code></td> <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> </tr> <tr class="alt"> <td scope="row">s-y2007</td> <td><code>gmdate('Y')</code></td> <td>For a single post published in a specific year (Offset to GMT)</td> </tr> <tr> <td scope="row">tag</td> <td><code>is_tag()</code></td> <td>When a tag archive page is displayed</td> </tr> <tr class="alt"> <td scope="row">tag-[name]</td> <td><code>is_tag()</code></td> <td>For a specific tag, where <i>[name]</i> is the tag slug, e.g., <code>tag-foo-bar</code></td> </tr> <tr> <td scope="row">tag-paged-[n]</td> <td><code>is_tag()</code> & <code>is_paged()</code></td> <td>Displays the "paged" number of tag archive, where <i>[n]</i> is the paginated number</td> </tr> <tr class="alt"> <td scope="row">wordpress</td> <td>n/a</td> <td>When anything is displayed; a class that is always applied</td> </tr> <tr> <td scope="row">y2007</td> <td><code>gmdate('Y')</code></td> <td>The current year of when the page is display (Offset to GMT)</td> </tr> </tbody> </table><!-- #body-class-table --> </li><!-- #body-class --> <li id="post-class"> <h3><code>sandbox_post_class()</code></h3> <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> <pre><div id="post-<?php the_ID(); ?>" class="<span><?php sandbox_post_class() ?></span>"></pre> <p>The chart below lists the semantic classes added to each post <code>div</code> element by this function.</p> <table id="post-class-table" summary="Classes given to individual posts by sandbody_post_class()"> <thead> <tr> <th colspan="3" scope="colgroup"><code>sandbox_post_class()</code></th> </tr> </thead> <tfoot> <tr> <th colspan="3" scope="colgroup"><abbr title="Cascading Style Sheets">CSS</abbr> example</th> </tr> <tr> <td colspan="3" scope="row" abbr="CSS example"><code>div.category-news .entry-title { background: url('images/news.png'); }</code></td> </tr> </tfoot> <tbody> <tr> <th scope="col" abbr="class">Class</th> <th scope="col" abbr="tag">WP Tag</th> <th scope="col" abbr="use">Usage</th> </tr> <tr> <td scope="row">alt</td> <td>n/a</td> <td>For odd-numbered posts, e.g., for the 1<sup>st</sup>, 3<sup>rd</sup>, 5<sup>th</sup> posts</td> </tr> <tr class="alt"> <td scope="row">author-[name]</td> <td><code>is_author()</code></td> <td>For any specific author, where <i>[name]</i> is the user's login name, e.g., <code>author-admin</code></td> </tr> <tr> <td scope="row">category-[name]</td> <td><code>is_category()</code></td> <td>For any specific category, where <i>[name]</i> is the category slug, e.g., <code>category-news</code></td> </tr> <tr class="alt"> <td scope="row">d01–31</td> <td><code>gmdate('d')</code></td> <td>For a post published on a specific day (Offset to GMT)</td> </tr> <tr> <td scope="row">draft</td> <td>n/a</td> <td>For a post saved as a draft, as contrasted with an published post</td> </tr> <tr class="alt"> <td scope="row">h00–24</td> <td><code>gmdate('h')</code></td> <td>For a post published at a specific hour (Offset to GMT)</td> </tr> <tr> <td scope="row">hentry</td> <td>n/a</td> <td>For the hAtom 0.1 specification, applied every post</td> </tr> <tr class="alt"> <td scope="row">m00–12</td> <td><code>gmdate('m')</code></td> <td>For a post published in a specific month (Offset to GMT)</td> </tr> <tr> <td scope="row">p[n]</td> <td>n/a</td> <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> </tr> <tr class="alt"> <td scope="row">page</td> <td>n/a</td> <td>A general class, applied to every page</td> </tr> <tr> <td scope="row">post</td> <td>n/a</td> <td>A general class, applied to every post</td> </tr> <tr class="alt"> <td scope="row">private</td> <td>n/a</td> <td>For a post that has been saved as private</td> </tr> <tr> <td scope="row">protected</td> <td>n/a</td> <td>For a post protected by a password</td> </tr> <tr class="alt"> <td scope="row">publish</td> <td>n/a</td> <td>For any published post, as contrasted with an unpublished draft</td> </tr> <tr> <td scope="row">tag-[name]</td> <td><code>is_tag()</code></td> <td>For any specific tag, where <i>[name]</i> is the tag slug, e.g., <code>tag-foo-bar</code></td> </tr> <tr class="alt"> <td scope="row">untagged</td> <td><code>is_tag()</code></td> <td>If there are no tags assigned to the post</td> </tr> <tr> <td scope="row">y2007</td> <td><code>gmdate('Y')</code></td> <td>For a post published in a certain year (Offset to GMT)</td> </tr> </tbody> </table><!-- #post-class-table --> </li><!-- #post-class --> <li id="comment-class"> <h3><code>sandbox_comment_class()</code></h3> <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> <pre><li id="comment-<?php comment_ID(); ?>" class="<span><?php sandbox_comment_class() ?></span>"></pre> <p>The chart below lists the semantic classes added to each comment <code>li</code> element by this function.</p> <table id="comment-class-table" summary="Classes given to individual comments by sandbody_comment_class()"> <thead> <tr> <th colspan="3" scope="colgroup"><code>sandbox_comment_class()</code></th> </tr> </thead> <tfoot> <tr> <th colspan="3" scope="colgroup"><abbr title="Cascading Style Sheets">CSS</abbr> example</th> </tr> <tr> <td colspan="3" scope="row" abbr="CSS example"><code>div.comments li.bypostauthor { border: 1px solid red; }</code></td> </tr> </tfoot> <tbody> <tr> <th scope="col" abbr="class">Class</th> <th scope="col" abbr="tag">WP Tag</th> <th scope="col" abbr="use">Usage</th> </tr> <tr> <td scope="row">alt</td> <td>n/a</td> <td>For odd-numbered comments, e.g., for the 1<sup>st</sup>, 3<sup>rd</sup>, 5<sup>th</sup> comments</td> </tr> <tr class="alt"> <td scope="row">bypostauthor</td> <td>n/a</td> <td>When the comment author is also the post author</td> </tr> <tr> <td scope="row">byuser</td> <td>n/a</td> <td>For comments by registered users</td> </tr> <tr class="alt"> <td scope="row">c-h00–24</td> <td><code>gmdate('h')</code></td> <td>For a comment posted at a specific hour (Offset to GMT)</td> </tr> <tr> <td scope="row">c[n]</td> <td>n/a</td> <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> </tr> <tr class="alt"> <td scope="row">c-d01–31</td> <td><code>gmdate('d')</code></td> <td>For a comment posted on a specific date (Offset to GMT)</td> </tr> <tr> <td scope="row">c-m00–12</td> <td><code>gmdate('m')</code></td> <td>For a comment posted in a specific month (Offset to GMT)</td> </tr> <tr class="alt"> <td scope="row">c-y2007</td> <td><code>gmdate('Y')</code></td> <td>For a comment posted in a specific year (Offset to GMT)</td> </tr> <tr> <td scope="row">comment</td> <td>n/a</td> <td>A general class, applied to every comment</td> </tr> <tr class="alt"> <td scope="row">comment-author-[name]</td> <td>n/a</td> <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> </tr> <tr> <td scope="row">p[n]</td> <td>n/a</td> <td>For counting pingbacks relative to the first, where <i>[n]</i> is the number, e.g., <code>p1</code> for the first pingback, <code>p2</code> for the second, <code>p3</code> for the third</td> </tr> <tr class="alt"> <td scope="row">pingback</td> <td>is_pingback()</td> <td>When a comment is a pingback</td> </tr> <tr> <td scope="row">t[n]</td> <td>n/a</td> <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> </tr> <tr class="alt"> <td scope="row">trackback</td> <td>is_trackback()</td> <td>When a comment is a trackback</td> </tr> </tbody> </table><!-- #comment-class-table --> </li><!-- #comment-class --> </ol> </li><!-- #functions --> <li id="features"> <h2>Other features</h2> <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> <ol> <li id="comments"> <h3>Comments on pages</h3> <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> <p>To enable comments on a page:</p> <ol> <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> <li>In the <i>Custom Fields</i> box, add a new key with the exact text <code>comments</code></li> <li>Add any text for a value (some text must be included for the key to save)</li> <li>Click <i>Add Custom Field</i> to save the key/value</li> <li>Comments should now be enabled on that page</li> </ol> <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> </li><!-- #comments --> <li id="templates"> <h3>Page templates</h3> <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> <p>To use the page templates:</p> <ol> <li>In the <i>Write › Page</i> menu, expand the <i>Page Templates</i> box</li> <li>From the drop-down, select the page template to use</li> <li>Add a title and text (optional) for the page</li> <li>Click <i>Create New Page / Save</i> to publish the page</li> </ol> <p>The Archive Page template displays archives by month and by category. The Links Page displays links by link category.</p> </li><!-- #templates --> </ol> </li><!-- #features --> <li id="creating"> <h2>Creating a theme template</h2> <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> <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> <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> <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> <pre class="css">/* THEME NAME: My Design THEME URI: http://www.example.com/my-design/ DESCRIPTION: New curtains for an old room VERSION: 0.1 AUTHOR: John Doe AUTHOR Uri: http://www.example.com TAGS: one column, two columns, three columns, awesome, blue, pink TEMPLATE: sandbox */</pre> <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> <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> or in <a href="http://forums.sndbx.org/viewtopic.php?id=4" title="Creating Sandbox-based theme templates" rel="external">Creating Sandbox-based theme templates</a> in the Sandbox Forums.</p> </li><!-- #creating --> <li id="filters"> <h2>Using filters</h2> <p>Filters allow plugins and theme templates to change the data that the Sandbox returns to the browser without having to alter the theme fiiles. Filters provide a simple, clean way of altering what the Sandbox does without modifying the actual theme files.</p> <p>For example, if you wanted to add a link to globalnav page list, you would have to edit the theme files. When you upgrade the theme files (or accidentally break something), you will have to go back and make this change again. By using the <code>globalnav_menu</code> filter, however, you can alter the output of the <code>sandbox_globalnav()</code> without changing a single theme file.</p> <p>The chart below lists the filters available in the Sandbox theme.</p> <table id="filters-table" summary="Filters available in the Sandbox theme for use by plugins and theme templates"> <thead> <tr> <th colspan="3" scope="colgroup">Sandbox filters</th> </tr> </thead> <tfoot> <tr> <th colspan="3" scope="colgroup">Filter examples</th> </tr> <tr> <td colspan="3" scope="row" abbr="Filter example"><pre>// Sandbox produces 32px avatars -- too small! function make_avatars_big() { return '64'; } // Add our function to the filter in Sandbox add_filter( 'avatar_size', 'make_avatars_big' );</pre></td> </tr> </tfoot> <tbody> <tr class="alt"> <th scope="col" abbr="filter">Filter</th> <th scope="col" abbr="ref">Reference</th> <th scope="col" abbr="use">Usage</th> </tr> <tr> <td scope="row">avatar_size</td> <td><code>functions.php</code>, 280</td> <td>Sets avatar image dimenions in pixels</td> </tr> <tr class="alt"> <td scope="row">body_class</td> <td><code>functions.php</code>, 143</td> <td>Adds classes to the <code>body</code> element</td> </tr> <tr> <td scope="row">comment_class</td> <td><code>functions.php</code>, 222</td> <td>Adds classes to a comment <code>li</code> element</td> </tr> <tr class="alt"> <td scope="row">gallery_img_class</td> <td><code>functions.php</code>, 280</td> <td>Adds classes to gallery images</td> </tr> <tr> <td scope="row">gallery_img_rel</td> <td><code>functions.php</code>, 334</td> <td>Adds <code>rel</code> attributes to gallery images</td> </tr> <tr class="alt"> <td scope="row">globalnav_menu</td> <td><code>functions.php</code>, 23</td> <td>Echos list of pages without white space</td> </tr> <tr> <td scope="row">post_class</td> <td><code>functions.php</code>, 183</td> <td>Adds classes to a post <code>div</code> element</td> </tr> </tbody> </table><!-- #filters-table --> <p>For more information on using filters, see <a href="http://codex.wordpress.org/Plugin_API#Filters" title="Plugin API - Filters" rel="external">Plugin API: Filters</a> on the WordPress Codex. The initial discussion about <a href="http://forums.sndbx.org/viewtopic.php?id=8" title="Using filters in the Sandbox" rel="external">filters in the Sandbox</a> on the Sandbox Forums may be also useful.</p> </li><!-- #filters --> <li id="translations"> <h2>Translations</h2> <p>The Sandbox allows for complete localization. For detailed information about translating the Sandbox into your language, see <a href="http://code.google.com/p/sandbox-theme/wiki/SandboxInYourLanguage" title="Sandbox in your language - Sandbox on Google Code" rel="external">Sandbox in your language</a> on the Sandbox wiki.</p> <p>If you would like to submit a translation for the Sandbox, please open a new issue on the <a href="http://sandbox-theme.googlecode.com/" title="Sandbox on Google Code">Sandbox project home</a>. Please include both the <code>PO</code> and <code>MO</code> files. You're also welcome to help edit existing translations.</p> <p>Translations have been graciously provided by the following individuals:</p> <ul> <li class="vcard">Brazilian Portuguese by <a class="fn n url" href="http://adrianocorreia.com/" title="Adriano Correia"><span class="given-name">Adriano</span> <span class="family-name">Correia</span></a></li> <li class="vcard">Chilean Spanish by <a class="fn n url" href="http://daidaros.com/" title="Daidaros"><span class="nickname">Daidaros</span></a></li> <li class="vcard">Danish by <a class="fn n url" href="http://danish-wordpress.dk/" title="Carl Andersen"><span class="given-name">Carl</span> <span class="family-name">Andersen</span></a></li> <li class="vcard">French by <a class="fn n url" href="http://www.mederel.fr/" title="Emile de Weerd"><span class="given-name">Emile</span> <span class="family-name">de Weerd</span></a></li> <li>German by <span class="vcard"><span class="given-name">Daniel</span> <span class="family-name">Netzer</span></span> and <span class="vcard"><a class="fn n url" href="http://blog.piecho.de/" title="Lars Piechowiak"><span class="given-name">Lars</span> <span class="family-name">Piechowiak</span></a></span></li> <li>Italian by <span class="vcard"><a class="fn n url" href="http://www.nokao.com/" title="Nokao"><span class="nickname">Nokao</span></a></span> and <span class="vcard"><span class="given-name">Jan</span> <span class="family-name">Reister</span></span></li> <li class="vcard">Japanese by <a class="fn n url" href="http://ideasilo.wordpress.com/" title="Takayuki Miyoshi"><span class="given-name">Takayuki</span> <span class="family-name">Miyoshi</span></a></li> <li class="vcard">Norwegian by <a class="fn n url" href="http://kjell.langvass.org/" title="Kjell Knudsen"><span class="given-name">Kjell</span> <span class="family-name">Knudsen</span></a></li> <li class="vcard">Simplified Chinese by <a class="fn n url" href="http://www.wpcng.com/" title="WordPress Chinese Group"><span class="org">WordPress Chinese Group</span></a></li> <li class="vcard">Spanish by <a class="fn n url" href="http://daidaros.com/" title="Daidaros"><span class="nickname">Daidaros</span></a></li> </ul> </li><!-- #translations --> <li id="standards"> <h2>Web standards</h2> <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> <blockquote cite="http://webstandards.org/learn/faq/" title="What are web standards and why should I use them?"> <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> <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> </blockquote> <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> </li><!-- #standards--> <li id="microformats"> <h2>Microformats</h2> <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> <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> <ul> <li><a href="http://microformats.org/wiki/hatom" title="hAtom - Microformats" rel="external">hAtom</a>: For all blog posts and pages</li> <li><a href="http://microformats.org/wiki/hcard" title="hCard - Microformats" rel="external">hCard</a>: For all post and comment authors</li> <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> <li><a href="http://microformats.org/wiki/xoxo" title="XOXO - Microformats" rel="external">XOXO</a>: For menu, blogroll, archive, and sidebar lists</li> </ul> <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.</p> <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> </li><!-- #microformats --> <li id="credits"> <h2>Credits and thanks</h2> <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> <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> <ul> <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> <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> <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> <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> </ul> <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> <ul> <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> <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> <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> <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> <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> <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> <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> <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> <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> <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> <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> <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> <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> <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> <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> <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> </ul> </li><!-- #extra --> <li id="license"> <h2>License</h2> <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> <blockquote title="How to use the GPL or LPGL" cite="http://www.gnu.org/licenses/gpl-howto.html"> <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> <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> <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> </blockquote> </li><!-- #license --> </ol><!-- #readme .xoxo --> <div id="footer"> <p>Last updated 18 July 2008</p> </div><!-- #footer --> </div><!-- #readme --> </body> </html>
About
Linux Plumbers Conf Wordpress Theme
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published