| @@ 22-39 (lines=18) @@ | ||
| 19 | /** |
|
| 20 | * Constructor |
|
| 21 | */ |
|
| 22 | function __construct() { |
|
| 23 | $widget_ops = array( |
|
| 24 | 'classname' => 'widget_contact_info', |
|
| 25 | 'description' => __( 'Display a map with your location, hours, and contact information.', 'jetpack' ), |
|
| 26 | 'customize_selective_refresh' => true, |
|
| 27 | ); |
|
| 28 | parent::__construct( |
|
| 29 | 'widget_contact_info', |
|
| 30 | /** This filter is documented in modules/widgets/facebook-likebox.php */ |
|
| 31 | apply_filters( 'jetpack_widget_name', __( 'Contact Info & Map', 'jetpack' ) ), |
|
| 32 | $widget_ops |
|
| 33 | ); |
|
| 34 | $this->alt_option_name = 'widget_contact_info'; |
|
| 35 | ||
| 36 | if ( is_customize_preview() ) { |
|
| 37 | add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); |
|
| 38 | } |
|
| 39 | } |
|
| 40 | ||
| 41 | /** |
|
| 42 | * Enqueue scripts and styles. |
|
| @@ 140-155 (lines=16) @@ | ||
| 137 | public static $cron_name = 'jetpack_display_posts_widget_cron_update'; |
|
| 138 | ||
| 139 | ||
| 140 | public function __construct() { |
|
| 141 | parent::__construct( |
|
| 142 | // internal id |
|
| 143 | 'jetpack_display_posts_widget', |
|
| 144 | /** This filter is documented in modules/widgets/facebook-likebox.php */ |
|
| 145 | apply_filters( 'jetpack_widget_name', __( 'Display WordPress Posts', 'jetpack' ) ), |
|
| 146 | array( |
|
| 147 | 'description' => __( 'Displays a list of recent posts from another WordPress.com or Jetpack-enabled blog.', 'jetpack' ), |
|
| 148 | 'customize_selective_refresh' => true, |
|
| 149 | ) |
|
| 150 | ); |
|
| 151 | ||
| 152 | if ( is_customize_preview() ) { |
|
| 153 | add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); |
|
| 154 | } |
|
| 155 | } |
|
| 156 | ||
| 157 | /** |
|
| 158 | * Expiring transients have a name length maximum of 45 characters, |
|