本文整理汇总了PHP中wpgrade::get_the_typo方法的典型用法代码示例。如果您正苦于以下问题:PHP wpgrade::get_the_typo方法的具体用法?PHP wpgrade::get_the_typo怎么用?PHP wpgrade::get_the_typo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wpgrade
的用法示例。
在下文中一共展示了wpgrade::get_the_typo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wpgrade_callback_enqueue_dynamic_css
function wpgrade_callback_enqueue_dynamic_css()
{
$style_query = array();
// if (wpgrade::option('main_color')) {
// $main_color = wpgrade::option('main_color');
// $main_color = str_replace('#', '', $main_color);
// $style_query['color'] = $main_color;
// }
if (wpgrade::option('use_google_fonts')) {
add_action('wp_head', 'wpgrade_callback_load_google_fonts');
$fonts_array = array('google_titles_font', 'google_second_font', 'google_nav_font', 'google_body_font');
foreach ($fonts_array as $font) {
$the_font = wpgrade::get_the_typo($font);
// var_dump($the_font);
if (!empty($the_font)) {
$style_query['fonts'][$font] = $the_font;
}
}
}
// if (wpgrade::option('portfolio_text_color')) {
// $port_color = wpgrade::option('portfolio_text_color');
// $port_color = str_replace('#', '', $port_color);
// $style_query['port_color'] = $port_color;
// }
if (wpgrade::option('inject_custom_css') == 'file') {
wp_enqueue_style('wpgrade-custom-style', get_template_directory_uri() . '/theme-content/css/custom.css');
}
}
示例2: array
// @TODO make from this a method used also in customizer
wpgrade::display_dynamic_css_rule($rule, $key, $option_value);
}
}
}
}
}
}
/* for PRO users! - *
*======= TYPOGRAPHY
*/
$fonts = array();
if (wpgrade::option('use_google_fonts')) {
$fonts_array = array('google_titles_font', 'google_subtitles_font', 'google_nav_font', 'google_body_font');
foreach ($fonts_array as $font) {
$the_font = wpgrade::get_the_typo($font);
if (isset($the_font['font-family']) && !empty($the_font['font-family'])) {
$fonts[$font] = $the_font;
}
}
}
if (isset($fonts['google_titles_font'])) {
?>
/* for PRO users! - Titles classes here */
h1, h2, h3, h4, h5, h6, hgroup,
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
blockquote,
.tabs__nav, .popular-posts__time,
.pagination li a, .pagination li span{
<?php
wpgrade::display_font_params($fonts['google_titles_font']);