Skip to content

Commit

Permalink
Formatting, adding/updating links
Browse files Browse the repository at this point in the history
  • Loading branch information
retlehs committed Nov 8, 2013
1 parent e362dae commit 840ee63
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 21 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
2 changes: 1 addition & 1 deletion lib/cleanup.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ function roots_request_filter($query_vars) {
add_filter('request', 'roots_request_filter');

/**
* Tell WordPress to use searchform.php from the templates/ directory. Requires WordPress 3.6+
* Tell WordPress to use searchform.php from the templates/ directory
*/
function roots_get_search_form($form) {
$form = '';
Expand Down
2 changes: 1 addition & 1 deletion lib/comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Use Bootstrap's media object for listing comments
*
* @link http://twitter.github.com/bootstrap/components.html#media
* @link http://getbootstrap.com/components/#media
*/
class Roots_Walker_Comment extends Walker_Comment {
function start_lvl(&$output, $depth = 0, $args = array()) {
Expand Down
8 changes: 4 additions & 4 deletions lib/gallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Re-create the [gallery] shortcode and use thumbnails styling from Bootstrap
* The number of columns must be a factor of 12.
*
* @link http://twbs.github.io/bootstrap/components/#thumbnails
* @link http://getbootstrap.com/components/#thumbnails
*/
function roots_gallery($attr) {
$post = get_post();
Expand Down Expand Up @@ -88,16 +88,16 @@ function roots_gallery($attr) {
$image = ('file' == $link) ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, true, false);
$output .= ($i % $columns == 0) ? '<div class="row gallery-row">': '';
$output .= '<div class="' . $grid .'">' . $image;

if (trim($attachment->post_excerpt)) {
$output .= '<div class="caption hidden">' . wptexturize($attachment->post_excerpt) . '</div>';
}

$output .= '</div>';
$i++;
$output .= ($i % $columns == 0) ? '</div>' : '';
}

$output .= ($i % $columns != 0 ) ? '</div>' : '';
$output .= '</div>';

Expand Down
3 changes: 2 additions & 1 deletion lib/sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
*
* If any of the is_* conditional tags or is_page_template(template_file) checks return true, the sidebar will NOT be displayed.
*
* @link http://roots.io/the-roots-sidebar/
*
* @param array list of conditional tags (http://codex.wordpress.org/Conditional_Tags)
* @param array list of page templates. These will be checked via is_page_template()
*
* @return boolean True will display the sidebar, False will not
*
*/
class Roots_Sidebar {
private $conditionals;
Expand Down
11 changes: 6 additions & 5 deletions lib/wrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/**
* Theme wrapper
*
* @link http://roots.io/an-introduction-to-the-roots-theme-wrapper/
* @link http://scribu.net/wordpress/theme-wrappers.html
*/
function roots_template_path() {
Expand All @@ -19,29 +20,29 @@ class Roots_Wrapping {
// Stores the base name of the template file; e.g. 'page' for 'page.php' etc.
static $base;

public function __construct($template='base.php') {
public function __construct($template = 'base.php') {
$this->slug = basename($template, '.php');
$this->templates = array($template);

if (self::$base) {
$str = substr($template, 0, -4);
array_unshift($this->templates, sprintf($str . '-%s.php', self::$base));
}
}

public function __toString() {
$this->templates = apply_filters('roots_wrap_' . $this->slug, $this->templates);
return locate_template($this->templates);
}

static function wrap($main) {
self::$main_template = $main;
self::$base = basename(self::$main_template, '.php');

if (self::$base === 'index') {
self::$base = false;
}

return new Roots_Wrapping();
}
}
Expand Down
2 changes: 1 addition & 1 deletion page.php
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?php get_template_part('templates/page', 'header'); ?>
<?php get_template_part('templates/content', 'page'); ?>
<?php get_template_part('templates/content', 'page'); ?>
2 changes: 1 addition & 1 deletion single.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php get_template_part('templates/content', 'single'); ?>
<?php get_template_part('templates/content', 'single'); ?>
2 changes: 1 addition & 1 deletion template-custom.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
?>

<?php get_template_part('templates/page', 'header'); ?>
<?php get_template_part('templates/content', 'page'); ?>
<?php get_template_part('templates/content', 'page'); ?>
2 changes: 1 addition & 1 deletion templates/content-page.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php while (have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php wp_link_pages(array('before' => '<nav class="pagination">', 'after' => '</nav>')); ?>
<?php endwhile; ?>
<?php endwhile; ?>
2 changes: 1 addition & 1 deletion templates/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
</div>
</footer>

<?php wp_footer(); ?>
<?php wp_footer(); ?>
2 changes: 1 addition & 1 deletion templates/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
</nav>
</div>
</div>
</header>
</header>
2 changes: 1 addition & 1 deletion templates/page-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
<h1>
<?php echo roots_title(); ?>
</h1>
</div>
</div>
2 changes: 1 addition & 1 deletion templates/sidebar.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php dynamic_sidebar('sidebar-primary'); ?>
<?php dynamic_sidebar('sidebar-primary'); ?>

0 comments on commit 840ee63

Please sign in to comment.