Code Duplication    Length = 16-19 lines in 2 locations

includes/plugins/sensei.php 1 location

@@ 15-30 (lines=16) @@
12
13
global $woothemes_sensei;
14
15
if ( ! function_exists( 'lsx_sensei_scripts_add_styles' ) ) :
16
17
	/**
18
	 * Sensei enqueue styles.
19
	 *
20
	 * @package    lsx
21
	 * @subpackage sensei
22
	 */
23
	function lsx_sensei_scripts_add_styles() {
24
		wp_enqueue_style( 'sensei-lsx', get_template_directory_uri() . '/assets/css/sensei.css', array( 'lsx_main' ), LSX_VERSION );
25
		wp_style_add_data( 'sensei-lsx', 'rtl', 'replace' );
26
	}
27
28
	add_action( 'wp_enqueue_scripts', 'lsx_sensei_scripts_add_styles' );
29
30
endif;
31
32
if ( ! function_exists( 'lsx_sensei_theme_wrapper_start' ) ) :
33

includes/welcome.php 1 location

@@ 76-94 (lines=19) @@
73
74
endif;
75
76
if ( ! function_exists( 'lsx_welcome_style' ) ) :
77
78
	/**
79
	 * Load welcome screen css.
80
	 *
81
	 * @package    lsx
82
	 * @subpackage welcome-page
83
	 *
84
	 * @param string $hook_suffix the current page hook suffix.
85
	 */
86
	function lsx_welcome_style( $hook_suffix ) {
87
		if ( 'appearance_page_lsx-welcome' === $hook_suffix ) {
88
			wp_enqueue_style( 'lsx-welcome-screen-mailchimp', '//cdn-images.mailchimp.com/embedcode/classic-10_7.css', array(), LSX_VERSION );
89
			wp_enqueue_style( 'lsx-welcome-screen', get_template_directory_uri() . '/assets/css/admin/welcome.css', array( 'lsx-welcome-screen-mailchimp' ), LSX_VERSION );
90
			wp_style_add_data( 'lsx-welcome-screen', 'rtl', 'replace' );
91
		}
92
	}
93
94
endif;
95
96
add_action( 'admin_enqueue_scripts', 'lsx_welcome_style' );
97