Exemplo n.º 1
0
		<!-- // Post options -->

		<!-- Page options -->
		<?php 
tb_options_open_section(__('Page', 'fastblog'));
tb_options_field(__('Settings', 'fastblog'), '', 'checkbox', "fastblog[page][hide_title]", fastblog_get_option('page/hide_title'), __("Don't display page titles on pages", 'fastblog'));
tb_options_field(__('Page meta', 'fastblog'), '', 'checkbox_group', "fastblog[page][meta]", fastblog_get_option('page/meta'), array('date' => __('Modification date', 'fastblog'), 'comments' => __('Comments number', 'fastblog'), 'admin_edit' => __('Admin edit link', 'fastblog')));
tb_options_close_section();
?>
		<!-- // Page options -->

		<!-- Typography options -->
		<?php 
tb_options_open_section(__('Typography', 'fastblog'));
$fonts = array('' => '(' . __('None', 'fastblog') . ')');
foreach (tb_get_directory(TEMPLATEPATH . '/js/fonts') as $filename) {
    if ($fontfamily = tb_cufon_font_get_name(TEMPLATEPATH . '/js/fonts/' . $filename)) {
        $fonts[$filename . '|' . $fontfamily] = $fontfamily;
    }
}
tb_options_open_field(__('Fonts', 'fastblog'));
$typografy_fonts_captions = array('logo' => __('Logo', 'fastblog'), 'tagline' => __('Tagline', 'fastblog'), 'menu' => __('Menu', 'fastblog'), 'post_title' => __('Post/page title', 'fastblog'), 'widget_title' => __('Widget title', 'fastblog'), 'headlines' => __('Headlines', 'fastblog'), 'shortcode' => __('Cufon shortcode', 'fastblog'), 'other' => __('Other elements', 'fastblog'), 'custom' => __('Custom elements', 'fastblog'));
echo '<table class="clear">';
foreach (fastblog_get_option('typography/fonts') as $element => $font) {
    echo '<tr><td>' . $typografy_fonts_captions[$element] . '</td><td>';
    tb_options_select("fastblog[typography][fonts][{$element}]", $font, $fonts);
    echo '</td></tr>';
}
echo '</table>';
tb_options_description(__('If you use more than one version of the Myriad font, select the biggest version you need for all of them.', 'fastblog'));
tb_options_close_field();
Exemplo n.º 2
0
 function form($instance)
 {
     $socialmedia_options[''] = '(' . __('None', 'fastblog') . ')';
     foreach (tb_get_directory(TEMPLATEPATH . '/images/socialmedia', 'png', true) as $filename) {
         $socialmedia_options[$filename] = str_replace('-', ' ', ucfirst($filename));
     }
     echo '<p>';
     tb_widgets_input($this, 'title', isset($instance['title']) ? $instance['title'] : '', __('Title', 'fastblog'));
     echo '</p><p>';
     tb_widgets_select($this, 'target', isset($instance['target']) ? $instance['target'] : 'self', array('self' => __('Same window', 'fastblog'), 'blank' => __('New window', 'fastblog')), __('Open links in', 'fastblog'));
     echo '</p>';
     for ($i = 0; $i < $this->icons_count; $i++) {
         extract($this->get_socialmedia($instance, $i));
         echo '<p style="margin-bottom: 5px;">';
         tb_widgets_select($this, "socialmedia_{$i}_icon", $icon, $socialmedia_options, $i + 1 . '. ' . __('Icon & URL', 'fastblog'));
         echo '</p><p>';
         tb_widgets_input($this, "socialmedia_{$i}_url", $url);
         echo '</p>';
     }
 }