• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ot_fetch_google_fonts函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中ot_fetch_google_fonts函数的典型用法代码示例。如果您正苦于以下问题:PHP ot_fetch_google_fonts函数的具体用法?PHP ot_fetch_google_fonts怎么用?PHP ot_fetch_google_fonts使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了ot_fetch_google_fonts函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: ot_recognized_google_font_families

 function ot_recognized_google_font_families($field_id)
 {
     $families = array();
     $ot_google_fonts = get_theme_mod('ot_google_fonts', array());
     // Forces an array rebuild when we sitch themes
     if (empty($ot_google_fonts)) {
         $ot_google_fonts = ot_fetch_google_fonts(true, true);
     }
     foreach ((array) $ot_google_fonts as $key => $item) {
         if (isset($item['family'])) {
             $families[$key] = $item['family'];
         }
     }
     return apply_filters('ot_recognized_google_font_families', $families, $field_id);
 }
开发者ID:ex0ample,项目名称:JindaAds,代码行数:15,代码来源:ot-functions-admin.php


示例2: retrieve_google_font

 /**
  * Returns a JSON encoded Google fonts array.
  *
  * @return    array
  *
  * @access    public
  * @since     2.5.0
  */
 public function retrieve_google_font()
 {
     if (isset($_POST['field_id'], $_POST['family'])) {
         ot_fetch_google_fonts();
         echo json_encode(array('variants' => ot_recognized_google_font_variants($_POST['field_id'], $_POST['family']), 'subsets' => ot_recognized_google_font_subsets($_POST['field_id'], $_POST['family'])));
         exit;
     }
 }
开发者ID:b0123498765,项目名称:fithealthyandwealthy,代码行数:16,代码来源:ot-loader.php


示例3: display_setting

 /**
  * Callback for add_settings_field() to build each setting by type
  *
  * @param     array     Setting object array
  * @return    string
  *
  * @access    public
  * @since     2.0
  */
 public function display_setting($args = array())
 {
     extract($args);
     /* get current saved data */
     $options = get_option($get_option, false);
     // Set field value
     $field_value = isset($options[$id]) ? $options[$id] : '';
     /* set standard value */
     if (isset($std)) {
         $field_value = ot_filter_std_value($field_value, $std);
     }
     // Allow the descriptions to be filtered before being displayed
     $desc = apply_filters('ot_filter_description', isset($desc) ? $desc : '', $id);
     /* build the arguments array */
     $_args = array('type' => $type, 'field_id' => $id, 'field_name' => $get_option . '[' . $id . ']', 'field_value' => $field_value, 'field_desc' => $desc, 'field_std' => isset($std) ? $std : '', 'field_rows' => isset($rows) && !empty($rows) ? $rows : 15, 'field_post_type' => isset($post_type) && !empty($post_type) ? $post_type : 'post', 'field_taxonomy' => isset($taxonomy) && !empty($taxonomy) ? $taxonomy : 'category', 'field_min_max_step' => isset($min_max_step) && !empty($min_max_step) ? $min_max_step : '0,100,1', 'field_condition' => isset($condition) && !empty($condition) ? $condition : '', 'field_operator' => isset($operator) && !empty($operator) ? $operator : 'and', 'field_class' => isset($class) ? $class : '', 'field_choices' => isset($choices) && !empty($choices) ? $choices : array(), 'field_settings' => isset($settings) && !empty($settings) ? $settings : array(), 'post_id' => ot_get_media_post_ID(), 'get_option' => $get_option);
     // Limit DB queries for Google Fonts.
     if ($type == 'google-fonts') {
         ot_fetch_google_fonts();
         ot_set_google_fonts($id, $field_value);
     }
     /* get the option HTML */
     echo ot_display_by_type($_args);
 }
开发者ID:Juliaandavid,项目名称:securexa,代码行数:32,代码来源:ot-settings-api.php



注:本文中的ot_fetch_google_fonts函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ot_filter_std_value函数代码示例发布时间:2022-05-15
下一篇:
PHP ot_encode函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap