Version Description
Download this release
Release Info
Developer | Nikschavan |
Plugin | Custom Adobe Fonts (Typekit) |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.0.2
- classes/class-custom-typekit-fonts-admin.php +6 -30
- classes/class-custom-typekit-fonts.php +15 -0
- classes/class-typekit-fonts-white-label.php +193 -0
- custom-typekit-fonts.php +2 -2
- languages/custom-typekit-fonts.pot +48 -21
- readme.txt +14 -6
- templates/custom-typekit-fonts-options.php +12 -2
- templates/white-label.php +36 -0
classes/class-custom-typekit-fonts-admin.php
CHANGED
@@ -64,32 +64,6 @@ if ( ! class_exists( 'Custom_Typekit_Fonts_Admin' ) ) :
|
|
64 |
* @since 1.0.0
|
65 |
*/
|
66 |
public function set_custom_typekit_fonts_notice() {
|
67 |
-
// Notice for astra theme version.
|
68 |
-
if ( defined( 'ASTRA_THEME_VERSION' ) ) {
|
69 |
-
if ( version_compare( ASTRA_THEME_VERSION, '1.0.18', '<' ) ) {
|
70 |
-
?>
|
71 |
-
<div class="notice notice-error is-dismissible">
|
72 |
-
<p>
|
73 |
-
<?php echo esc_html__( 'Custom Typekit Fonts Plugin requires minimum 1.0.18 version of the Astra Theme.', 'custom-typekit-fonts' ); ?>
|
74 |
-
</p>
|
75 |
-
</div>
|
76 |
-
<?php
|
77 |
-
}
|
78 |
-
} else {
|
79 |
-
?>
|
80 |
-
<div class="notice notice-error is-dismissible">
|
81 |
-
<p>
|
82 |
-
<?php
|
83 |
-
printf(
|
84 |
-
/* translators: 1: theme.php file*/
|
85 |
-
__( 'Astra Theme needs to be active for you to use currently installed "Custom TypeKit Fonts" plugin. <a href="%1$s">Install & Activate Now</a>', 'custom-typekit-fonts' ),
|
86 |
-
esc_url( admin_url( 'themes.php?theme=astra' ) )
|
87 |
-
);
|
88 |
-
?>
|
89 |
-
</p>
|
90 |
-
</div>
|
91 |
-
<?php
|
92 |
-
}
|
93 |
|
94 |
// Notice for Custom Typekit Fonts action.
|
95 |
if ( isset( $_POST['custom-typekit-fonts-nonce'] ) && wp_verify_nonce( $_POST['custom-typekit-fonts-nonce'], 'custom-typekit-fonts' ) ) {
|
@@ -129,9 +103,11 @@ if ( ! class_exists( 'Custom_Typekit_Fonts_Admin' ) ) :
|
|
129 |
* @since 1.0.0
|
130 |
*/
|
131 |
public function register_custom_fonts_menu() {
|
|
|
|
|
132 |
add_options_page(
|
133 |
-
|
134 |
-
|
135 |
'edit_theme_options',
|
136 |
'custom-typekit-fonts',
|
137 |
array( $this, 'typekit_options_page' )
|
@@ -139,8 +115,8 @@ if ( ! class_exists( 'Custom_Typekit_Fonts_Admin' ) ) :
|
|
139 |
|
140 |
add_submenu_page(
|
141 |
'themes.php',
|
142 |
-
|
143 |
-
|
144 |
'edit_theme_options',
|
145 |
'custom-typekit-fonts',
|
146 |
array( $this, 'typekit_options_page' )
|
64 |
* @since 1.0.0
|
65 |
*/
|
66 |
public function set_custom_typekit_fonts_notice() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
|
68 |
// Notice for Custom Typekit Fonts action.
|
69 |
if ( isset( $_POST['custom-typekit-fonts-nonce'] ) && wp_verify_nonce( $_POST['custom-typekit-fonts-nonce'], 'custom-typekit-fonts' ) ) {
|
103 |
* @since 1.0.0
|
104 |
*/
|
105 |
public function register_custom_fonts_menu() {
|
106 |
+
|
107 |
+
$title = apply_filters( 'custom_typekit_fonts_menu_title', __( 'Typekit Fonts', 'custom-typekit-fonts' ) );
|
108 |
add_options_page(
|
109 |
+
$title,
|
110 |
+
$title,
|
111 |
'edit_theme_options',
|
112 |
'custom-typekit-fonts',
|
113 |
array( $this, 'typekit_options_page' )
|
115 |
|
116 |
add_submenu_page(
|
117 |
'themes.php',
|
118 |
+
$title,
|
119 |
+
$title,
|
120 |
'edit_theme_options',
|
121 |
'custom-typekit-fonts',
|
122 |
array( $this, 'typekit_options_page' )
|
classes/class-custom-typekit-fonts.php
CHANGED
@@ -40,6 +40,8 @@ if ( ! class_exists( 'Custom_Typekit_Fonts' ) ) {
|
|
40 |
require_once CUSTOM_TYPEKIT_FONTS_DIR . 'classes/class-custom-typekit-fonts-render.php';
|
41 |
|
42 |
add_action( 'init', array( $this, 'options_setting' ) );
|
|
|
|
|
43 |
}
|
44 |
|
45 |
/**
|
@@ -151,6 +153,19 @@ if ( ! class_exists( 'Custom_Typekit_Fonts' ) ) {
|
|
151 |
return $typekit_info;
|
152 |
}
|
153 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
}
|
155 |
|
156 |
/**
|
40 |
require_once CUSTOM_TYPEKIT_FONTS_DIR . 'classes/class-custom-typekit-fonts-render.php';
|
41 |
|
42 |
add_action( 'init', array( $this, 'options_setting' ) );
|
43 |
+
|
44 |
+
$this->load_files();
|
45 |
}
|
46 |
|
47 |
/**
|
153 |
return $typekit_info;
|
154 |
}
|
155 |
|
156 |
+
/**
|
157 |
+
* Loads classes and includes.
|
158 |
+
*
|
159 |
+
* @since 1.0.2
|
160 |
+
* @return void
|
161 |
+
*/
|
162 |
+
private function load_files() {
|
163 |
+
|
164 |
+
/* Classes */
|
165 |
+
|
166 |
+
require_once CUSTOM_TYPEKIT_FONTS_DIR . 'classes/class-typekit-fonts-white-label.php';
|
167 |
+
}
|
168 |
+
|
169 |
}
|
170 |
|
171 |
/**
|
classes/class-typekit-fonts-white-label.php
ADDED
@@ -0,0 +1,193 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Custom Typekit Fonts White Label
|
4 |
+
*
|
5 |
+
* @package Typekit_Custom_Fonts
|
6 |
+
* @since 1.0.2
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! class_exists( 'Typekit_Fonts_White_Label' ) ) :
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Typekit_Fonts_White_Label
|
13 |
+
*
|
14 |
+
* @since 1.0.2
|
15 |
+
*/
|
16 |
+
class Typekit_Fonts_White_Label {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Instance
|
20 |
+
*
|
21 |
+
* @since 1.0.2
|
22 |
+
* @var object Class Object.
|
23 |
+
* @access private
|
24 |
+
*/
|
25 |
+
private static $instance;
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Member Variable
|
29 |
+
*
|
30 |
+
* @since 1.0.2
|
31 |
+
* @var array branding
|
32 |
+
* @access private
|
33 |
+
*/
|
34 |
+
private static $branding;
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Initiator
|
38 |
+
*
|
39 |
+
* @since 1.0.2
|
40 |
+
* @return object initialized object of class.
|
41 |
+
*/
|
42 |
+
public static function set_instance() {
|
43 |
+
if ( ! isset( self::$instance ) ) {
|
44 |
+
self::$instance = new self;
|
45 |
+
}
|
46 |
+
return self::$instance;
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Constructor
|
51 |
+
*
|
52 |
+
* @since 1.0.2
|
53 |
+
*/
|
54 |
+
public function __construct() {
|
55 |
+
|
56 |
+
add_filter( 'all_plugins' , array( $this, 'plugins_page' ) );
|
57 |
+
add_filter( 'astra_addon_branding_options' , __CLASS__ . '::settings' );
|
58 |
+
add_action( 'astra_pro_white_label_add_form' , __CLASS__ . '::add_white_lavel_form' );
|
59 |
+
|
60 |
+
add_filter( 'custom_typekit_fonts_menu_title', array( $this, 'white_label_custom_typekit_fonts_title' ) );
|
61 |
+
if ( is_admin() ) {
|
62 |
+
// Display the link with the plugin meta.
|
63 |
+
add_filter( 'plugin_row_meta', array( $this, 'plugin_links' ), 10, 4 );
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* White labels the plugins page.
|
69 |
+
*
|
70 |
+
* @param array $plugins Plugins Array.
|
71 |
+
* @return array
|
72 |
+
*/
|
73 |
+
function plugins_page( $plugins ) {
|
74 |
+
|
75 |
+
if ( ! is_callable( 'Astra_Ext_White_Label_Markup::get_white_label' ) ) {
|
76 |
+
return $plugins;
|
77 |
+
}
|
78 |
+
|
79 |
+
if ( ! isset( $plugins[ CUSTOM_TYPEKIT_FONTS_BASE ] ) ) {
|
80 |
+
return $plugins;
|
81 |
+
}
|
82 |
+
|
83 |
+
// Set White Labels.
|
84 |
+
$name = Astra_Ext_White_Label_Markup::get_white_label( 'custom-typekit-fonts', 'name' );
|
85 |
+
$description = Astra_Ext_White_Label_Markup::get_white_label( 'custom-typekit-fonts', 'description' );
|
86 |
+
$author = Astra_Ext_White_Label_Markup::get_white_label( 'astra-agency', 'author' );
|
87 |
+
$author_uri = Astra_Ext_White_Label_Markup::get_white_label( 'astra-agency', 'author_url' );
|
88 |
+
|
89 |
+
if ( ! empty( $name ) ) {
|
90 |
+
$plugins[ CUSTOM_TYPEKIT_FONTS_BASE ]['Name'] = $name;
|
91 |
+
|
92 |
+
// Remove Plugin URI if Agency White Label name is set.
|
93 |
+
$plugins[ CUSTOM_TYPEKIT_FONTS_BASE ]['PluginURI'] = '';
|
94 |
+
}
|
95 |
+
|
96 |
+
if ( ! empty( $description ) ) {
|
97 |
+
$plugins[ CUSTOM_TYPEKIT_FONTS_BASE ]['Description'] = $description;
|
98 |
+
}
|
99 |
+
|
100 |
+
if ( ! empty( $author ) ) {
|
101 |
+
$plugins[ CUSTOM_TYPEKIT_FONTS_BASE ]['Author'] = $author;
|
102 |
+
}
|
103 |
+
|
104 |
+
if ( ! empty( $author_uri ) ) {
|
105 |
+
$plugins[ CUSTOM_TYPEKIT_FONTS_BASE ]['AuthorURI'] = $author_uri;
|
106 |
+
}
|
107 |
+
|
108 |
+
return $plugins;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* White labels the Custom Typekit fonts menu title
|
113 |
+
*
|
114 |
+
* @since 1.0.2
|
115 |
+
* @param string $title custom typekit fonts menu title.
|
116 |
+
* @return string $title updated custom typekit fonts menu
|
117 |
+
*/
|
118 |
+
function white_label_custom_typekit_fonts_title( $title ) {
|
119 |
+
|
120 |
+
if ( is_callable( 'Astra_Ext_White_Label_Markup::get_white_label' ) ) {
|
121 |
+
$name = Astra_Ext_White_Label_Markup::get_white_label( 'custom-typekit-fonts', 'name' );
|
122 |
+
if ( ! empty( $name ) ) {
|
123 |
+
$title = $name;
|
124 |
+
}
|
125 |
+
}
|
126 |
+
return $title;
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Remove a "view details" link from the plugin list table
|
131 |
+
*
|
132 |
+
* @since 1.0.2
|
133 |
+
*
|
134 |
+
* @param array $plugin_meta List of links.
|
135 |
+
* @param string $plugin_file Relative path to the main plugin file from the plugins directory.
|
136 |
+
* @param array $plugin_data Data from the plugin headers.
|
137 |
+
* @return array
|
138 |
+
*/
|
139 |
+
public function plugin_links( $plugin_meta, $plugin_file, $plugin_data ) {
|
140 |
+
|
141 |
+
if ( is_callable( 'Astra_Ext_White_Label_Markup::get_white_label' ) ) {
|
142 |
+
if ( CUSTOM_TYPEKIT_FONTS_BASE == $plugin_file ) {
|
143 |
+
// Set White Labels.
|
144 |
+
$name = Astra_Ext_White_Label_Markup::get_white_label( 'custom-typekit-fonts', 'name' );
|
145 |
+
$description = Astra_Ext_White_Label_Markup::get_white_label( 'custom-typekit-fonts', 'description' );
|
146 |
+
|
147 |
+
if ( ! empty( $name ) ) {
|
148 |
+
// Remove Plugin URI if Agency White Label name is set.
|
149 |
+
unset( $plugin_meta[2] );
|
150 |
+
}
|
151 |
+
}
|
152 |
+
}
|
153 |
+
return $plugin_meta;
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Add White Label setting's
|
158 |
+
*
|
159 |
+
* @since 1.0.2
|
160 |
+
*
|
161 |
+
* @param array $settings White label setting.
|
162 |
+
* @return array
|
163 |
+
*/
|
164 |
+
public static function settings( $settings = array() ) {
|
165 |
+
|
166 |
+
$settings['custom-typekit-fonts'] = array(
|
167 |
+
'name' => '',
|
168 |
+
'description' => '',
|
169 |
+
);
|
170 |
+
|
171 |
+
return $settings;
|
172 |
+
}
|
173 |
+
|
174 |
+
/**
|
175 |
+
* Add White Label form
|
176 |
+
*
|
177 |
+
* @since 1.0.2
|
178 |
+
*
|
179 |
+
* @param array $settings White label setting.
|
180 |
+
* @return void
|
181 |
+
*/
|
182 |
+
public static function add_white_lavel_form( $settings = array() ) {
|
183 |
+
require_once CUSTOM_TYPEKIT_FONTS_DIR . 'templates/white-label.php';
|
184 |
+
}
|
185 |
+
|
186 |
+
}
|
187 |
+
|
188 |
+
/**
|
189 |
+
* Kicking this off by calling 'set_instance()' method
|
190 |
+
*/
|
191 |
+
Typekit_Fonts_White_Label::set_instance();
|
192 |
+
|
193 |
+
endif;
|
custom-typekit-fonts.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Author: Brainstorm Force
|
7 |
* Author URI: http://www.brainstormforce.com
|
8 |
* Text Domain: custom-typekit-fonts
|
9 |
-
* Version: 1.0.
|
10 |
*
|
11 |
* @package Typekit_Custom_Fonts
|
12 |
*/
|
@@ -25,7 +25,7 @@ define( 'CUSTOM_TYPEKIT_FONTS_FILE', __FILE__ );
|
|
25 |
define( 'CUSTOM_TYPEKIT_FONTS_BASE', plugin_basename( CUSTOM_TYPEKIT_FONTS_FILE ) );
|
26 |
define( 'CUSTOM_TYPEKIT_FONTS_DIR', plugin_dir_path( CUSTOM_TYPEKIT_FONTS_FILE ) );
|
27 |
define( 'CUSTOM_TYPEKIT_FONTS_URI', plugins_url( '/', CUSTOM_TYPEKIT_FONTS_FILE ) );
|
28 |
-
define( 'CUSTOM_TYPEKIT_FONTS_VER', '1.0.
|
29 |
/**
|
30 |
* BSF Custom Fonts
|
31 |
*/
|
6 |
* Author: Brainstorm Force
|
7 |
* Author URI: http://www.brainstormforce.com
|
8 |
* Text Domain: custom-typekit-fonts
|
9 |
+
* Version: 1.0.2
|
10 |
*
|
11 |
* @package Typekit_Custom_Fonts
|
12 |
*/
|
25 |
define( 'CUSTOM_TYPEKIT_FONTS_BASE', plugin_basename( CUSTOM_TYPEKIT_FONTS_FILE ) );
|
26 |
define( 'CUSTOM_TYPEKIT_FONTS_DIR', plugin_dir_path( CUSTOM_TYPEKIT_FONTS_FILE ) );
|
27 |
define( 'CUSTOM_TYPEKIT_FONTS_URI', plugins_url( '/', CUSTOM_TYPEKIT_FONTS_FILE ) );
|
28 |
+
define( 'CUSTOM_TYPEKIT_FONTS_VER', '1.0.2' );
|
29 |
/**
|
30 |
* BSF Custom Fonts
|
31 |
*/
|
languages/custom-typekit-fonts.pot
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
# This file is distributed under the same license as the Custom Typekit Fonts package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Custom Typekit Fonts 1.0.
|
6 |
"Report-Msgid-Bugs-To: "
|
7 |
"https://wordpress.org/support/plugin/custom-typekit-fonts\n"
|
8 |
-
"POT-Creation-Date: 2017-
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=utf-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -25,23 +25,24 @@ msgstr ""
|
|
25 |
"X-Poedit-Bookmarks: \n"
|
26 |
"X-Textdomain-Support: yes\n"
|
27 |
|
28 |
-
#: classes/class-custom-typekit-fonts-admin.php:
|
29 |
-
msgid ""
|
30 |
-
"Custom Typekit Fonts Plugin requires minimum 1.0.18 version of the Astra "
|
31 |
-
"Theme."
|
32 |
-
msgstr ""
|
33 |
-
|
34 |
-
#: classes/class-custom-typekit-fonts-admin.php:92
|
35 |
#: templates/custom-typekit-fonts-options.php:27
|
36 |
msgid "Please Enter the Valid Kit ID to get the kit details."
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: classes/class-custom-typekit-fonts-admin.php:
|
|
|
|
|
|
|
|
|
40 |
msgid "Custom Typekit Fonts settings have been successfully saved."
|
41 |
msgstr ""
|
42 |
|
43 |
-
|
44 |
-
|
|
|
|
|
|
|
45 |
msgstr ""
|
46 |
|
47 |
#: templates/custom-typekit-fonts-options.php:11
|
@@ -83,42 +84,68 @@ msgid "Fonts"
|
|
83 |
msgstr ""
|
84 |
|
85 |
#: templates/custom-typekit-fonts-options.php:64
|
|
|
|
|
|
|
|
|
86 |
msgid "Weights"
|
87 |
msgstr ""
|
88 |
|
89 |
-
#: templates/custom-typekit-fonts-options.php:
|
90 |
msgid "Help"
|
91 |
msgstr ""
|
92 |
|
93 |
-
#: templates/custom-typekit-fonts-options.php:
|
94 |
#. translators: %1$s: typekit site url.
|
95 |
msgid ""
|
96 |
"You can get the Kit ID <a href=%1$s target=\"_blank\" >here</a> from your "
|
97 |
"Typekit Account. <b>Kit ID</b> can be found next to the kit names."
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: templates/custom-typekit-fonts-options.php:
|
101 |
msgid "How it works?"
|
102 |
msgstr ""
|
103 |
|
104 |
-
#: templates/custom-typekit-fonts-options.php:
|
|
|
105 |
msgid ""
|
106 |
-
"Once you get the Kit Details, all the fonts will be listed in the "
|
107 |
-
"customizer under typography"
|
|
|
108 |
msgstr ""
|
109 |
|
110 |
-
#: templates/custom-typekit-fonts-options.php:
|
|
|
|
|
|
|
|
|
111 |
msgid "Go To Customizer"
|
112 |
msgstr ""
|
113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
#. Plugin URI of the plugin/theme
|
115 |
msgid "http://www.wpastra.com/"
|
116 |
msgstr ""
|
117 |
|
118 |
#. Description of the plugin/theme
|
119 |
msgid ""
|
120 |
-
"Custom Fonts allows you to
|
121 |
-
"
|
122 |
msgstr ""
|
123 |
|
124 |
#. Author of the plugin/theme
|
2 |
# This file is distributed under the same license as the Custom Typekit Fonts package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Custom Typekit Fonts 1.0.2\n"
|
6 |
"Report-Msgid-Bugs-To: "
|
7 |
"https://wordpress.org/support/plugin/custom-typekit-fonts\n"
|
8 |
+
"POT-Creation-Date: 2017-09-28 05:38:15+00:00\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=utf-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
25 |
"X-Poedit-Bookmarks: \n"
|
26 |
"X-Textdomain-Support: yes\n"
|
27 |
|
28 |
+
#: classes/class-custom-typekit-fonts-admin.php:80
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
#: templates/custom-typekit-fonts-options.php:27
|
30 |
msgid "Please Enter the Valid Kit ID to get the kit details."
|
31 |
msgstr ""
|
32 |
|
33 |
+
#: classes/class-custom-typekit-fonts-admin.php:87
|
34 |
+
msgid "This Kit is empty. Please add some fonts in it."
|
35 |
+
msgstr ""
|
36 |
+
|
37 |
+
#: classes/class-custom-typekit-fonts-admin.php:91
|
38 |
msgid "Custom Typekit Fonts settings have been successfully saved."
|
39 |
msgstr ""
|
40 |
|
41 |
+
#: classes/class-custom-typekit-fonts-admin.php:107
|
42 |
+
#: classes/class-custom-typekit-fonts-admin.php:108
|
43 |
+
#: classes/class-custom-typekit-fonts-admin.php:116
|
44 |
+
#: classes/class-custom-typekit-fonts-admin.php:117
|
45 |
+
msgid "Typekit Fonts"
|
46 |
msgstr ""
|
47 |
|
48 |
#: templates/custom-typekit-fonts-options.php:11
|
84 |
msgstr ""
|
85 |
|
86 |
#: templates/custom-typekit-fonts-options.php:64
|
87 |
+
msgid "Font Family"
|
88 |
+
msgstr ""
|
89 |
+
|
90 |
+
#: templates/custom-typekit-fonts-options.php:67
|
91 |
msgid "Weights"
|
92 |
msgstr ""
|
93 |
|
94 |
+
#: templates/custom-typekit-fonts-options.php:106
|
95 |
msgid "Help"
|
96 |
msgstr ""
|
97 |
|
98 |
+
#: templates/custom-typekit-fonts-options.php:112
|
99 |
#. translators: %1$s: typekit site url.
|
100 |
msgid ""
|
101 |
"You can get the Kit ID <a href=%1$s target=\"_blank\" >here</a> from your "
|
102 |
"Typekit Account. <b>Kit ID</b> can be found next to the kit names."
|
103 |
msgstr ""
|
104 |
|
105 |
+
#: templates/custom-typekit-fonts-options.php:123
|
106 |
msgid "How it works?"
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: templates/custom-typekit-fonts-options.php:130
|
110 |
+
#. translators: %1$s: Astra Theme url.
|
111 |
msgid ""
|
112 |
+
"1) Once you get the Kit Details, all the fonts will be listed in the "
|
113 |
+
"customizer under typography for only <a href=\"%1$s\" target=\"_blank\" "
|
114 |
+
"rel=\"noopener\"> Astra </a> WordPress Theme users"
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: templates/custom-typekit-fonts-options.php:134
|
118 |
+
msgid "2) Select the Font Family and start using it into your custom CSS."
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: templates/custom-typekit-fonts-options.php:137
|
122 |
msgid "Go To Customizer"
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: templates/white-label.php:12 templates/white-label.php:17
|
126 |
+
msgid "Custom Typekit Fonts Branding"
|
127 |
+
msgstr ""
|
128 |
+
|
129 |
+
#: templates/white-label.php:23
|
130 |
+
msgid "Plugin Name:"
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
#: templates/white-label.php:28
|
134 |
+
msgid "Plugin Description:"
|
135 |
+
msgstr ""
|
136 |
+
|
137 |
+
#. Plugin Name of the plugin/theme
|
138 |
+
msgid "Custom Typekit Fonts"
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
#. Plugin URI of the plugin/theme
|
142 |
msgid "http://www.wpastra.com/"
|
143 |
msgstr ""
|
144 |
|
145 |
#. Description of the plugin/theme
|
146 |
msgid ""
|
147 |
+
"Custom Typekit Fonts allows you to extends the fonts supports from the "
|
148 |
+
"Typekit."
|
149 |
msgstr ""
|
150 |
|
151 |
#. Author of the plugin/theme
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Custom Typekit Fonts ===
|
2 |
-
Contributors: brainstormforce
|
3 |
Donate link: https://wpastra.com/
|
4 |
Tags: custom typekit fonts, theme custom fonts, unlimited typekit custom fonts
|
5 |
Requires at least: 4.4
|
6 |
-
Tested up to: 4.8.
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -14,9 +14,11 @@ Custom Typekit Fonts allows you to extends the fonts supports from the Typekit.
|
|
14 |
|
15 |
Custom Typekit Fonts allows you to extends the fonts supports from the Typekit.
|
16 |
|
17 |
-
|
|
|
|
|
18 |
|
19 |
-
|
20 |
|
21 |
Get more details from [Typekit](https://typekit.com/).
|
22 |
|
@@ -24,7 +26,9 @@ Get more details from [Typekit](https://typekit.com/).
|
|
24 |
|
25 |
1. Upload the plugin files to the `/wp-content/plugins/custom-typekit-fonts` directory, or install the plugin through the WordPress plugins screen directly.
|
26 |
2. Activate the plugin through the 'Plugins' screen in WordPress.
|
27 |
-
3. Use the Appearance->
|
|
|
|
|
28 |
|
29 |
== Screenshots ==
|
30 |
|
@@ -35,6 +39,10 @@ Get more details from [Typekit](https://typekit.com/).
|
|
35 |
|
36 |
== Changelog ==
|
37 |
|
|
|
|
|
|
|
|
|
38 |
v1.0.1
|
39 |
* Custom Typekit Fonts wp admin menu renamed to Typekit Fonts.
|
40 |
* Empty Kit notice added if there is not fonts in the Kit.
|
1 |
=== Custom Typekit Fonts ===
|
2 |
+
Contributors: brainstormforce, rushijagani
|
3 |
Donate link: https://wpastra.com/
|
4 |
Tags: custom typekit fonts, theme custom fonts, unlimited typekit custom fonts
|
5 |
Requires at least: 4.4
|
6 |
+
Tested up to: 4.8.2
|
7 |
+
Stable tag: 1.0.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
14 |
|
15 |
Custom Typekit Fonts allows you to extends the fonts supports from the Typekit.
|
16 |
|
17 |
+
You don't need to include any code to get the Typekit Fonts.
|
18 |
+
You can directly add Typekit ID and start using the fonts of your choice.
|
19 |
+
[Astra](https://wpastra.com) WordPress Theme users can select any published kit font into the customizer.
|
20 |
|
21 |
+
All other users can also select Font Family from Appearance -> Typekit Fonts and start using it into your custom CSS.
|
22 |
|
23 |
Get more details from [Typekit](https://typekit.com/).
|
24 |
|
26 |
|
27 |
1. Upload the plugin files to the `/wp-content/plugins/custom-typekit-fonts` directory, or install the plugin through the WordPress plugins screen directly.
|
28 |
2. Activate the plugin through the 'Plugins' screen in WordPress.
|
29 |
+
3. Use the Appearance -> Typekit Fonts -> Add Kit ID and get all Font list.
|
30 |
+
4. If you are using [Astra](https://wpastra.com) then start using fonts from the customizer.
|
31 |
+
5. You can also select Font Family from Appearance -> Typekit Fonts and start using it into your custom CSS.
|
32 |
|
33 |
== Screenshots ==
|
34 |
|
39 |
|
40 |
== Changelog ==
|
41 |
|
42 |
+
v1.0.2
|
43 |
+
* Typekit fonts support added for all themes.
|
44 |
+
* White Label support added from the [Astra Pro](https://wpastra.com/pro/) plugin.
|
45 |
+
|
46 |
v1.0.1
|
47 |
* Custom Typekit Fonts wp admin menu renamed to Typekit Fonts.
|
48 |
* Empty Kit notice added if there is not fonts in the Kit.
|
templates/custom-typekit-fonts-options.php
CHANGED
@@ -60,6 +60,9 @@ $kit_info = get_option( 'custom-typekit-fonts' );
|
|
60 |
<th>
|
61 |
<?php esc_html_e( 'Fonts', 'custom-typekit-fonts' ); ?>
|
62 |
</th>
|
|
|
|
|
|
|
63 |
<th>
|
64 |
<?php esc_html_e( 'Weights', 'custom-typekit-fonts' ); ?>
|
65 |
</th>
|
@@ -70,6 +73,7 @@ $kit_info = get_option( 'custom-typekit-fonts' );
|
|
70 |
|
71 |
echo '<tr>';
|
72 |
echo '<td>' . $font['family'] . '</td>';
|
|
|
73 |
echo '<td>';
|
74 |
$comma_sep_arr = array();
|
75 |
foreach ( $font['weights'] as $weight ) :
|
@@ -120,8 +124,14 @@ $kit_info = get_option( 'custom-typekit-fonts' );
|
|
120 |
</h3>
|
121 |
<div class="inside">
|
122 |
<div class="panel-inner">
|
123 |
-
<p>
|
124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
</p>
|
126 |
<a class="submit button button-hero"
|
127 |
href="<?php echo esc_url( admin_url( 'customize.php' ) ); ?>"><?php esc_html_e( 'Go To Customizer', 'custom-typekit-fonts' ); ?></a>
|
60 |
<th>
|
61 |
<?php esc_html_e( 'Fonts', 'custom-typekit-fonts' ); ?>
|
62 |
</th>
|
63 |
+
<th>
|
64 |
+
<?php esc_html_e( 'Font Family', 'custom-typekit-fonts' ); ?>
|
65 |
+
</th>
|
66 |
<th>
|
67 |
<?php esc_html_e( 'Weights', 'custom-typekit-fonts' ); ?>
|
68 |
</th>
|
73 |
|
74 |
echo '<tr>';
|
75 |
echo '<td>' . $font['family'] . '</td>';
|
76 |
+
echo '<td>' . $font['fallback'] . '</td>';
|
77 |
echo '<td>';
|
78 |
$comma_sep_arr = array();
|
79 |
foreach ( $font['weights'] as $weight ) :
|
124 |
</h3>
|
125 |
<div class="inside">
|
126 |
<div class="panel-inner">
|
127 |
+
<p>
|
128 |
+
<?php
|
129 |
+
/* translators: %1$s: Astra Theme url. */
|
130 |
+
printf( __( '1) Once you get the Kit Details, all the fonts will be listed in the customizer under typography for only <a href="%1$s" target="_blank" rel="noopener"> Astra </a> WordPress Theme users', 'custom-typekit-fonts' ), 'https://wpastra.com' );
|
131 |
+
?>
|
132 |
+
</p>
|
133 |
+
<p>
|
134 |
+
<?php esc_html_e( '2) Select the Font Family and start using it into your custom CSS.', 'custom-typekit-fonts' ); ?>
|
135 |
</p>
|
136 |
<a class="submit button button-hero"
|
137 |
href="<?php echo esc_url( admin_url( 'customize.php' ) ); ?>"><?php esc_html_e( 'Go To Customizer', 'custom-typekit-fonts' ); ?></a>
|
templates/white-label.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* White Label Form
|
4 |
+
*
|
5 |
+
* @package Custom Typekit Fonts
|
6 |
+
*/
|
7 |
+
|
8 |
+
?>
|
9 |
+
<li>
|
10 |
+
<div class="branding-form postbox">
|
11 |
+
<button type="button" class="handlediv button-link" aria-expanded="true">
|
12 |
+
<span class="screen-reader-text"><?php _e( 'Custom Typekit Fonts Branding', 'custom-typekit-fonts' ); ?></span>
|
13 |
+
<span class="toggle-indicator" aria-hidden="true"></span>
|
14 |
+
</button>
|
15 |
+
|
16 |
+
<h2 class="hndle ui-sortable-handle">
|
17 |
+
<span><?php _e( 'Custom Typekit Fonts Branding', 'custom-typekit-fonts' ); ?></span>
|
18 |
+
</h2>
|
19 |
+
|
20 |
+
<div class="inside">
|
21 |
+
<div class="form-wrap">
|
22 |
+
<div class="form-field">
|
23 |
+
<label><?php _e( 'Plugin Name:', 'custom-typekit-fonts' ); ?>
|
24 |
+
<input type="text" name="ast_white_label[custom-typekit-fonts][name]" class="placeholder placeholder-active" value="<?php echo esc_attr( $settings['custom-typekit-fonts']['name'] ); ?>">
|
25 |
+
</label>
|
26 |
+
</div>
|
27 |
+
<div class="form-field">
|
28 |
+
<label><?php _e( 'Plugin Description:', 'custom-typekit-fonts' ); ?>
|
29 |
+
<textarea name="ast_white_label[custom-typekit-fonts][description]" class="placeholder placeholder-active" rows="2"><?php echo esc_attr( $settings['custom-typekit-fonts']['description'] ); ?></textarea>
|
30 |
+
</label>
|
31 |
+
</div>
|
32 |
+
<div class="clear"></div>
|
33 |
+
</div>
|
34 |
+
</div>
|
35 |
+
</div>
|
36 |
+
</li>
|