Example #1
0
 function tb_options_field($caption, $description, $type)
 {
     if (empty($type) || !function_exists($func_name = 'tb_options_' . $type)) {
         return;
     }
     $args = func_get_args();
     tb_options_open_field($caption, $description);
     call_user_func_array($func_name, array_slice($args, 3));
     tb_options_close_field();
 }
Example #2
0
foreach (array('blogname' => __('Blog name', 'fastblog'), 'blogurl' => __('Blog URL', 'fastblog'), 'name' => __('Name field', 'fastblog'), 'email' => __('E-mail field', 'fastblog'), 'subject' => __('Subject field', 'fastblog')) as $variable => $label) {
    ?>
				<tr>
					<td><span class="description"><code>%<?php 
    echo $variable;
    ?>
%</code></span></td>
					<td><span class="description"><?php 
    echo $label;
    ?>
</span></td>
				</tr>
				<?php 
}
echo '</table>';
tb_options_close_field();
tb_options_field(__('Settings', 'fastblog'), '', 'checkbox', 'fastblog[contact_form][from_header]', fastblog_get_option('contact_form/from_header'), __('Override <code>From</code> header with <code>Name</code> field', 'fastblog'));
tb_options_close_section();
?>
		<!-- // Contact form options -->

		<!-- Advanced options -->
		<?php 
tb_options_open_section(__('Advanced', 'fastblog'));
tb_options_field(__('Custom CSS code', 'fastblog'), '', 'textarea_code', 'fastblog[custom_css]', fastblog_get_option('custom_css'));
tb_options_field(__('Custom JavaScript code', 'fastblog'), '', 'textarea_code', 'fastblog[custom_js]', fastblog_get_option('custom_js'));
tb_options_field(__('Bit.ly login', 'fastblog'), '', 'input_code', 'fastblog[bitly][login]', fastblog_get_option('bitly/login'), '(' . __('empty = default built-in', 'fastblog') . ')');
tb_options_field(__('Bit.ly API key', 'fastblog'), '', 'input_code', 'fastblog[bitly][api_key]', fastblog_get_option('bitly/api_key'), '(' . __('empty = default built-in', 'fastblog') . ')');
tb_options_close_section();
?>
		<!-- // Advanced options -->