| @@ 57-59 (lines=3) @@ | ||
| 54 | add_action( 'admin_enqueue_scripts', array( __class__, 'enqueue_admin' ) ); |
|
| 55 | add_action( 'wp_footer', array( $this, 'localize_script' ) ); |
|
| 56 | ||
| 57 | if ( is_active_widget( false, false, $this->id_base, true ) || is_active_widget( false, false, 'monster', true ) || is_customize_preview() ) { |
|
| 58 | add_action( 'wp_head', array( __class__, 'styles_template' ) ); |
|
| 59 | } |
|
| 60 | } |
|
| 61 | ||
| 62 | public static function enqueue_admin( $hook_suffix ) { |
|
| @@ 38-40 (lines=3) @@ | ||
| 35 | ) |
|
| 36 | ); |
|
| 37 | ||
| 38 | if ( is_active_widget( false, false, $this->id_base ) || is_active_widget( false, false, 'monster' ) || is_customize_preview() ) { |
|
| 39 | add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); |
|
| 40 | } |
|
| 41 | ||
| 42 | add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) ); |
|
| 43 | } |
|
| @@ 42-50 (lines=9) @@ | ||
| 39 | $widget_ops |
|
| 40 | ); |
|
| 41 | ||
| 42 | if ( self::is_jetpack() && |
|
| 43 | ( |
|
| 44 | is_active_widget( false, false, $this->id_base ) || |
|
| 45 | is_active_widget( false, false, 'monster' ) || |
|
| 46 | is_customize_preview() |
|
| 47 | ) |
|
| 48 | ) { |
|
| 49 | add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_style' ) ); |
|
| 50 | } |
|
| 51 | } |
|
| 52 | ||
| 53 | /** |
|