示例#1
0
文件: functions.php 项目: vrxm/htdocs
/**
 * Displays a dropdown of available slideshow themes
 * @param array $args
 */
function fa_themes_dropdown($args = array())
{
    $defaults = array('name' => false, 'id' => false, 'class' => '', 'selected' => false, 'use_keys' => true, 'hide_if_empty' => true, 'show_option_none' => __('No themes', 'fapro'), 'select_opt' => __('Choose theme', 'fapro'), 'echo' => true);
    if (isset($args['options'])) {
        unset($args['options']);
    }
    $themes = fa_get_themes();
    $options = array();
    foreach ($themes as $theme => $theme_data) {
        $options[$theme] = ucfirst(str_replace('_', ' ', $theme));
    }
    $defaults['options'] = $options;
    $args = wp_parse_args($args, $defaults);
    $dropdown = fa_dropdown($args);
    return $dropdown;
}
示例#2
0
					</td>
				</tr>
				
				
				<tr class="content-options" <?php 
fa_hide(!$show_content);
?>
>
					<th><label for="content-text-use"><?php 
_e('Get content from', 'fapro');
?>
:</label></th>	
					<td>
						<?php 
$args = array('options' => array('content' => __('Post content', 'fapro'), 'excerpt' => __('Post excerpt', 'fapro'), 'custom' => __('Custom text set for slide', 'fapro')), 'select_opt' => false, 'selected' => $options['content_text']['use'], 'name' => 'content_text[use]', 'id' => 'content-text-use');
fa_dropdown($args);
?>
						<p class="description">
							<?php 
_e('Where should the content for the slide be primarely retrieved from', 'fapro');
?>
<br />
							<?php 
_e('If set to excerpt or custom text, if they are empty, content will be retrieved from post content.', 'fapro');
?>
						</p>
					</td>
				</tr>
				<tr class="content-options" <?php 
fa_hide(!$show_content);
?>