Permalink
Browse files

Added <main> tags. Fixed 'more' tag removal.

  • Loading branch information...
awmartin committed Mar 14, 2016
1 parent 7b8283b commit 7bc79d12b9ec44b93bfb0c5840e831f14eb92289
Showing with 36 additions and 6 deletions.
  1. +20 −4 null.layout.php
  2. +2 −2 null.post.php
  3. +14 −0 null.site.php
@@ -9,9 +9,9 @@ function NullFullPage($content) {
function NullContentSidebar($content, $sidebar) {
$layout = '<div class="row">';
$layout .= '<div class="eight columns">';
$layout .= '<main class="eight columns">';
$layout .= $content;
$layout .= '</div>';
$layout .= '</main>';
$layout .= '<aside class="four columns">';
$layout .= $sidebar;
@@ -29,9 +29,9 @@ function NullSidebarContent($content, $sidebar) {
$layout .= $sidebar;
$layout .= '</aside>';
$layout .= '<div class="eight columns">';
$layout .= '<main class="eight columns">';
$layout .= $content;
$layout .= '</div>';
$layout .= '</main>';
$layout .= '</div>';
@@ -48,4 +48,20 @@ function NullSection($content, $options=array()) {
$options
);
}
function NullContainer($content) {
return NullTag('div', $content, array('class' => 'container'));
}
function NullMain($content, $options=array()) {
return NullTag('main',
NullTag(
'div',
$content,
array('class' => 'container')
),
$options
);
}
?>
@@ -105,7 +105,7 @@ function NullPostContentWithoutExcerpt() {
$content = str_replace(NullFirstParagraph(), "", $content);
// Remove that damned paragraph/span combination from the <!--more--> tag.
$content = preg_replace('/<p><span id="more-[0-9]"><\/span><\/p>/', "", $content);
$content = preg_replace('/<p><span id="more-([0-9])*"><\/span><\/p>/', "", $content);
return $content;
}
@@ -150,7 +150,7 @@ function NullPostThumbnail($size='medium', $placeholder=false) {
return NullTag('div', $content, $attr);
} else {
if ($placeholder) {
$attr = array('class' => 'thumbnail');
$attr = array('class' => 'thumbnail empty');
return NullTag('div', '&nbsp;', $attr);
} else {
$attr = array('class' => 'thumbnail empty');
@@ -68,4 +68,18 @@ function NullBodyClass(){
function NullIsFrontPage() {
return is_front_page();
}
function NullSiteCategories() {
$categories = get_categories();
$list = "";
foreach ($categories as $category) {
$list .= NullTag('li',
NullLink($category->cat_name, esc_url( get_category_link( $category->term_id ) )),
array('class' => 'category')
);
}
return NullTag('ul', $list, array('class' => 'categories'));
}
?>

0 comments on commit 7bc79d1

Please sign in to comment.