updated plugin Menu Icons version 0.12.4

This commit is contained in:
2020-07-24 14:08:54 +00:00
committed by Gitium
parent 7e9ae89290
commit 4b9aecd896
54 changed files with 10903 additions and 245 deletions

View File

@ -55,6 +55,12 @@ final class Menu_Icons_Settings {
* @since 0.3.0
*/
public static function init() {
// Include Menu Icons for Block Editor
if ( class_exists( '\ThemeIsle\GutenbergMenuIcons' ) ) {
\ThemeIsle\GutenbergMenuIcons::instance();
add_action( 'enqueue_block_assets', array( __CLASS__, '_enqueue_font_awesome' ) );
}
/**
* Allow themes/plugins to override the default settings
*
@ -641,6 +647,21 @@ final class Menu_Icons_Settings {
return $sections;
}
/**
* Enqueue scripts & styles for Block Icons
*
* @since 0.3.0
* @wp_hook action enqueue_block_assets
*/
public static function _enqueue_font_awesome() {
$url = Menu_Icons::get( 'url' );
wp_register_style(
'font-awesome-5',
"{$url}css/fontawesome/css/all.min.css"
);
}
/**
* Enqueue scripts & styles for Appearance > Menus page
*
@ -690,7 +711,7 @@ final class Menu_Icons_Settings {
$menu_current_theme = '';
$theme = wp_get_theme();
if ( ! empty( $theme ) ) {
if ( is_child_theme() ) {
if ( is_child_theme() && $theme->parent() ) {
$menu_current_theme = $theme->parent()->get( 'Name' );
} else {
$menu_current_theme = $theme->get( 'Name' );