Skip to content

Commit b3680ab

Browse files
committed
Display whitelabelled strings from constants in the whitelabel settings screen
1 parent b7788a7 commit b3680ab

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

templates/white-label.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
* @package Custom Typekit Fonts
66
*/
77

8+
?>
9+
<?php
10+
// Bail from displaying settings screen if Astra Pro is older version.
11+
if ( ! is_callable( 'Astra_Ext_White_Label_Markup::get_whitelabel_strings', true ) ) {
12+
return;
13+
}
814
?>
915
<li>
1016
<div class="branding-form postbox">
@@ -21,12 +27,12 @@
2127
<div class="form-wrap">
2228
<div class="form-field">
2329
<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'] ); ?>">
30+
<input type="text" name="ast_white_label[custom-typekit-fonts][name]" class="placeholder placeholder-active" <?php disabled( defined( Astra_Ext_White_Label_Markup::branding_key_to_constant( 'custom-typekit-fonts', 'name' ) ), true, true ); ?> value="<?php echo esc_attr( Astra_Ext_White_Label_Markup::get_whitelabel_string( 'custom-typekit-fonts', 'name' ) ); ?>">
2531
</label>
2632
</div>
2733
<div class="form-field">
2834
<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>
35+
<textarea name="ast_white_label[custom-typekit-fonts][description]" class="placeholder placeholder-active" <?php disabled( defined( Astra_Ext_White_Label_Markup::branding_key_to_constant( 'custom-typekit-fonts', 'description' ) ), true, true ); ?> rows="2"><?php echo esc_attr( Astra_Ext_White_Label_Markup::get_whitelabel_string( 'custom-typekit-fonts', 'description' ) ); ?></textarea>
3036
</label>
3137
</div>
3238
<div class="clear"></div>

0 commit comments

Comments
 (0)