Exemplo n.º 1
0
 function widget($args, $instance)
 {
     extract($args);
     $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
     $color = isset($instance['color']) ? $instance['color'] : 'default';
     $color = empty($color) ? 'default' : $color;
     echo $before_widget;
     if ($title) {
         echo $before_title . $title . $after_title;
     }
     if (ci_setting('social_rss_show') == 'enabled') {
         echo '<a href="' . esc_url(ci_rss_feed()) . '" class="icn rss ' . esc_attr($color) . '" title="' . esc_attr(ci_setting('social_rss_text')) . '">' . ci_setting('social_rss_text') . '</a>';
     }
     $services = ci_social_services();
     foreach ($services as $key => $value) {
         $enabled = ci_setting('social_' . $key . '_show');
         $url = ci_setting('social_' . $key . '_url');
         $text = ci_setting('social_' . $key . '_text');
         if ($enabled == 'enabled' and !empty($url)) {
             echo '<a href="' . esc_url($url) . '" class="icn ' . esc_attr($key) . ' ' . esc_attr($color) . '" title="' . esc_attr($text) . '">' . $text . '</a>';
         }
     }
     echo $after_widget;
 }
Exemplo n.º 2
0
    ?>
</label>
				<input id="<?php 
    echo esc_attr($fieldname);
    ?>
" type="text" size="60" name="<?php 
    echo esc_attr(THEME_OPTIONS . '[' . $fieldname . ']');
    ?>
" value="<?php 
    echo esc_attr($ci[$fieldname]);
    ?>
" />
			</fieldset>
		</fieldset>
		<?php 
    $services = ci_social_services();
    ?>
		<?php 
    foreach ($services as $key => $value) {
        ?>
			<?php 
        $field_show = 'social_' . $key . '_show';
        $field_url = 'social_' . $key . '_url';
        $field_text = 'social_' . $key . '_text';
        ?>
			<fieldset class="social-set">
				<fieldset>
					<input type="checkbox" class="check" id="<?php 
        echo esc_attr($field_show);
        ?>
" name="<?php