Skip to content

Commit

Permalink
fixes #1302
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath committed Apr 25, 2017
1 parent dae3ffc commit 564e9a5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions core/class-kirki-init.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public function __construct() {
add_action( 'customize_update_user_meta', array( $this, 'update_user_meta' ), 10, 2 );
add_action( 'wp_loaded', array( $this, 'add_to_customizer' ), 1 );
add_filter( 'kirki/control_types', array( $this, 'default_control_types' ) );
add_filter( 'acf/settings/select2_version', array( $this, 'acf_select2_version' ), 99 );
}

/**
Expand Down Expand Up @@ -268,4 +269,19 @@ public function fields_from_filters() {
public function update_user_meta( $value, $wp_customize_setting ) {
update_user_meta( get_current_user_id(), $wp_customize_setting->id, $value );
}

/**
* Changes select2 version in ACF.
* Fixes a plugin conflict that was causing select fields to crash
* because of a version mismatch between ACF's and Kirki's select2 scripts.
* Props @hellor0bot
*
* @see https://github.com/aristath/kirki/issues/1302
* @access public
* @since 3.0.0
* @return int
*/
public function acf_select2_version() {
return 4;
}
}

0 comments on commit 564e9a5

Please sign in to comment.