示例#1
0
    echo 'bold';
}
?>
 <?php 
echo get_field('skinoptions_heading_align', 'options');
?>
"><a href="<?php 
the_permalink();
?>
"><?php 
the_title();
?>
</a></h2>
		</div>
		<div class="wysiwyg no-meta <?php 
font_sizes();
?>
">
			<?php 
the_content();
?>
			<?php 
if (is_single()) {
    ?>
				<?php 
    get_template_part('partials/blog-metas');
    ?>
			<?php 
}
?>
		</div>
示例#2
0
文件: fonts.php 项目: jjmas/jjmas.net
    //to-do
}
function font_sizes()
{
    $sizes = range(9, 110);
    $sizes = apply_filters('of_recognized_font_sizes', $sizes);
    $sizes = array_map(null, $sizes);
    $sizes = array_merge(array('-' => 'Font Size'), $sizes);
    return $sizes;
}
function font_styles()
{
    $styles = array('-' => __('Font Styles', NECTAR_THEME_NAME), '100' => __('100', NECTAR_THEME_NAME), '200' => __('200', NECTAR_THEME_NAME), '200italic' => __('200 Italic', NECTAR_THEME_NAME), '300' => __('300', NECTAR_THEME_NAME), '300italic' => __('300 Italic', NECTAR_THEME_NAME), 'regular' => __('Regular', NECTAR_THEME_NAME), 'italic' => __('Italic', NECTAR_THEME_NAME), '600' => __('600', NECTAR_THEME_NAME), '600italic' => __('600 Italic', NECTAR_THEME_NAME), '700' => __('700', NECTAR_THEME_NAME), '700italic' => __('700 Italic', NECTAR_THEME_NAME), '800' => __('800', NECTAR_THEME_NAME), '800italic' => __('800 Italic', NECTAR_THEME_NAME), '900' => __('900', NECTAR_THEME_NAME), '900italic' => __('900 Italic', NECTAR_THEME_NAME));
    return apply_filters('font_styles', $styles);
}
$typography_options = array('sizes' => font_sizes(), 'styles' => font_styles());
$sizes = $typography_options['sizes'];
$styles = $typography_options['styles'];
$font_sizes = null;
$font_styles = null;
$count = 0;
foreach ($sizes as $size) {
    $count++;
    $count == 1 ? $font_sizes['-'] = $size : ($font_sizes[$size . 'px'] = $size . 'px');
}
foreach ($styles as $weight => $style) {
    $font_styles[$weight] = $style;
}
$typography_mixed_fonts = array_merge(options_typography_get_os_fonts(), options_typography_get_google_fonts());
asort($typography_mixed_fonts);
$typography_mixed_fonts = array_merge(array('-' => 'Font Family'), $typography_mixed_fonts);