This commit is contained in:
Alexander Agnarson 2020-02-25 18:04:54 +01:00
parent 62def2a89b
commit 7ad333b360
167 changed files with 2955 additions and 2493 deletions

View file

@ -8,7 +8,7 @@
* @category Core
* @author Ari Stathopoulos (@aristath)
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
* @license https://opensource.org/licenses/MIT
* @license https://opensource.org/licenses/MIT
* @since 1.0
*/
@ -237,16 +237,13 @@ class Kirki extends Kirki_Init {
_doing_it_wrong( __METHOD__, esc_html__( 'Kirki fields should not be added on customize_register. Please add them directly, or on init.', 'kirki' ), '3.0.10' );
}
parent::maybe_show_fontawesome_nag( $args );
// Early exit if 'type' is not defined.
if ( ! isset( $args['type'] ) ) {
return;
}
// If the field is font-awesome, enqueue the icons on the frontend.
if ( class_exists( 'Kirki_Modules_CSS' ) && ( 'fontawesome' === $args['type'] || 'kirki-fontawesome' === $args['type'] ) ) {
Kirki_Modules_CSS::add_fontawesome_script();
}
$str = str_replace( array( '-', '_' ), ' ', $args['type'] );
$classname = 'Kirki_Field_' . str_replace( ' ', '_', ucwords( $str ) );
if ( class_exists( $classname ) ) {