Skip to content

Commit 514a3b4

Browse files
authored
Merge pull request #18 from brainstormforce/whitelabel-improvements
- Improvement: Allow whitelabel settings to be setup from using constants when using Astra Pro.
2 parents d7510ce + 5d2e9e0 commit 514a3b4

10 files changed

+166
-131
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
# Custom Typekit Fonts #
2-
**Contributors:** [brainstormforce](https://profiles.wordpress.org/brainstormforce)
1+
# Custom Adobe Fonts (Typekit) #
2+
**Contributors:** [brainstormforce](https://profiles.wordpress.org/brainstormforce)
33
**Donate link:** https://www.paypal.me/BrainstormForce
4-
**Tags:** custom typekit fonts, theme custom fonts, unlimited typekit custom fonts
4+
**Tags:** custom adobe fonts, theme custom fonts, unlimited typekit custom fonts
55
**Requires at least:** 4.4
66
**Tested up to:** 5.1
7-
**Stable tag:** 1.0.10
7+
**Stable tag:** 1.0.11
88
**License:** GPLv2 or later
99
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html
1010

11-
Custom Typekit Fonts allows you to extends the fonts supports from the Typekit.
11+
Custom Adobe Fonts allows you to extends the fonts supports from the Typekit.
1212

1313
## Description ##
1414

15-
This plugin helps you easily embed Typekit fonts easily in your WordPress website.
15+
This plugin helps you easily embed adobe fonts easily in your WordPress website.
1616

1717
Currently it works with:
1818

@@ -49,6 +49,9 @@ If you're not using any of the supported plugins and theme, you can write the cu
4949

5050
## Changelog ##
5151

52+
### v1.0.11 ###
53+
- Improvement: Allow whitelabel settings to be setup from using constants when using Astra Pro.
54+
5255
### v1.0.10 ###
5356
- Fix: Remove typekit font from the Astra Theme's google fonts URL.
5457

classes/class-custom-typekit-fonts-admin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function set_custom_typekit_fonts_notice() {
103103
*/
104104
public function register_custom_fonts_menu() {
105105

106-
$title = apply_filters( 'custom_typekit_fonts_menu_title', __( 'Typekit Fonts', 'custom-typekit-fonts' ) );
106+
$title = apply_filters( 'custom_typekit_fonts_menu_title', __( 'Adobe Fonts', 'custom-typekit-fonts' ) );
107107

108108
add_submenu_page(
109109
'themes.php',

classes/class-typekit-fonts-white-label.php

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function __construct() {
7272
*/
7373
function plugins_page( $plugins ) {
7474

75-
if ( ! is_callable( 'Astra_Ext_White_Label_Markup::get_white_label' ) ) {
75+
if ( ! is_callable( 'Astra_Ext_White_Label_Markup::get_whitelabel_string' ) ) {
7676
return $plugins;
7777
}
7878

@@ -81,10 +81,10 @@ function plugins_page( $plugins ) {
8181
}
8282

8383
// 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' );
84+
$name = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'custom-typekit-fonts', 'name' );
85+
$description = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'custom-typekit-fonts', 'description' );
86+
$author = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'astra-agency', 'author' );
87+
$author_uri = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'astra-agency', 'author_url' );
8888

8989
if ( ! empty( $name ) ) {
9090
$plugins[ CUSTOM_TYPEKIT_FONTS_BASE ]['Name'] = $name;
@@ -117,12 +117,13 @@ function plugins_page( $plugins ) {
117117
*/
118118
function white_label_custom_typekit_fonts_title( $title ) {
119119

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' );
120+
if ( is_callable( 'Astra_Ext_White_Label_Markup::get_whitelabel_string' ) ) {
121+
$name = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'custom-typekit-fonts', 'name' );
122122
if ( ! empty( $name ) ) {
123123
$title = $name;
124124
}
125125
}
126+
126127
return $title;
127128
}
128129

@@ -138,11 +139,11 @@ function white_label_custom_typekit_fonts_title( $title ) {
138139
*/
139140
public function plugin_links( $plugin_meta, $plugin_file, $plugin_data ) {
140141

141-
if ( is_callable( 'Astra_Ext_White_Label_Markup::get_white_label' ) ) {
142+
if ( is_callable( 'Astra_Ext_White_Label_Markup::get_whitelabel_string' ) ) {
142143
if ( CUSTOM_TYPEKIT_FONTS_BASE == $plugin_file ) {
143144
// 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' );
145+
$name = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'custom-typekit-fonts', 'name' );
146+
$description = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'custom-typekit-fonts', 'description' );
146147

147148
if ( ! empty( $name ) ) {
148149
// Remove Plugin URI if Agency White Label name is set.

custom-typekit-fonts.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?php
22
/**
3-
* Plugin Name: Custom Typekit Fonts
3+
* Plugin Name: Custom Adobe Fonts (Typekit)
44
* Plugin URI: http://www.wpastra.com/
5-
* Description: Custom Typekit Fonts allows you to extends the fonts supports from the Typekit.
5+
* Description: Custom Adobe Fonts allows you to extends the fonts supports from the Typekit.
66
* Author: Brainstorm Force
77
* Author URI: http://www.brainstormforce.com
88
* Text Domain: custom-typekit-fonts
9-
* Version: 1.0.10
9+
* Version: 1.0.11
1010
*
1111
* @package Typekit_Custom_Fonts
1212
*/
@@ -25,7 +25,7 @@
2525
define( 'CUSTOM_TYPEKIT_FONTS_BASE', plugin_basename( CUSTOM_TYPEKIT_FONTS_FILE ) );
2626
define( 'CUSTOM_TYPEKIT_FONTS_DIR', plugin_dir_path( CUSTOM_TYPEKIT_FONTS_FILE ) );
2727
define( 'CUSTOM_TYPEKIT_FONTS_URI', plugins_url( '/', CUSTOM_TYPEKIT_FONTS_FILE ) );
28-
define( 'CUSTOM_TYPEKIT_FONTS_VER', '1.0.10' );
28+
define( 'CUSTOM_TYPEKIT_FONTS_VER', '1.0.11' );
2929
/**
3030
* BSF Custom Fonts
3131
*/

languages/custom-typekit-fonts.pot

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Copyright (C) 2019 Brainstorm Force
2-
# This file is distributed under the same license as the Custom Typekit Fonts package.
2+
# This file is distributed under the same license as the Custom Adobe Fonts (Typekit) package.
33
msgid ""
44
msgstr ""
5-
"Project-Id-Version: Custom Typekit Fonts 1.0.10\n"
5+
"Project-Id-Version: Custom Adobe Fonts (Typekit) 1.0.11\n"
66
"Report-Msgid-Bugs-To: "
77
"https://wordpress.org/support/plugin/custom-typekit-fonts\n"
8-
"POT-Creation-Date: 2019-01-22 02:37:10+00:00\n"
8+
"POT-Creation-Date: 2019-03-25 11:29:25+00:00\n"
99
"MIME-Version: 1.0\n"
1010
"Content-Type: text/plain; charset=utf-8\n"
1111
"Content-Transfer-Encoding: 8bit\n"
@@ -26,7 +26,6 @@ msgstr ""
2626
"X-Generator: grunt-wp-i18n 1.0.3\n"
2727

2828
#: classes/class-custom-typekit-fonts-admin.php:80
29-
#: templates/custom-typekit-fonts-options.php:27
3029
msgid "Please Enter the Valid Kit ID to get the kit details."
3130
msgstr ""
3231

@@ -39,8 +38,11 @@ msgid "Custom Typekit Fonts settings have been successfully saved."
3938
msgstr ""
4039

4140
#: classes/class-custom-typekit-fonts-admin.php:106
42-
#: classes/class-custom-typekit-fonts-render.php:94
4341
#: templates/custom-typekit-fonts-options.php:11
42+
msgid "Adobe Fonts"
43+
msgstr ""
44+
45+
#: classes/class-custom-typekit-fonts-render.php:94
4446
msgid "Typekit Fonts"
4547
msgstr ""
4648

@@ -49,11 +51,15 @@ msgid "Settings"
4951
msgstr ""
5052

5153
#: templates/custom-typekit-fonts-options.php:24
52-
msgid "Kit ID:"
54+
msgid "Project ID:"
55+
msgstr ""
56+
57+
#: templates/custom-typekit-fonts-options.php:27
58+
msgid "Please Enter the Valid Project ID to get the kit details."
5359
msgstr ""
5460

5561
#: templates/custom-typekit-fonts-options.php:35
56-
msgid "Edit Kit ID"
62+
msgid "Edit Project ID"
5763
msgstr ""
5864

5965
#: templates/custom-typekit-fonts-options.php:39
@@ -93,8 +99,8 @@ msgstr ""
9399
#: templates/custom-typekit-fonts-options.php:112
94100
#. translators: %1$s: typekit site url.
95101
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."
102+
"You can get the Project ID <a href=%1$s target=\"_blank\" >here</a> from "
103+
"your Typekit Account. <b>Project ID</b> can be found next to the kit names."
98104
msgstr ""
99105

100106
#: templates/custom-typekit-fonts-options.php:123
@@ -117,20 +123,20 @@ msgstr ""
117123
msgid "Go To Customizer"
118124
msgstr ""
119125

120-
#: templates/white-label.php:12 templates/white-label.php:17
126+
#: templates/white-label.php:18 templates/white-label.php:23
121127
msgid "Custom Typekit Fonts Branding"
122128
msgstr ""
123129

124-
#: templates/white-label.php:23
130+
#: templates/white-label.php:29
125131
msgid "Plugin Name:"
126132
msgstr ""
127133

128-
#: templates/white-label.php:28
134+
#: templates/white-label.php:34
129135
msgid "Plugin Description:"
130136
msgstr ""
131137

132138
#. Plugin Name of the plugin/theme
133-
msgid "Custom Typekit Fonts"
139+
msgid "Custom Adobe Fonts (Typekit)"
134140
msgstr ""
135141

136142
#. Plugin URI of the plugin/theme
@@ -139,7 +145,7 @@ msgstr ""
139145

140146
#. Description of the plugin/theme
141147
msgid ""
142-
"Custom Typekit Fonts allows you to extends the fonts supports from the "
148+
"Custom Adobe Fonts allows you to extends the fonts supports from the "
143149
"Typekit."
144150
msgstr ""
145151

0 commit comments

Comments
 (0)