Formatting

This commit is contained in:
Scott Walkinshaw
2012-09-19 14:46:06 -04:00
parent c707448a72
commit a54850cd44
2 changed files with 18 additions and 14 deletions

View File

@@ -246,7 +246,7 @@ function roots_caption($output, $attr, $content) {
$attr = shortcode_atts($defaults, $attr);
// If the width is less than 1 or there is no caption, return the content wrapped between the [caption] tags
if (1 > $attr['width'] || empty($attr['caption'])) {
if ($attr['width'] < 1 || empty($attr['caption'])) {
return $content;
}

View File

@@ -10,6 +10,7 @@ function roots_widgets_init() {
'before_title' => '<h3>',
'after_title' => '</h3>',
));
register_sidebar(array(
'name' => __('Footer', 'roots'),
'id' => 'sidebar-footer',
@@ -28,6 +29,7 @@ add_action('widgets_init', 'roots_widgets_init');
class Roots_Vcard_Widget extends WP_Widget {
function Roots_Vcard_Widget() {
$widget_ops = array('classname' => 'widget_roots_vcard', 'description' => __('Use this widget to add a vCard', 'roots'));
$this->WP_Widget('widget_roots_vcard', __('Roots: vCard', 'roots'), $widget_ops);
$this->alt_option_name = 'widget_roots_vcard';
@@ -64,6 +66,7 @@ class Roots_Vcard_Widget extends WP_Widget {
if (!isset($instance['email'])) { $instance['email'] = ''; }
echo $before_widget;
if ($title) {
echo $before_title;
echo $title;
@@ -100,6 +103,7 @@ class Roots_Vcard_Widget extends WP_Widget {
$this->flush_widget_cache();
$alloptions = wp_cache_get('alloptions', 'options');
if (isset($alloptions['widget_roots_vcard'])) {
delete_option('widget_roots_vcard');
}