@@ 1257-1268 (lines=12) @@ | ||
1254 | * |
|
1255 | * @return bool Whether the widget is present in a given sidebar. |
|
1256 | */ |
|
1257 | static function has_business_address_widget( $sidebar ) { |
|
1258 | $sidebars_widgets = get_option( 'sidebars_widgets', array() ); |
|
1259 | if ( ! isset( $sidebars_widgets[ $sidebar ] ) ) { |
|
1260 | return false; |
|
1261 | } |
|
1262 | foreach ( $sidebars_widgets[ $sidebar ] as $widget ) { |
|
1263 | if ( strpos( $widget, 'widget_contact_info' ) !== false ) { |
|
1264 | return true; |
|
1265 | } |
|
1266 | } |
|
1267 | return false; |
|
1268 | } |
|
1269 | ||
1270 | /** |
|
1271 | * Calls WPCOM through authenticated request to create, regenerate or delete the Post by Email address. |
@@ 135-145 (lines=11) @@ | ||
132 | return Jetpack_Options::get_option( 'id' ); |
|
133 | } |
|
134 | ||
135 | private function is_set_up() { |
|
136 | $option = get_option( self::$option_name ); |
|
137 | if ( ! $option ) { |
|
138 | return false; |
|
139 | } |
|
140 | $data = json_decode( $option, true ); |
|
141 | if ( isset( $data['follower_list_id'], $data['follower_list_id'] ) ) { |
|
142 | return true; |
|
143 | } |
|
144 | return false; |
|
145 | } |
|
146 | ||
147 | private function get_site_slug() { |
|
148 | if ( class_exists( 'Jetpack' ) && method_exists( 'Jetpack', 'build_raw_urls' ) ) { |