@@ 19-34 (lines=16) @@ | ||
16 | /** |
|
17 | * Constructor. |
|
18 | */ |
|
19 | function __construct() { |
|
20 | parent::__construct( |
|
21 | 'flickr', |
|
22 | /** This filter is documented in modules/widgets/facebook-likebox.php */ |
|
23 | apply_filters( 'jetpack_widget_name', esc_html__( 'Flickr', 'jetpack' ) ), |
|
24 | array( |
|
25 | 'description' => esc_html__( 'Display your recent Flickr photos.', 'jetpack' ), |
|
26 | 'customize_selective_refresh' => true, |
|
27 | ), |
|
28 | array() |
|
29 | ); |
|
30 | ||
31 | if ( is_active_widget( false, false, $this->id_base ) || is_customize_preview() ) { |
|
32 | add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_style' ) ); |
|
33 | } |
|
34 | } |
|
35 | ||
36 | /** |
|
37 | * Enqueue style. |
@@ 4-17 (lines=14) @@ | ||
1 | <?php |
|
2 | ||
3 | class Jetpack_Upcoming_Events_Widget extends WP_Widget { |
|
4 | function __construct() { |
|
5 | parent::__construct( |
|
6 | 'upcoming_events_widget', |
|
7 | /** This filter is documented in modules/widgets/facebook-likebox.php */ |
|
8 | apply_filters( 'jetpack_widget_name', __( 'Upcoming Events', 'jetpack' ) ), |
|
9 | array( |
|
10 | 'description' => __( 'Display upcoming events from an iCalendar feed.', 'jetpack' ), |
|
11 | 'customize_selective_refresh' => true, |
|
12 | ) |
|
13 | ); |
|
14 | if ( is_active_widget( false, false, $this->id_base ) ) { |
|
15 | add_action( 'wp_head', array( $this, 'css' ) ); |
|
16 | } |
|
17 | } |
|
18 | ||
19 | function css() { |
|
20 | ?> |
@@ 80-95 (lines=16) @@ | ||
77 | /** |
|
78 | * Constructor. |
|
79 | */ |
|
80 | function __construct() { |
|
81 | parent::__construct( |
|
82 | 'eu_cookie_law_widget', |
|
83 | /** This filter is documented in modules/widgets/facebook-likebox.php */ |
|
84 | apply_filters( 'jetpack_widget_name', esc_html__( 'Cookies & Consents Banner', 'jetpack' ) ), |
|
85 | array( |
|
86 | 'description' => esc_html__( 'Display a banner for EU Cookie Law and GDPR compliance.', 'jetpack' ), |
|
87 | 'customize_selective_refresh' => true, |
|
88 | ), |
|
89 | array() |
|
90 | ); |
|
91 | ||
92 | if ( is_active_widget( false, false, $this->id_base ) || is_customize_preview() ) { |
|
93 | add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_frontend_scripts' ) ); |
|
94 | } |
|
95 | } |
|
96 | ||
97 | /** |
|
98 | * Enqueue scripts and styles. |