| @@ 26-49 (lines=24) @@ | ||
| 23 | private $max_height = 9999; |
|
| 24 | private $min_height = 130; |
|
| 25 | ||
| 26 | function __construct() { |
|
| 27 | parent::__construct( |
|
| 28 | 'facebook-likebox', |
|
| 29 | /** |
|
| 30 | * Filter the name of a widget included in the Extra Sidebar Widgets module. |
|
| 31 | * |
|
| 32 | * @module widgets |
|
| 33 | * |
|
| 34 | * @since 2.1.2 |
|
| 35 | * |
|
| 36 | * @param string $widget_name Widget title. |
|
| 37 | */ |
|
| 38 | apply_filters( 'jetpack_widget_name', __( 'Facebook Page Plugin', 'jetpack' ) ), |
|
| 39 | array( |
|
| 40 | 'classname' => 'widget_facebook_likebox', |
|
| 41 | 'description' => __( 'Use the Facebook Page Plugin to connect visitors to your Facebook Page', 'jetpack' ), |
|
| 42 | 'customize_selective_refresh' => true, |
|
| 43 | ) |
|
| 44 | ); |
|
| 45 | ||
| 46 | if ( is_active_widget( false, false, $this->id_base ) || is_active_widget( false, false, 'monster' ) || is_customize_preview() ) { |
|
| 47 | add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); |
|
| 48 | } |
|
| 49 | } |
|
| 50 | ||
| 51 | /** |
|
| 52 | * Enqueue scripts. |
|
| @@ 33-49 (lines=17) @@ | ||
| 30 | /** |
|
| 31 | * Registers the widget with WordPress. |
|
| 32 | */ |
|
| 33 | function __construct() { |
|
| 34 | parent::__construct( |
|
| 35 | 'jetpack_my_community', // Base ID |
|
| 36 | /** This filter is documented in modules/widgets/facebook-likebox.php */ |
|
| 37 | apply_filters( 'jetpack_widget_name', esc_html__( 'My Community', 'jetpack' ) ), |
|
| 38 | array( |
|
| 39 | 'description' => esc_html__( "Display members of your site's community.", 'jetpack' ), |
|
| 40 | 'customize_selective_refresh' => true, |
|
| 41 | ) |
|
| 42 | ); |
|
| 43 | ||
| 44 | if ( is_active_widget( false, false, $this->id_base ) || is_active_widget( false, false, 'monster' ) || is_customize_preview() ) { |
|
| 45 | add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_style' ) ); |
|
| 46 | } |
|
| 47 | ||
| 48 | $this->default_title = esc_html__( 'Community', 'jetpack' ); |
|
| 49 | } |
|
| 50 | ||
| 51 | /** |
|
| 52 | * Enqueue stylesheet for grid layout. |
|
| @@ 24-39 (lines=16) @@ | ||
| 21 | /** |
|
| 22 | * Register widget with WordPress. |
|
| 23 | */ |
|
| 24 | public function __construct() { |
|
| 25 | parent::__construct( |
|
| 26 | 'image', |
|
| 27 | /** This filter is documented in modules/widgets/facebook-likebox.php */ |
|
| 28 | apply_filters( 'jetpack_widget_name', esc_html__( 'Image', 'jetpack' ) ), |
|
| 29 | array( |
|
| 30 | 'classname' => 'widget_image', |
|
| 31 | 'description' => __( 'Display an image in your sidebar', 'jetpack' ), |
|
| 32 | 'customize_selective_refresh' => true, |
|
| 33 | ) |
|
| 34 | ); |
|
| 35 | ||
| 36 | if ( is_active_widget( false, false, $this->id_base ) || is_active_widget( false, false, 'monster' ) || is_customize_preview() ) { |
|
| 37 | add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_style' ) ); |
|
| 38 | } |
|
| 39 | } |
|
| 40 | ||
| 41 | /** |
|
| 42 | * Loads file for front-end widget style. |
|
| @@ 796-813 (lines=18) @@ | ||
| 793 | */ |
|
| 794 | ||
| 795 | class Jetpack_Subscriptions_Widget extends WP_Widget { |
|
| 796 | function __construct() { |
|
| 797 | $widget_ops = array( |
|
| 798 | 'classname' => 'jetpack_subscription_widget', |
|
| 799 | 'description' => esc_html__( 'Add an email signup form to allow people to subscribe to your blog.', 'jetpack' ), |
|
| 800 | 'customize_selective_refresh' => true, |
|
| 801 | ); |
|
| 802 | ||
| 803 | parent::__construct( |
|
| 804 | 'blog_subscription', |
|
| 805 | /** This filter is documented in modules/widgets/facebook-likebox.php */ |
|
| 806 | apply_filters( 'jetpack_widget_name', __( 'Blog Subscriptions', 'jetpack' ) ), |
|
| 807 | $widget_ops |
|
| 808 | ); |
|
| 809 | ||
| 810 | if ( is_active_widget( false, false, $this->id_base ) || is_active_widget( false, false, 'monster' ) || is_customize_preview() ) { |
|
| 811 | add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_style' ) ); |
|
| 812 | } |
|
| 813 | } |
|
| 814 | ||
| 815 | /** |
|
| 816 | * Enqueue the form's CSS. |
|