From 8c60e7f42dc8f72aa2e2eb51b9539c24cee50151 Mon Sep 17 00:00:00 2001 From: jorge-vitrubio Date: Fri, 22 Jul 2022 14:18:04 +0200 Subject: [PATCH] include admin styles --- includes/hangar-stylesheet-admin.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/includes/hangar-stylesheet-admin.php b/includes/hangar-stylesheet-admin.php index 0a794ce..0649878 100644 --- a/includes/hangar-stylesheet-admin.php +++ b/includes/hangar-stylesheet-admin.php @@ -19,8 +19,11 @@ * @subpackage hangar-wp-plugin/includes * @author Jorge - vitrubio.net */ - -function hangar_admin_styles() { - add_editor_style( 'assets/css/hangar-wpplugin-admin-styles.css' ); -} -add_action( 'admin_init', 'hangar_admin_styles' ); + if( ! function_exists('hangar_admin_styles') ){ + function hangar_admin_styles() { + if ( is_admin() ) { + add_editor_style( 'assets/css/hangar-wpplugin-admin-styles.css' ); + } + } + add_action( 'admin_init', 'hangar_admin_styles' ); + }