complete rewrite of theme options, based on twentyeleven (in progress)

This commit is contained in:
Ben Word
2011-05-30 01:33:28 -06:00
parent 251e17bdb0
commit 91d81ddb6e
12 changed files with 198 additions and 210 deletions

View File

@@ -161,7 +161,6 @@ input::-moz-focus-inner, button::-moz-focus-inner { border: 0; padding: 0; }
.hentry h1 { line-height: 1.2em; margin-bottom: 0.2em; }
.hentry h2:first-child { line-height: 1.2em; margin-bottom: 0; }
.hentry h2 a { text-decoration: none; }
.hentry iframe.twitter-share-button { position: absolute; top: 0; right: 0; width: 110px; height: 20px; }
.hentry time { display: block; font-size: 1.2em; position: relative; }
.hentry p.byline { }
@@ -219,12 +218,6 @@ figure.gallery-item figcaption { display: none; }
#content-info p.copy small { font-size: 1em; }
#content-info p.social .twitter-share-button { float: left; }
#content-info p.social .fb_iframe_widget { float: left; }
#content-info p.vcard { position: absolute; top: 0; right: 0; margin: 0; text-align: right; }
#content-info p.vcard a.fn { font-size: 14px; }
/* WIDGETS & PLUGINS
--------------------------------------------------------------------------------------------------------------------------------------------------- */

View File

@@ -4,27 +4,7 @@
<div class="container">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Footer") ) : ?>
<?php endif; ?>
<p class="copy"><small>&copy; <?php echo date('Y'); ?> <?php bloginfo('name'); ?></small></p>
<?php if (get_option('roots_footer_social_share') == 'checked') { ?>
<p class="social">
<a href="http://twitter.com/share" class="twitter-share-button" data-url="<?php echo home_url('/'); ?>" data-count="horizontal"><?php _e('Tweet', 'roots');?></a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo home_url('/'); ?>&amp;layout=button_count&amp;show_faces=false&amp;width=110&amp;action=like&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:110px; height:21px;" allowTransparency="true"></iframe>
</p>
<?php } ?>
<?php if (get_option('roots_footer_vcard') == 'checked') { ?>
<p class="vcard">
<a class="fn org url" href="<?php echo home_url('/'); ?>"><?php bloginfo('name'); ?></a><br>
<span class="adr">
<span class="street-address"><?php echo get_option('roots_vcard_street-address'); ?></span><br>
<span class="locality"><?php echo get_option('roots_vcard_locality'); ?></span>,
<span class="region"><?php echo get_option('roots_vcard_region'); ?></span>
<span class="postal-code"><?php echo get_option('roots_vcard_postal-code'); ?></span><br>
</span>
<span class="tel"><span class="value"><span class="hidden">+1-</span><?php echo get_option('roots_vcard_tel'); ?></span></span><br>
<a class="email" href="mailto:<?php echo get_option('roots_vcard_email'); ?>"><?php echo get_option('roots_vcard_email'); ?></a>
</p>
<?php } ?>
</div>
</footer>
<?php roots_footer_after(); ?>

View File

@@ -14,7 +14,8 @@ include_once('inc/roots-custom.php'); // custom functions
$theme_name = next(explode('/themes/', get_template_directory()));
// set the value of the main container class depending on the selected grid framework
$roots_css_framework = get_option('roots_css_framework');
$options = roots_get_theme_options();
$roots_css_framework = $options['css_grid_framework'];
if (!defined('roots_container_class')) {
switch ($roots_css_framework) {
case 'blueprint': define('roots_container_class', 'span-24'); break;
@@ -27,7 +28,9 @@ if (!defined('roots_container_class')) {
}
function get_roots_stylesheets() {
$roots_css_framework = get_option('roots_css_framework');
$options = roots_get_theme_options();
$roots_css_framework = $options['css_grid_framework'];
$template_uri = get_template_directory_uri();
$styles = '';

View File

@@ -23,9 +23,13 @@
<?php roots_head(); ?>
<script src="<?php echo get_template_directory_uri(); ?>/js/scripts.js"></script>
<?php if (get_option('roots_google_analytics') !== "") { ?>
<?php
$options = roots_get_theme_options();
$google_analytics_id = $options['google_analytics_id'];
if ($google_analytics_id !== '') { ?>
<script>
var _gaq=[['_setAccount','<?php echo get_option('roots_google_analytics') ?>'],['_trackPageview'],['_trackPageLoadTime']];
var _gaq=[['_setAccount','<?php echo esc_attr($options['google_analytics_id']); ?>'],['_trackPageview'],['_trackPageLoadTime']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));

View File

@@ -1,29 +0,0 @@
/* theme options */
#tabs { margin-top: 1em; }
body.toplevel_page_roots .ui-widget { font-size: 1em !important; font-family: inherit !important; }
body.toplevel_page_roots .ui-widget-header {
/* match #wp-head */
background: #d9d9d9;
background: -moz-linear-gradient(bottom, #d7d7d7, #e4e4e4) !important;
background: -webkit-gradient(linear, left bottom, left top, from(#d7d7d7), to(#e4e4e4)) !important;
}
body.toplevel_page_roots .ui-state-default,
body.toplevel_page_roots .ui-widget-content .ui-state-default,
body.toplevel_page_roots .ui-widget-header .ui-state-default {
/* match #adminmenu a.menu-top */
background: url(../images/menu-bits.gif) repeat-x scroll left -379px #F1F1F1 !important;
}
body.toplevel_page_roots .ui-state-active,
body.toplevel_page_roots .ui-widget-content .ui-state-active,
body.toplevel_page_roots .ui-widget-header .ui-state-active { background: #fff !important; }
ul.options li { clear: both; margin-bottom: 8px; }
ul.options li .container { float: left; }
ul.options label.settings-label { font-size: 1em; font-weight: 700; float: left; width: 250px; margin: 3px 0 0 0; }
ul.options input.text { float: left; width: 300px; }
ul.options span.note { clear: both; float: left; margin: 2px 0 8px 250px; display: block; font-size: 0.8em; line-height: 1.5em; }
ul.options div.address { float: left; }
ul.options div.address label { clear: both; float: left; width: 160px; margin: 3px 10px 0 0; }
ul.options div.address input.text { float: left; width: 200px; }

View File

View File

@@ -2,6 +2,5 @@ jQuery.noConflict();
jQuery(document).ready(function(){
jQuery("#tabs").tabs();
});

View File

@@ -7,34 +7,44 @@ add_action('roots_footer_before', 'roots_1140_footer_before');
add_action('roots_footer_after', 'roots_1140_footer_after');
function roots_1140_head() {
$options = roots_get_theme_options();
$roots_css_framework = $options['css_grid_framework'];
$template_uri = get_template_directory_uri();
if (get_option('roots_css_framework') === '1140') {
if ($roots_css_framework === '1140') {
echo "<script src=\"$template_uri/js/css3-mediaqueries.js\"></script>";
}
}
function roots_1140_header_before() {
if (get_option('roots_css_framework') === '1140') {
$options = roots_get_theme_options();
$roots_css_framework = $options['css_grid_framework'];
if ($roots_css_framework === '1140') {
echo "<div class=\"row\">";
}
}
function roots_1140_header_after() {
if (get_option('roots_css_framework') === '1140') {
$options = roots_get_theme_options();
$roots_css_framework = $options['css_grid_framework'];
if ($roots_css_framework === '1140') {
echo "</div><!-- /.row -->";
echo "<div class=\"row\">";
}
}
function roots_1140_footer_before() {
if (get_option('roots_css_framework') === '1140') {
$options = roots_get_theme_options();
$roots_css_framework = $options['css_grid_framework'];
if ($roots_css_framework === '1140') {
echo "</div><!-- /.row -->";
echo "<div class=\"row\">";
}
}
function roots_1140_footer_after() {
if (get_option('roots_css_framework') === '1140') {
$options = roots_get_theme_options();
$roots_css_framework = $options['css_grid_framework'];
if ($roots_css_framework === '1140') {
echo "</div><!-- /.row -->";
}
}

View File

@@ -1,145 +1,186 @@
<?php
// create custom plugin settings menu
add_action('admin_menu', 'roots_create_menu');
function roots_admin_enqueue_scripts($hook_suffix) {
if ($hook_suffix != 'appearance_page_theme_options')
return;
function roots_create_menu() {
$home_url = home_url();
$theme_name = next(explode('/themes/', get_template_directory()));
$icon = "$home_url/wp-content/themes/$theme_name/inc/img/icon-roots.png";
// create menu
$theme_name = get_current_theme();
add_object_page($theme_name . ' Settings', $theme_name, 'administrator', 'roots', 'roots_settings_page', $icon);
// call register settings function
add_action('admin_init', 'roots_register_settings');
// add js
wp_enqueue_script('jquery-ui-tabs');
// add css
add_action('admin_print_styles-toplevel_page_roots', 'roots_admin_styles');
}
function roots_admin_styles() {
$home_url = home_url();
$theme_name = next(explode('/themes/', get_template_directory()));
wp_register_style('roots_options_css', "$home_url/wp-content/themes/$theme_name/inc/css/options.css");
wp_enqueue_style('roots_options_css');
wp_enqueue_style('roots-theme-options', "$home_url/wp-content/themes/$theme_name/inc/css/theme-options.css");
wp_enqueue_script('roots-theme-options', "$home_url/wp-content/themes/$theme_name/inc/js/theme-options.js");
}
add_action('admin_enqueue_scripts', 'roots_admin_enqueue_scripts');
wp_register_script('roots_options_js', "$home_url/wp-content/themes/$theme_name/inc/js/options.js");
wp_enqueue_script('roots_options_js');
function roots_theme_options_init() {
wp_register_style('jquery-ui-css', "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/themes/smoothness/jquery-ui.css");
wp_enqueue_style('jquery-ui-css');
if (false === roots_get_theme_options())
add_option('roots_theme_options', roots_get_default_theme_options());
register_setting(
'roots_options',
'roots_theme_options',
'roots_theme_options_validate'
);
}
add_action('admin_init', 'roots_theme_options_init');
function roots_option_page_capability($capability) {
return 'edit_theme_options';
}
add_filter('option_page_capability_roots_options', 'roots_option_page_capability');
function roots_theme_options_add_page() {
add_theme_page(
__('Theme Options', 'roots'),
__('Theme Options', 'roots'),
'edit_theme_options',
'theme_options',
'theme_options_render_page'
);
}
add_action('admin_menu', 'roots_theme_options_add_page');
function roots_grid_framework() {
$grid_options = array(
'blueprint' => array(
'value' => 'blueprint',
'label' => __('Blueprint CSS', 'roots'),
),
'960gs_12' => array(
'value' => '960gs_12',
'label' => __('960gs (12 cols)', 'roots'),
),
'960gs_16' => array(
'value' => '960gs_16',
'label' => __('960gs (16 cols)', 'roots'),
),
'960gs_24' => array(
'value' => '960gs_24',
'label' => __('960gs (24 cols)', 'roots'),
),
'1140' => array(
'value' => '1140',
'label' => __('1140', 'roots'),
),
);
return apply_filters('roots_grid_framework', $grid_options);
}
function roots_register_settings() {
// register our settings
register_setting('roots-settings-group', 'roots_css_framework');
register_setting('roots-settings-group', 'roots_main_class');
register_setting('roots-settings-group', 'roots_sidebar_class');
register_setting('roots-settings-group', 'roots_google_analytics');
register_setting('roots-settings-group', 'roots_post_author');
register_setting('roots-settings-group', 'roots_post_tweet');
register_setting('roots-settings-group', 'roots_footer_social_share');
register_setting('roots-settings-group', 'roots_vcard_street-address');
register_setting('roots-settings-group', 'roots_vcard_locality');
register_setting('roots-settings-group', 'roots_vcard_region');
register_setting('roots-settings-group', 'roots_vcard_postal-code');
register_setting('roots-settings-group', 'roots_vcard_tel');
register_setting('roots-settings-group', 'roots_vcard_email');
register_setting('roots-settings-group', 'roots_footer_vcard');
function roots_get_default_theme_options() {
$default_theme_options = array(
'css_grid_framework' => 'blueprint',
'css_main_class' => 'span-14 append-1',
'css_sidebar_class' => 'span-8 prepend-1 last',
'google_analytics_id' => ''
);
// add default settings
add_option('roots_css_framework', 'blueprint');
add_option('roots_main_class', 'span-14 append-1');
add_option('roots_sidebar_class', 'span-8 prepend-1 last');
add_option('roots_google_analytics', '');
return apply_filters('roots_default_theme_options', $default_theme_options);
}
function roots_settings_page() { ?>
function roots_get_theme_options() {
return get_option('roots_theme_options');
}
<div class="wrap">
<div id="icon-options-general" class="icon32"></div>
<h2><?php echo get_current_theme(); ?> Settings</h2>
function theme_options_render_page() {
?>
<div class="wrap">
<?php screen_icon(); ?>
<h2><?php printf(__('%s Theme Options', 'roots'), get_current_theme()); ?></h2>
<?php settings_errors(); ?>
<?php if (isset($_GET['settings-updated']) && $_GET['settings-updated'] === 'true') { ?>
<div id="setting-error-settings_updated" class="updated settings-error"><p><strong>Settings saved.</strong></p></div>
<?php } ?>
<form method="post" action="options.php">
<?php
settings_fields('roots_options');
$options = roots_get_theme_options();
$default_options = roots_get_default_theme_options();
?>
<form method="post" action="options.php">
<table class="form-table">
<?php settings_fields('roots-settings-group'); ?>
<tr valign="top" class="radio-option"><th scope="row"><?php _e('CSS Grid Framework', 'roots'); ?></th>
<td>
<fieldset><legend class="screen-reader-text"><span><?php _e('CSS Grid Framework', 'roots'); ?></span></legend>
<?php
foreach (roots_grid_framework() as $grid_framework) {
?>
<div class="layout">
<label class="description">
<input type="radio" name="roots_theme_options[css_grid_framework]" value="<?php echo esc_attr($grid_framework['value']); ?>" <?php checked($options['css_grid_framework'], $grid_framework['value']); ?> />
<span>
<?php echo $grid_framework['label']; ?>
</span>
</label>
</div>
<?php
}
?>
</fieldset>
</td>
</tr>
<div id="tabs">
<ul>
<li><a href="#general">General</a></li>
</ul>
<div id="general">
<ul class="options clearfix">
<li class="clearfix">
<label class="settings-label">CSS Grid Framework</label>
<div class="container">
<input id="roots_blueprint" name="roots_css_framework" type="radio" <?php echo get_option('roots_css_framework') === 'blueprint' ? 'checked' : ''; ?> value="blueprint" /> <label for="roots_blueprint">Blueprint CSS</label><br />
<input id="roots_960gs_12" name="roots_css_framework" type="radio" <?php echo get_option('roots_css_framework') === '960gs_12' ? 'checked' : ''; ?> value="960gs_12" /> <label for="roots_960gs_12">960gs (12 cols)</label><br />
<input id="roots_960gs_16" name="roots_css_framework" type="radio" <?php echo get_option('roots_css_framework') === '960gs_16' ? 'checked' : ''; ?> value="960gs_16" /> <label for="roots_960gs_16">960gs (16 cols)</label><br />
<input id="roots_960gs_24" name="roots_css_framework" type="radio" <?php echo get_option('roots_css_framework') === '960gs_24' ? 'checked' : ''; ?> value="960gs_24" /> <label for="roots_960gs_24">960gs (24 cols)</label><br />
<input id="roots_1140" name="roots_css_framework" type="radio" <?php echo get_option('roots_css_framework') === '1140' ? 'checked' : ''; ?> value="1140" /> <label for="roots_1140">1140</label>
</div>
</li>
<li>
<label class="settings-label">Class for #main</label>
<input name="roots_main_class" type="text" value="<?php echo get_option('roots_main_class'); ?>" class="text" />
<span class="note">Enter your grid classes</span>
</li>
<li>
<label class="settings-label">Class for #sidebar</label>
<input name="roots_sidebar_class" type="text" value="<?php echo get_option('roots_sidebar_class'); ?>" class="text" />
<span class="note">Enter your grid classes</span>
</li>
<li>
<label class="settings-label">Google Analytics Tracking ID</label>
<input name="roots_google_analytics" type="text" value="<?php echo get_option('roots_google_analytics'); ?>" class="text" />
<span class="note">Enter your UA-XXXXX-X ID</span>
</li>
<li>
<label class="settings-label">Display Post Author</label>
<input id="roots_post_author" name="roots_post_author" type="checkbox" <?php echo get_option('roots_post_author') === 'checked' ? 'checked' : ''; ?> value="checked" /> <label for="roots_post_author">Show the post author</label>
</li>
<li>
<label class="settings-label">Post Tweet Button</label>
<input id="roots_post_tweet" name="roots_post_tweet" type="checkbox" <?php echo get_option('roots_post_tweet') === 'checked' ? 'checked' : ''; ?> value="checked" /> <label for="roots_post_tweet">Enable Tweet button on posts</label>
</li>
<li>
<label class="settings-label">Footer Social Share Buttons</label>
<input id="roots_footer_social_share" name="roots_footer_social_share" type="checkbox" <?php echo get_option('roots_footer_social_share') === 'checked' ? 'checked' : ''; ?> value="checked" /> <label for="roots_footer_social_share">Enable official Twitter and Facebook buttons in the footer</label>
</li>
<li>
<label class="settings-label">Footer vCard</label>
<input id="roots_footer_vcard" name="roots_footer_vcard" type="checkbox" <?php echo get_option('roots_footer_vcard') === 'checked' ? 'checked' : ''; ?> value="checked" /> <label for="roots_footer_vcard">Enable vCard in the footer</label>
</li>
<li class="clearfix">
<label class="settings-label">vCard Information</label>
<div class="address">
<label for="roots_vcard_street-address">Street Address</label> <input id="roots_vcard_street-address" name="roots_vcard_street-address" type="text" value="<?php echo get_option('roots_vcard_street-address'); ?>" class="text" />
<label for="roots_vcard_locality">City</label> <input id="roots_vcard_locality" name="roots_vcard_locality" type="text" value="<?php echo get_option('roots_vcard_locality'); ?>" class="text" />
<label for="roots_vcard_region">State</label> <input id="roots_vcard_region" name="roots_vcard_region" type="text" value="<?php echo get_option('roots_vcard_region'); ?>" class="text" />
<label for="roots_vcard_postal-code">Zipcode</label> <input id="roots_vcard_postal-code" name="roots_vcard_postal-code" type="text" value="<?php echo get_option('roots_vcard_postal-code'); ?>" class="text" />
<label for="roots_vcard_tel">Telephone Number</label> <input id="roots_vcard_tel" name="roots_vcard_tel" type="text" value="<?php echo get_option('roots_vcard_tel'); ?>" class="text" />
<label for="roots_vcard_email">Email Address</label> <input id="roots_vcard_email" name="roots_vcard_email" type="text" value="<?php echo get_option('roots_vcard_email'); ?>" class="text" />
</div>
</li>
</ul>
</div>
</div>
<tr valign="top"><th scope="row"><?php _e('#main CSS Classes', 'roots'); ?></th>
<td>
<fieldset><legend class="screen-reader-text"><span><?php _e('#main CSS Classes', 'roots'); ?></span></legend>
<input type="text" name="roots_theme_options[css_main_class]" id="css_main_class" value="<?php echo esc_attr($options['css_main_class']); ?>" />
<br />
<small class="description"><?php printf( __('Default: %s', 'roots'), $default_options['css_main_class']); ?></small>
</fieldset>
</td>
</tr>
<p class="submit">
<input type="submit" class="button-primary" value="Save Changes" />
</p>
<tr valign="top"><th scope="row"><?php _e('#sidebar CSS Classes', 'roots'); ?></th>
<td>
<fieldset><legend class="screen-reader-text"><span><?php _e('#sidebar CSS Classes', 'roots'); ?></span></legend>
<input type="text" name="roots_theme_options[css_sidebar_class]" id="css_sidebar_class" value="<?php echo esc_attr($options['css_sidebar_class']); ?>" />
<br />
<small class="description"><?php printf( __('Default: %s', 'roots'), $default_options['css_sidebar_class']); ?></small>
</fieldset>
</td>
</tr>
</form>
</div>
<?php } ?>
<tr valign="top"><th scope="row"><?php _e('Google Analytics ID', 'roots'); ?></th>
<td>
<fieldset><legend class="screen-reader-text"><span><?php _e('Google Analytics ID', 'roots'); ?></span></legend>
<input type="text" name="roots_theme_options[google_analytics_id]" id="google_analytics_id" value="<?php echo esc_attr($options['google_analytics_id']); ?>" />
<br />
<small class="description"><?php printf( __('Enter your UA-XXXXX-X ID', 'roots')); ?></small>
</fieldset>
</td>
</tr>
</table>
<?php submit_button(); ?>
</form>
</div>
<?php
}
function roots_theme_options_validate($input) {
$output = $defaults = roots_get_default_theme_options();
if (isset( $input['css_grid_framework']) && array_key_exists($input['css_grid_framework'], roots_grid_framework()))
$output['css_grid_framework'] = $input['css_grid_framework'];
if (isset($input['css_main_class']))
$output['css_main_class'] = $input['css_main_class'];
if (isset($input['css_sidebar_class']))
$output['css_sidebar_class'] = $input['css_sidebar_class'];
if (isset($input['google_analytics_id']))
$output['google_analytics_id'] = $input['google_analytics_id'];
// Link color must be 3 or 6 hexadecimal characters
// if ( isset( $input['link_color'] ) && preg_match( '/^#?([a-f0-9]{3}){1,2}$/i', $input['link_color'] ) )
// $output['link_color'] = '#' . strtolower( ltrim( $input['link_color'], '#' ) );
return apply_filters('roots_theme_options_validate', $output, $input, $defaults);
}
?>

View File

@@ -14,11 +14,7 @@
<header>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<time pubdate datetime="<?php the_time('c'); ?>"><?php printf(__('Posted on %s at %s.', 'roots'), get_the_time('l, F jS, Y'), get_the_time()); ?></time>
<?php if (get_option('roots_post_author') == 'checked') { ?>
<p class="byline author vcard">
<?php _e('Written by', 'roots'); ?> <span class="fn"><?php the_author(); ?></span>
</p>
<?php } ?>
<p class="byline author vcard"><?php _e('Written by', 'roots'); ?> <span class="fn"><?php the_author(); ?></span></p>
</header>
<div class="entry-content">
<?php the_excerpt(); ?>

View File

@@ -6,14 +6,9 @@
<header>
<h1 class="entry-title"><?php the_title(); ?></h1>
<time class="updated" datetime="<?php the_time('c'); ?>" pubdate><?php printf(__('Posted on %s at %s.', 'roots'), get_the_time('l, F jS, Y'),get_the_time())?></time>
<?php if (get_option('roots_post_author') == 'checked') { ?>
<p class="byline author vcard">
<?php _e('Written by', 'roots');?> <span class="fn"><?php the_author(); ?></span>
</p>
<?php } ?>
<?php if (get_option('roots_post_tweet') == 'checked') { ?>
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal"><?php _e('Tweet', 'roots');?></a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
<?php } ?>
</header>
<div class="entry-content">
<?php the_content(); ?>

View File

@@ -14,18 +14,14 @@
<header>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<time pubdate datetime="<?php the_time('c'); ?>"><?php printf( __('Posted on %s at %s.','roots'), get_the_time('l, F jS, Y'), get_the_time()) ?></time>
<?php if (get_option('roots_post_author') == 'checked') { ?>
<p class="byline author vcard">
<?php _e('Written by', 'roots');?> <span class="fn"><?php the_author(); ?></span>
</p>
<?php } ?>
<p class="byline author vcard"><span class="fn"><?php the_author(); ?></span></p>
</header>
<div class="entry-content">
<?php if (is_archive() || is_search()) : // Only display excerpts for archives and search ?>
<?php if (is_archive() || is_search()) : // Only display excerpts for archives and search ?>
<?php the_excerpt(); ?>
<?php else : ?>
<?php else : ?>
<?php the_content(); ?>
<?php endif; ?>
<?php endif; ?>
</div>
<footer>
<?php $tag = get_the_tags(); if (!$tag) { } else { ?><p><?php the_tags(); ?></p><?php } ?>