Skip to content

Commit

Permalink
Merge branch 'develop' into telemetry
Browse files Browse the repository at this point in the history
* develop:
  fix: undefined index PHP notice for background-color
  ran npm audit fix
  156 Line missing textdomain
  update google-font json files
  possible fix for #1925
  #1914 passes required envato check for is_plugin_active
  Fix coding style
  Add ability to use "Default Browser Font-Family" in default value
  • Loading branch information
aristath committed Jun 27, 2018
2 parents 2199430 + 95ca010 commit 362f71f
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion controls/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -3387,7 +3387,7 @@ wp.customize.controlConstructor['kirki-typography'] = wp.customize.kirkiDynamicC
} );

// Set the initial value.
if ( value['font-family'] ) {
if ( value['font-family'] || '' === value['font-family'] ) {
fontSelect.val( value['font-family'].replace( /'/g, '"' ) ).trigger( 'change' );
}

Expand Down
2 changes: 1 addition & 1 deletion controls/js/script.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion controls/js/src/typography.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ wp.customize.controlConstructor['kirki-typography'] = wp.customize.kirkiDynamicC
} );

// Set the initial value.
if ( value['font-family'] ) {
if ( value['font-family'] || '' === value['font-family'] ) {
fontSelect.val( value['font-family'].replace( /'/g, '"' ) ).trigger( 'change' );
}

Expand Down
2 changes: 1 addition & 1 deletion core/class-kirki-util.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public static function is_plugin() {
include_once ABSPATH . 'wp-admin/includes/plugin.php';

// Extra logic in case the plugin is installed but not activated.
if ( $_plugin && ! is_plugin_active( $_plugin ) ) {
if ( $_plugin && is_plugin_inactive( $_plugin ) ) {
return false;
}
return $is_plugin;
Expand Down
2 changes: 1 addition & 1 deletion docs/files/class-kirki-installer-section.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ protected function dismiss_button() {
event.preventDefault();

<?php if ( $show_confirm ) : ?>
if ( ! confirm( '<?php esc_attr_e( 'Are you sure? Dismissing this message will hide the installation recommendation and you will have to manually install and activate the plugin in the future.' ); ?>' ) ) {
if ( ! confirm( '<?php esc_attr_e( 'Are you sure? Dismissing this message will hide the installation recommendation and you will have to manually install and activate the plugin in the future.', 'textdomain' ); ?>' ) ) {
return;
}
<?php endif; ?>
Expand Down
2 changes: 1 addition & 1 deletion modules/css/field/class-kirki-output-field-background.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected function process_output( $output, $value ) {
foreach ( array( 'background-image', 'background-color', 'background-repeat', 'background-position', 'background-size', 'background-attachment' ) as $property ) {

// See https://github.com/aristath/kirki/issues/1808.
if ( 'background-color' === $property && ( ! isset( $value['background-image'] ) || empty( $value['background-image'] ) ) ) {
if ( 'background-color' === $property && isset( $value['background-color'] ) && ( ! isset( $value['background-image'] ) || empty( $value['background-image'] ) ) ) {
$this->styles[ $output['media_query'] ][ $output['element'] ]['background'] = $output['prefix'] . $this->process_property_value( $property, $value[ $property ] ) . $output['suffix'];
}

Expand Down
3 changes: 2 additions & 1 deletion modules/webfonts/class-kirki-fonts-google-local.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ private function __construct( $family ) {
$key = sanitize_key( $this->family );
$this->folder_path = $this->get_root_path() . "/$key";
$this->folder_url = $this->get_root_url() . "/$key";
$this->files = $this->get_font_family();
$this->files = $this->get_font_family();
}

/**
Expand Down Expand Up @@ -437,6 +437,7 @@ public function get_root_url() {
$url = str_replace( $original_domain, $mapped_domain, $url );
}
}
$url = set_url_scheme( $url );
return apply_filters( 'kirki_googlefonts_root_url', untrailingslashit( esc_url_raw( $url ) ) . '/webfonts' );
}

Expand Down
2 changes: 1 addition & 1 deletion modules/webfonts/webfont-files.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion modules/webfonts/webfont-names.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion modules/webfonts/webfonts.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"node": ">= 0.10.0"
},
"devDependencies": {
"grunt": "*",
"grunt": "^1.0.3",
"grunt-contrib-clean": "*",
"grunt-contrib-concat": "*",
"grunt-contrib-sass": "*",
Expand Down

0 comments on commit 362f71f

Please sign in to comment.