Changeset 2010492
- Timestamp:
- 01/11/2019 10:30:52 AM (7 years ago)
- Location:
- ts-webfonts-for-conoha
- Files:
-
- 23 added
- 5 edited
-
tags/1.0.1 (added)
-
tags/1.0.1/.svnignore (added)
-
tags/1.0.1/inc (added)
-
tags/1.0.1/inc/admin-base.php (added)
-
tags/1.0.1/inc/admin-fonttheme.php (added)
-
tags/1.0.1/inc/admin-root.php (added)
-
tags/1.0.1/inc/app.js (added)
-
tags/1.0.1/inc/assets (added)
-
tags/1.0.1/inc/assets/css (added)
-
tags/1.0.1/inc/assets/css/admin.css (added)
-
tags/1.0.1/inc/assets/css/common.css (added)
-
tags/1.0.1/inc/assets/react (added)
-
tags/1.0.1/inc/assets/react/app.jsx (added)
-
tags/1.0.1/inc/assets/react/functions (added)
-
tags/1.0.1/inc/assets/react/functions/events.jsx (added)
-
tags/1.0.1/inc/class (added)
-
tags/1.0.1/inc/class/class.auth.php (added)
-
tags/1.0.1/inc/class/class.font.data.php (added)
-
tags/1.0.1/inc/class/class.fonttheme.php (added)
-
tags/1.0.1/inc/font.json (added)
-
tags/1.0.1/readme.txt (added)
-
tags/1.0.1/ts-webfonts-for-conoha.php (added)
-
tags/1.0.1/typesquare-admin.php (added)
-
trunk/inc/class/class.font.data.php (modified) (1 diff)
-
trunk/inc/class/class.fonttheme.php (modified) (4 diffs)
-
trunk/inc/font.json (modified) (1 diff)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/ts-webfonts-for-conoha.php (modified) (17 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ts-webfonts-for-conoha/trunk/inc/class/class.font.data.php
r1947141 r2010492 79 79 $default_param = array( 80 80 'font_theme' => false, 81 'title_target' => 'h1,h2,h3,.entry-title',82 'lead_target' => 'h4,h5,h6',83 'text_target' => '.hentry',84 'bold_target' => 'strong,b',81 'title_target' => 'h1,h2,h3,.entry-title,h1 *,h2 *,h3 *,.entry-title *,.entry-content h2,.entry-content h2,.entry-content h3', 82 'lead_target' => '.entry-content h4,.entry-content h5,.entry-content h6,.entry-content h4 *,.entry-content h5 *,.entry-content h6 *', 83 'text_target' => '.entry-content *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6)', 84 'bold_target' => 'strong,b', 85 85 'show_post_form' => false, 86 86 ); -
ts-webfonts-for-conoha/trunk/inc/class/class.fonttheme.php
r1947141 r2010492 23 23 'fonts' => array( 24 24 'title' => 'ゴシックMB101 M', 25 'lead' => ' UD黎ミン R',26 'content' => ' ゴシックMB101 M',27 'bold' => ' ゴシックMB101 B',25 'lead' => 'ヒラギノ角ゴ W2', 26 'content' => 'TBUDゴシック R', 27 'bold' => 'TBUDゴシック E', 28 28 ), 29 29 ), … … 31 31 'name' => 'ビジネス', 32 32 'fonts' => array( 33 'title' => ' UD黎ミン R',34 'lead' => ' A1明朝',33 'title' => '見出ゴMB31', 34 'lead' => 'UD黎ミン R', 35 35 'content' => 'UD新ゴコンデンス90 L', 36 36 'bold' => 'UD新ゴコンデンス90 M', … … 40 40 'name' => 'ポップ', 41 41 'fonts' => array( 42 'title' => ' トーキング',43 'lead' => ' 新丸ゴ R',44 'content' => ' TBUDゴシック R',45 'bold' => ' TBUDゴシック E',42 'title' => 'キャピーN B', 43 'lead' => 'じゅん501', 44 'content' => 'じゅん201', 45 'bold' => 'じゅん501', 46 46 ), 47 47 ), 48 ' retro' => array(49 'name' => ' レトロ',48 'crisp' => array( 49 'name' => 'クリスプ', 50 50 'fonts' => array( 51 'title' => 'DS そよ風',52 'lead' => ' 陸隷',53 'content' => ' UD黎ミン R',54 'bold' => ' UD黎ミン B',51 'title' => 'DSダダ', 52 'lead' => 'DSそよ風', 53 'content' => 'トーキング', 54 'bold' => 'トーキング', 55 55 ), 56 56 ), … … 59 59 'fonts' => array( 60 60 'title' => 'A1明朝', 61 'lead' => '陸隷', 62 'content' => 'じゅん 201', 63 'bold' => 'じゅん 501', 64 ), 65 ), 66 'wafu' => array( 67 'name' => 'このは', 68 'fonts' => array( 69 'title' => 'DSダダ', 70 'lead' => 'DSそよ風', 61 'lead' => 'A1明朝', 71 62 'content' => 'UD黎ミン R', 72 63 'bold' => 'UD黎ミン B', 73 64 ), 74 65 ), 75 ' blog' => array(76 'name' => ' ブログ',66 'conoha' => array( 67 'name' => 'このは1', 77 68 'fonts' => array( 78 'title' => ' 新ゴ R',79 'lead' => ' 丸フォーク M',80 'content' => ' ヒラギノ角ゴ W2',81 'bold' => ' ヒラギノ角ゴ W2',69 'title' => 'ハルクラフト', 70 'lead' => 'ハルクラフト', 71 'content' => '那欽', 72 'bold' => '那欽', 82 73 ), 83 74 ), 84 ' smartphone' => array(85 'name' => ' スマホ',75 'conoha2' => array( 76 'name' => 'このは2', 86 77 'fonts' => array( 87 'title' => ' ゴシックMB101 B',88 'lead' => ' MゴシックMB101M',89 'content' => ' UD新ゴコンデンス90 L',90 'bold' => ' UD新ゴコンデンス90 M',78 'title' => 'はるひ学園', 79 'lead' => '丸フォーク M', 80 'content' => 'シネマレター', 81 'bold' => 'シネマレター', 91 82 ), 92 83 ), -
ts-webfonts-for-conoha/trunk/inc/font.json
r1947141 r2010492 1 {"\u30b4\u30b7\u30c3\u30af\u4f53":{"\u30b4\u30b7\u30c3\u30afMB101":["\u30b4\u30b7\u30c3\u30afMB101 M","\u30b4\u30b7\u30c3\u30afMB101B"],"\u65b0\u30b4":["\u65b0\u30b4R"],"\u898b\u51fa\u30b4MB31":["\u898b\u51fa\u30b4MB31"],"\u30d2\u30e9\u30ae\u30ce\u89d2\u30b4":["\u30d2\u30e9\u30ae\u30ce\u89d2\u30b4W2"]},"\u4e38\u30b4\u30b7\u30c3\u30af\u4f53":{"\u3058\u3085\u3093":["\u3058\u3085\u3093201","\u3058\u3085\u3093501"],"\u65b0\u4e38\u30b4":["\u65b0\u4e38\u30b4R"],"\u30ad\u30e3\u30d4\u30fcN":["\u30ad\u30e3\u30d4\u30fcN"]},"\u660e\u671d\u4f53":{"\u30ea\u30e5\u30a6\u30df\u30f3":["\u30ea\u30e5\u30a6\u30df\u30f3R-KL"],"A1\u660e\u671d":["A1\u660e\u671d"]},"UD\u66f8\u4f53":{"UD\u65b0\u30b4\u30b3\u30f3\u30c7\u30f3\u30b990":["UD\u65b0\u30b4\u30b3\u30f3\u30c7\u30f3\u30b990L","UD\u65b0\u30b4\u30b3\u30f3\u30c7\u30f3\u30b990M"],"UD\u9ece\u30df\u30f3":["UD\u9ece\u30df\u30f3R","UD\u9ece\u30df\u30f3B"]},"TB\u66f8\u4f53":{"TBUD\u30b4\u30b7\u30c3\u30af":["TBUD\u30b4\u30b7\u30c3\u30afR","TBUD\u30b4\u30b7\u30c3\u30afE"]},"\u30c7\u30b6\u30a4\u30f3\u66f8\u4f53":{"\u4e38\u30d5\u30a9\u30fc\u30af":["\u4e38\u30d5\u30a9\u30fc\u30afM"],"\u30d5\u30a9\u30fc\u30af":["\u30d5\u30a9\u30fc\u30afM"],"\u306f\u308b\u3072\u5b66\u5712":["\u306f\u308b\u3072\u5b66\u5712"],"\u30b7\u30cd\u30de\u30ec\u30bf\u30fc":["\u30b7\u30cd\u30de\u30ec\u30bf\u30fc"],"G2\u30b5\u30f3\u30bb\u30ea\u30d5":["G2\u30b5\u30f3\u30bb\u30ea\u30d5-B"],"\u3059\u305a\u3080\u3057":["\u3059\u305a\u3080\u3057"],"\u30c8\u30fc\u30ad\u30f3\u30b0":["\u30c8\u30fc\u30ad\u30f3\u30b0"],"\u30cf\u30eb\u30af\u30e9\u30d5\u30c8":["\u30cf\u30eb\u30af\u30e9\u30d5\u30c8"],"\u90a3\u6b3d":["\u90a3\u6b3d"]},"\u7b46\u66f8\u4f53":{"\u9678\u96b7":["\u9678\u96b7"]},"\u88c5\u98fe\u4f53":{"\u65b0\u30b4":["\u65b0\u30b4\u592a\u30e9\u30a4\u30f3"]},"DS\u66f8\u4f53":{"DS\u30c0\u30c0":["DS\u30c0\u30c0"],"DS\u305d\u3088\u98a8":["DS\u305d\u3088\u98a8"]}}1 {"\u30b4\u30b7\u30c3\u30af\u4f53":{"\u30b4\u30b7\u30c3\u30afMB101":["\u30b4\u30b7\u30c3\u30afMB101 M","\u30b4\u30b7\u30c3\u30afMB101 B"],"\u65b0\u30b4":["\u65b0\u30b4 R"],"\u898b\u51fa\u30b4MB31":["\u898b\u51fa\u30b4MB31"],"\u30d2\u30e9\u30ae\u30ce\u89d2\u30b4":["\u30d2\u30e9\u30ae\u30ce\u89d2\u30b4 W2"]},"\u4e38\u30b4\u30b7\u30c3\u30af\u4f53":{"\u3058\u3085\u3093":["\u3058\u3085\u3093 201","\u3058\u3085\u3093 501"],"\u65b0\u4e38\u30b4":["\u65b0\u4e38\u30b4 R"],"\u30ad\u30e3\u30d4\u30fcN":["\u30ad\u30e3\u30d4\u30fcN B"]},"\u660e\u671d\u4f53":{"\u30ea\u30e5\u30a6\u30df\u30f3":["\u30ea\u30e5\u30a6\u30df\u30f3R-KL"],"A1\u660e\u671d":["A1\u660e\u671d"]},"UD\u66f8\u4f53":{"UD\u65b0\u30b4\u30b3\u30f3\u30c7\u30f3\u30b990":["UD\u65b0\u30b4\u30b3\u30f3\u30c7\u30f3\u30b9 90 L","UD\u65b0\u30b4\u30b3\u30f3\u30c7\u30f3\u30b9 90 M"],"UD\u9ece\u30df\u30f3":["UD\u9ece\u30df\u30f3 R","UD\u9ece\u30df\u30f3 B"]},"TB\u66f8\u4f53":{"TBUD\u30b4\u30b7\u30c3\u30af":["TBUD\u30b4\u30b7\u30c3\u30af R","TBUD\u30b4\u30b7\u30c3\u30af E"]},"\u30c7\u30b6\u30a4\u30f3\u66f8\u4f53":{"\u4e38\u30d5\u30a9\u30fc\u30af":["\u4e38\u30d5\u30a9\u30fc\u30af M"],"\u30d5\u30a9\u30fc\u30af":["\u30d5\u30a9\u30fc\u30af M"],"\u306f\u308b\u3072\u5b66\u5712":["\u306f\u308b\u3072\u5b66\u5712"],"\u30b7\u30cd\u30de\u30ec\u30bf\u30fc":["\u30b7\u30cd\u30de\u30ec\u30bf\u30fc"],"G2\u30b5\u30f3\u30bb\u30ea\u30d5":["G2\u30b5\u30f3\u30bb\u30ea\u30d5-B"],"\u3059\u305a\u3080\u3057":["\u3059\u305a\u3080\u3057"],"\u30c8\u30fc\u30ad\u30f3\u30b0":["\u30c8\u30fc\u30ad\u30f3\u30b0"],"\u30cf\u30eb\u30af\u30e9\u30d5\u30c8":["\u30cf\u30eb\u30af\u30e9\u30d5\u30c8"],"\u90a3\u6b3d":["\u90a3\u6b3d"]},"\u7b46\u66f8\u4f53":{"\u9678\u96b7":["\u9678\u96b7"]},"\u88c5\u98fe\u4f53":{"\u65b0\u30b4":["\u65b0\u30b4 \u592a\u30e9\u30a4\u30f3"]},"DS\u66f8\u4f53":{"DS\u30c0\u30c0":["DS\u30c0\u30c0"],"DS\u305d\u3088\u98a8":["DS\u305d\u3088\u98a8"]}} -
ts-webfonts-for-conoha/trunk/readme.txt
r1949540 r2010492 3 3 Tags: fonts,Webfonts 4 4 Requires at least: 4.3.1 5 Tested up to: 4.9.76 Stable tag: 1.0. 05 Tested up to: 5.0.3 6 Stable tag: 1.0.1 7 7 License: GPLv3 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 32 32 ※30書体 33 33 34 【UD書体】UD新ゴコンデンス 90 L / UD新ゴコンデンス 90 M / UD黎ミン R / UD黎ミン B 34 【UD書体】UD新ゴコンデンス 90 L / UD新ゴコンデンス 90 M / UD黎ミン R / UD黎ミン B 35 35 36 36 【TB書体】TBUDゴシック R / TBUDゴシック E 37 37 38 【ゴシック体】ゴシックMB101 M / ゴシックMB101 B / 新ゴ R / 見出ゴMB31 / ヒラギノ角ゴ W2 38 【ゴシック体】ゴシックMB101 M / ゴシックMB101 B / 新ゴ R / 見出ゴMB31 / ヒラギノ角ゴ W2 39 39 40 40 【丸ゴシック体】じゅん 201 / じゅん 501 / 新丸ゴ R / キャピーN 41 41 42 【明朝体】A1明朝 / リュウミン R-KL 42 【明朝体】A1明朝 / リュウミン R-KL 43 43 44 【デザイン書体】丸フォーク M / フォーク M / はるひ学園 / シネマレター / G2 サンセリフ-B / すずむし / トーキング / ハルクラフト / 那欽 44 【デザイン書体】丸フォーク M / フォーク M / はるひ学園 / シネマレター / G2 サンセリフ-B / すずむし / トーキング / ハルクラフト / 那欽 45 45 46 46 【筆書体】陸隷 47 47 48 【装飾体】新ゴ 太ライン 48 【装飾体】新ゴ 太ライン 49 49 50 【DS書体】DSダダ / DSそよ風 50 【DS書体】DSダダ / DSそよ風 51 51 52 52 … … 80 80 よくある質問については、ConoHa WINGのサポートページをご確認ください。 81 81 82 83 82 ▼ConoHa WING お客様サポート 84 83 … … 86 85 87 86 87 == Changelog == 88 = 1.0.1 = 89 * Gutenbergテーマ対応 88 90 89 == Changelog ==90 91 = 1.0.0 = 91 92 * 初期リリース -
ts-webfonts-for-conoha/trunk/ts-webfonts-for-conoha.php
r1947141 r2010492 2 2 /* 3 3 Plugin Name: TypeSquare Webfonts for ConoHa 4 Version: 1.0. 05 Description: ConoHa のWordPress専用サーバー「ConoHa WP」で株式会社モリサワが提供するWebフォントサービス「TypeSquare」を利用できるプラグインです。4 Version: 1.0.1 5 Description: ConoHa WINGで株式会社モリサワが提供するWebフォントサービス「TypeSquare」を利用できるプラグインです。 6 6 Author: GMO Internet, Inc. 7 Author URI: https:// ConoHa/jp/7 Author URI: https://www.conoha.jp 8 8 Plugin URI: https://wordpress.org/plugins/ts-webfonts-for-conoha/ 9 9 Text Domain: typesquare … … 11 11 */ 12 12 13 require_once( dirname( __FILE__ ) .'/typesquare-admin.php' );14 require_once( dirname( __FILE__ ) .'/inc/class/class.font.data.php' );15 require_once( dirname( __FILE__ ) .'/inc/class/class.auth.php' );13 require_once( dirname( __FILE__ ) . '/typesquare-admin.php' ); 14 require_once( dirname( __FILE__ ) . '/inc/class/class.font.data.php' ); 15 require_once( dirname( __FILE__ ) . '/inc/class/class.auth.php' ); 16 16 define( 'TS_PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); 17 17 define( 'TS_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); … … 25 25 private $styles = false; 26 26 const OPTION_NAME = 'ts_settings'; 27 private function __construct(){} 27 28 private function __construct() { 29 } 28 30 29 31 public static function get_instance() { 30 32 if ( ! isset( self::$instance ) ) { 31 $c = __CLASS__;33 $c = __CLASS__; 32 34 self::$instance = new $c(); 33 35 } 36 34 37 return self::$instance; 35 38 } 36 39 37 40 public function add_hook() { 38 add_action( 'wp_enqueue_scripts' , array( $this, 'load_scripts' ) , 0, 3 );39 add_action( 'wp_head' , array( $this, 'load_font_styles' ) );41 add_action( 'wp_enqueue_scripts', array( $this, 'load_scripts' ), 0, 3 ); 42 add_action( 'wp_head', array( $this, 'load_font_styles' ) ); 40 43 add_action( 'pre_get_posts', array( $this, 'get_archive_font_styles' ) ); 41 44 } … … 45 48 46 49 if ( ! $version ) { 47 $data = get_file_data( __FILE__, array( 'version' => 'Version' ) );50 $data = get_file_data( __FILE__, array( 'version' => 'Version' ) ); 48 51 $version = $data['version']; 49 52 } 53 50 54 return $version; 51 55 } … … 55 59 56 60 if ( ! $text_domain ) { 57 $data = get_file_data( __FILE__, array( 'text_domain' => 'Text Domain' ) );61 $data = get_file_data( __FILE__, array( 'text_domain' => 'Text Domain' ) ); 58 62 $text_domain = $data['text_domain']; 59 63 } 64 60 65 return $text_domain; 61 66 } 62 67 63 68 public function load_scripts() { 64 $query = '';69 $query = ''; 65 70 $version = $this->version(); 66 71 67 wp_register_script( 'typesquare_std', "// typesquare.com/accessor/script/typesquare.js?5afd147c9ddc47ef812b36ecac1e024a", array( 'jquery' ), $version, false );72 wp_register_script( 'typesquare_std', "//code.typesquare.com/static/5b0e3c4aee6847bda5a036abac1e024a/typesquare.js", array( 'jquery' ), $version, false ); 68 73 wp_enqueue_script( 'typesquare_std' ); 69 74 } 70 75 71 76 private function get_fonts( $type = false, $post_font_data = false, $fonts = false ) { 72 $font_class = TypeSquare_ST_Fonts::get_instance();77 $font_class = TypeSquare_ST_Fonts::get_instance(); 73 78 $selected_font = $font_class->get_selected_font( $type ); 74 79 if ( $selected_font ) { … … 83 88 $text_font = ''; 84 89 foreach ( $fonts as $key => $font ) { 85 $text_font .= '"' . esc_attr( $font ). '"';86 if ( count( $fonts ) - 1 > $key ) {90 $text_font .= '"' . esc_attr( $font ) . '"'; 91 if ( count( $fonts ) - 1 > $key ) { 87 92 $text_font .= ','; 88 93 } 89 94 } 90 95 } else { 91 $text_font = '"'. esc_attr( $fonts ). '"'; 92 } 96 $text_font = '"' . esc_attr( $fonts ) . '"'; 97 } 98 93 99 return $text_font; 94 100 } … … 99 105 echo $this->styles; 100 106 } 101 return; 102 } 103 $auth = TypeSquare_ST_Auth::get_instance(); 104 105 $fonts = TypeSquare_ST_Fonts::get_instance(); 107 108 return; 109 } 110 $auth = TypeSquare_ST_Auth::get_instance(); 111 112 $fonts = TypeSquare_ST_Fonts::get_instance(); 106 113 $fonttheme = $fonts->get_selected_fonttheme(); 107 114 if ( ! isset( $fonttheme ) && ! $fonttheme ) { … … 111 118 if ( is_singular() ) { 112 119 $param = $fonts->get_fonttheme_params(); 113 if ( isset( $param['typesquare_themes']['show_post_form'] ) && 'false' != $param['typesquare_themes']['show_post_form'] ) {120 if ( isset( $param['typesquare_themes']['show_post_form'] ) && 'false' != $param['typesquare_themes']['show_post_form'] ) { 114 121 $post_theme = $fonts->get_selected_post_fonttheme( get_the_ID() ); 115 122 $post_theme = $fonts->load_font_data( $post_theme ); … … 120 127 } 121 128 122 $style = $this->_get_font_styles( $use_font, $fonttheme ); 129 $style = $this->_get_font_styles( $use_font, $fonttheme, get_the_ID()); 130 # $style = $this->_get_font_styles( $use_font, $fonttheme ); 123 131 if ( $style ) { 124 132 $html = "<style type='text/css'>{$style}</style>"; … … 128 136 129 137 public function get_archive_font_styles( $query ) { 130 if ( is_admin() || ! $query->is_main_query() || is_singular() ) {131 return; 132 } 133 134 $fonts = TypeSquare_ST_Fonts::get_instance();138 if ( is_admin() || ! $query->is_main_query() || is_singular() ) { 139 return; 140 } 141 142 $fonts = TypeSquare_ST_Fonts::get_instance(); 135 143 $fonttheme = $fonts->get_selected_fonttheme(); 136 144 if ( ! isset( $fonttheme ) && ! $fonttheme ) { … … 138 146 } 139 147 $font_param = $fonts->get_fonttheme_params(); 140 $use_font = $fonts->load_font_data( $fonttheme['font_theme'] );148 $use_font = $fonts->load_font_data( $fonttheme['font_theme'] ); 141 149 142 150 … … 147 155 } 148 156 $the_query = new WP_Query( $query->query ); 149 $style = false;157 $style = false; 150 158 while ( $the_query->have_posts() ) : $the_query->the_post(); 151 159 $id = get_the_ID(); 152 if ( isset( $font_param['typesquare_themes']['show_post_form'] ) && 'false' != $font_param['typesquare_themes']['show_post_form'] ) {160 if ( isset( $font_param['typesquare_themes']['show_post_form'] ) && 'false' != $font_param['typesquare_themes']['show_post_form'] ) { 153 161 $post_theme = $fonts->get_selected_post_fonttheme( $id ); 154 162 $post_theme = $fonts->load_font_data( $post_theme ); … … 166 174 167 175 private function _merge_post_id_to_target( $post_key, $target_text ) { 168 $target_list = explode( ',', $target_text );176 $target_list = explode( ',', $target_text ); 169 177 $merged_target = false; 170 178 foreach ( $target_list as $target ) { … … 176 184 } 177 185 $merged_target = rtrim( $merged_target, ',' ); 186 178 187 return $merged_target; 179 188 } 180 189 181 190 private function _get_font_styles( $use_font, $fonttheme, $post_id = false, $post_font_data = false ) { 182 $style = '';191 $style = ''; 183 192 if ( $post_id ) { 184 $post_key = '#post-'. $post_id;193 $post_key = '#post-' . $post_id; 185 194 $title_target = $this->_merge_post_id_to_target( $post_key, esc_attr( $fonttheme['title_target'] ) ); 186 195 $lead_target = $this->_merge_post_id_to_target( $post_key, esc_attr( $fonttheme['lead_target'] ) ); … … 196 205 $title_font = $lead_font = $text_font = $bold_font = false; 197 206 if ( isset( $use_font['title'] ) ) { 198 $title_font = $this->get_fonts( 'title', $post_font_data, $use_font['title'] );207 $title_font = $this->get_fonts( 'title', $post_font_data, $use_font['title'] ); 199 208 } 200 209 if ( isset( $use_font['lead'] ) ) { 201 $lead_font = $this->get_fonts( 'lead', $post_font_data, $use_font['lead'] );210 $lead_font = $this->get_fonts( 'lead', $post_font_data, $use_font['lead'] ); 202 211 } 203 212 if ( ! isset( $use_font['content'] ) && isset( $use_font['text'] ) ) { … … 205 214 } 206 215 if ( isset( $use_font['content'] ) ) { 207 $text_font = $this->get_fonts( 'text', $post_font_data, $use_font['content'] );216 $text_font = $this->get_fonts( 'text', $post_font_data, $use_font['content'] ); 208 217 } 209 218 if ( isset( $use_font['bold'] ) ) { 210 $bold_font = $this->get_fonts( 'bold', $post_font_data, $use_font['bold'] );219 $bold_font = $this->get_fonts( 'bold', $post_font_data, $use_font['bold'] ); 211 220 } 212 221 213 222 if ( $title_target && $title_font ) { 214 $style .= "{$title_target}{ font-family: {$title_font} ;}";223 $style .= "{$title_target}{ font-family: {$title_font} !important;}"; 215 224 } 216 225 if ( $lead_target && $lead_font ) { 217 $style .= "{$lead_target}{ font-family: {$lead_font} ;}";226 $style .= "{$lead_target}{ font-family: {$lead_font} !important;}"; 218 227 } 219 228 if ( $text_target && $text_font ) { 220 $style .= "{$text_target}{ font-family: {$text_font} ;}";229 $style .= "{$text_target}{ font-family: {$text_font} !important;}"; 221 230 } 222 231 if ( $bold_target && $bold_font ) { 223 $style .= "{$bold_target}{ font-family: {$bold_font};}"; 224 } 232 $style .= "{$bold_target}{ font-family: {$bold_font} !important;}"; 233 } 234 225 235 return $style; 226 236 } … … 232 242 delete_option( 'typesquare_fonttheme' ); 233 243 delete_option( 'typesquare_custom_theme' ); 244 234 245 return; 235 246 }
Note: See TracChangeset
for help on using the changeset viewer.