Skip to content

Commit

Permalink
Merge pull request #18 from brainstormforce/whitelabel-improvements
Browse files Browse the repository at this point in the history
- Improvement: Allow whitelabel settings to be setup from using constants when using Astra Pro.
  • Loading branch information
Nikschavan authored Mar 25, 2019
2 parents d7510ce + 5d2e9e0 commit 514a3b4
Show file tree
Hide file tree
Showing 10 changed files with 166 additions and 131 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Custom Typekit Fonts #
**Contributors:** [brainstormforce](https://profiles.wordpress.org/brainstormforce)
# Custom Adobe Fonts (Typekit) #
**Contributors:** [brainstormforce](https://profiles.wordpress.org/brainstormforce)
**Donate link:** https://www.paypal.me/BrainstormForce
**Tags:** custom typekit fonts, theme custom fonts, unlimited typekit custom fonts
**Tags:** custom adobe fonts, theme custom fonts, unlimited typekit custom fonts
**Requires at least:** 4.4
**Tested up to:** 5.1
**Stable tag:** 1.0.10
**Stable tag:** 1.0.11
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html

Custom Typekit Fonts allows you to extends the fonts supports from the Typekit.
Custom Adobe Fonts allows you to extends the fonts supports from the Typekit.

## Description ##

This plugin helps you easily embed Typekit fonts easily in your WordPress website.
This plugin helps you easily embed adobe fonts easily in your WordPress website.

Currently it works with:

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

## Changelog ##

### v1.0.11 ###
- Improvement: Allow whitelabel settings to be setup from using constants when using Astra Pro.

### v1.0.10 ###
- Fix: Remove typekit font from the Astra Theme's google fonts URL.

Expand Down
2 changes: 1 addition & 1 deletion classes/class-custom-typekit-fonts-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function set_custom_typekit_fonts_notice() {
*/
public function register_custom_fonts_menu() {

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

add_submenu_page(
'themes.php',
Expand Down
21 changes: 11 additions & 10 deletions classes/class-typekit-fonts-white-label.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function __construct() {
*/
function plugins_page( $plugins ) {

if ( ! is_callable( 'Astra_Ext_White_Label_Markup::get_white_label' ) ) {
if ( ! is_callable( 'Astra_Ext_White_Label_Markup::get_whitelabel_string' ) ) {
return $plugins;
}

Expand All @@ -81,10 +81,10 @@ function plugins_page( $plugins ) {
}

// Set White Labels.
$name = Astra_Ext_White_Label_Markup::get_white_label( 'custom-typekit-fonts', 'name' );
$description = Astra_Ext_White_Label_Markup::get_white_label( 'custom-typekit-fonts', 'description' );
$author = Astra_Ext_White_Label_Markup::get_white_label( 'astra-agency', 'author' );
$author_uri = Astra_Ext_White_Label_Markup::get_white_label( 'astra-agency', 'author_url' );
$name = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'custom-typekit-fonts', 'name' );
$description = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'custom-typekit-fonts', 'description' );
$author = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'astra-agency', 'author' );
$author_uri = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'astra-agency', 'author_url' );

if ( ! empty( $name ) ) {
$plugins[ CUSTOM_TYPEKIT_FONTS_BASE ]['Name'] = $name;
Expand Down Expand Up @@ -117,12 +117,13 @@ function plugins_page( $plugins ) {
*/
function white_label_custom_typekit_fonts_title( $title ) {

if ( is_callable( 'Astra_Ext_White_Label_Markup::get_white_label' ) ) {
$name = Astra_Ext_White_Label_Markup::get_white_label( 'custom-typekit-fonts', 'name' );
if ( is_callable( 'Astra_Ext_White_Label_Markup::get_whitelabel_string' ) ) {
$name = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'custom-typekit-fonts', 'name' );
if ( ! empty( $name ) ) {
$title = $name;
}
}

return $title;
}

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

if ( is_callable( 'Astra_Ext_White_Label_Markup::get_white_label' ) ) {
if ( is_callable( 'Astra_Ext_White_Label_Markup::get_whitelabel_string' ) ) {
if ( CUSTOM_TYPEKIT_FONTS_BASE == $plugin_file ) {
// Set White Labels.
$name = Astra_Ext_White_Label_Markup::get_white_label( 'custom-typekit-fonts', 'name' );
$description = Astra_Ext_White_Label_Markup::get_white_label( 'custom-typekit-fonts', 'description' );
$name = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'custom-typekit-fonts', 'name' );
$description = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'custom-typekit-fonts', 'description' );

if ( ! empty( $name ) ) {
// Remove Plugin URI if Agency White Label name is set.
Expand Down
8 changes: 4 additions & 4 deletions custom-typekit-fonts.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php
/**
* Plugin Name: Custom Typekit Fonts
* Plugin Name: Custom Adobe Fonts (Typekit)
* Plugin URI: http://www.wpastra.com/
* Description: Custom Typekit Fonts allows you to extends the fonts supports from the Typekit.
* Description: Custom Adobe Fonts allows you to extends the fonts supports from the Typekit.
* Author: Brainstorm Force
* Author URI: http://www.brainstormforce.com
* Text Domain: custom-typekit-fonts
* Version: 1.0.10
* Version: 1.0.11
*
* @package Typekit_Custom_Fonts
*/
Expand All @@ -25,7 +25,7 @@
define( 'CUSTOM_TYPEKIT_FONTS_BASE', plugin_basename( CUSTOM_TYPEKIT_FONTS_FILE ) );
define( 'CUSTOM_TYPEKIT_FONTS_DIR', plugin_dir_path( CUSTOM_TYPEKIT_FONTS_FILE ) );
define( 'CUSTOM_TYPEKIT_FONTS_URI', plugins_url( '/', CUSTOM_TYPEKIT_FONTS_FILE ) );
define( 'CUSTOM_TYPEKIT_FONTS_VER', '1.0.10' );
define( 'CUSTOM_TYPEKIT_FONTS_VER', '1.0.11' );
/**
* BSF Custom Fonts
*/
Expand Down
34 changes: 20 additions & 14 deletions languages/custom-typekit-fonts.pot
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright (C) 2019 Brainstorm Force
# This file is distributed under the same license as the Custom Typekit Fonts package.
# This file is distributed under the same license as the Custom Adobe Fonts (Typekit) package.
msgid ""
msgstr ""
"Project-Id-Version: Custom Typekit Fonts 1.0.10\n"
"Project-Id-Version: Custom Adobe Fonts (Typekit) 1.0.11\n"
"Report-Msgid-Bugs-To: "
"https://wordpress.org/support/plugin/custom-typekit-fonts\n"
"POT-Creation-Date: 2019-01-22 02:37:10+00:00\n"
"POT-Creation-Date: 2019-03-25 11:29:25+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand All @@ -26,7 +26,6 @@ msgstr ""
"X-Generator: grunt-wp-i18n 1.0.3\n"

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

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

#: classes/class-custom-typekit-fonts-admin.php:106
#: classes/class-custom-typekit-fonts-render.php:94
#: templates/custom-typekit-fonts-options.php:11
msgid "Adobe Fonts"
msgstr ""

#: classes/class-custom-typekit-fonts-render.php:94
msgid "Typekit Fonts"
msgstr ""

Expand All @@ -49,11 +51,15 @@ msgid "Settings"
msgstr ""

#: templates/custom-typekit-fonts-options.php:24
msgid "Kit ID:"
msgid "Project ID:"
msgstr ""

#: templates/custom-typekit-fonts-options.php:27
msgid "Please Enter the Valid Project ID to get the kit details."
msgstr ""

#: templates/custom-typekit-fonts-options.php:35
msgid "Edit Kit ID"
msgid "Edit Project ID"
msgstr ""

#: templates/custom-typekit-fonts-options.php:39
Expand Down Expand Up @@ -93,8 +99,8 @@ msgstr ""
#: templates/custom-typekit-fonts-options.php:112
#. translators: %1$s: typekit site url.
msgid ""
"You can get the Kit ID <a href=%1$s target=\"_blank\" >here</a> from your "
"Typekit Account. <b>Kit ID</b> can be found next to the kit names."
"You can get the Project ID <a href=%1$s target=\"_blank\" >here</a> from "
"your Typekit Account. <b>Project ID</b> can be found next to the kit names."
msgstr ""

#: templates/custom-typekit-fonts-options.php:123
Expand All @@ -117,20 +123,20 @@ msgstr ""
msgid "Go To Customizer"
msgstr ""

#: templates/white-label.php:12 templates/white-label.php:17
#: templates/white-label.php:18 templates/white-label.php:23
msgid "Custom Typekit Fonts Branding"
msgstr ""

#: templates/white-label.php:23
#: templates/white-label.php:29
msgid "Plugin Name:"
msgstr ""

#: templates/white-label.php:28
#: templates/white-label.php:34
msgid "Plugin Description:"
msgstr ""

#. Plugin Name of the plugin/theme
msgid "Custom Typekit Fonts"
msgid "Custom Adobe Fonts (Typekit)"
msgstr ""

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

#. Description of the plugin/theme
msgid ""
"Custom Typekit Fonts allows you to extends the fonts supports from the "
"Custom Adobe Fonts allows you to extends the fonts supports from the "
"Typekit."
msgstr ""

Expand Down
Loading

0 comments on commit 514a3b4

Please sign in to comment.