jetpack
Last commit date
3rd-party
2 months ago
_inc
1 month ago
css
4 months ago
extensions
1 month ago
images
2 months ago
jetpack_vendor
1 month ago
json-endpoints
2 months ago
modules
1 month ago
sal
2 months ago
src
3 months ago
vendor
1 month ago
views
1 month ago
CHANGELOG.md
1 month ago
LICENSE.txt
5 months ago
SECURITY.md
2 years ago
class-jetpack-connection-status.php
2 years ago
class-jetpack-gallery-settings.php
6 months ago
class-jetpack-newsletter-dashboard-widget.php
6 months ago
class-jetpack-pre-connection-jitms.php
2 years ago
class-jetpack-stats-dashboard-widget.php
3 months ago
class-jetpack-xmlrpc-methods.php
6 months ago
class.frame-nonce-preview.php
6 months ago
class.jetpack-admin.php
3 months ago
class.jetpack-autoupdate.php
6 months ago
class.jetpack-cli.php
5 months ago
class.jetpack-client-server.php
2 years ago
class.jetpack-gutenberg.php
2 months ago
class.jetpack-heartbeat.php
3 months ago
class.jetpack-modules-list-table.php
6 months ago
class.jetpack-network-sites-list-table.php
6 months ago
class.jetpack-network.php
1 month ago
class.jetpack-plan.php
2 years ago
class.jetpack-post-images.php
2 months ago
class.jetpack-twitter-cards.php
3 months ago
class.jetpack-user-agent.php
2 years ago
class.jetpack.php
2 months ago
class.json-api-endpoints.php
4 months ago
class.json-api.php
5 months ago
class.photon.php
3 years ago
composer.json
1 month ago
enhanced-open-graph.php
3 months ago
functions.compat.php
3 months ago
functions.cookies.php
2 years ago
functions.global.php
6 months ago
functions.is-mobile.php
2 years ago
functions.opengraph.php
2 months ago
functions.photon.php
2 years ago
jetpack.php
1 month ago
json-api-config.php
3 years ago
json-endpoints.php
2 years ago
load-jetpack.php
2 months ago
locales.php
6 months ago
readme.txt
1 month ago
unauth-file-upload.php
6 months ago
uninstall.php
6 months ago
wpml-config.xml
3 years ago
class-jetpack-connection-status.php
34 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Jetpack Connection Status. |
| 4 | * |
| 5 | * Filters the Connection Status API response |
| 6 | * |
| 7 | * @package jetpack |
| 8 | */ |
| 9 | |
| 10 | /** |
| 11 | * Filters the Connection Status API response |
| 12 | */ |
| 13 | class Jetpack_Connection_Status { |
| 14 | |
| 15 | /** |
| 16 | * Initialize the main hooks. |
| 17 | */ |
| 18 | public static function init() { |
| 19 | add_filter( 'jetpack_connection_status', array( __CLASS__, 'filter_connection_status' ) ); |
| 20 | } |
| 21 | |
| 22 | /** |
| 23 | * Filters the connection status API response of the Connection package and modifies isActive value expected by the UI. |
| 24 | * |
| 25 | * @param array $status An array containing the connection status data. |
| 26 | */ |
| 27 | public static function filter_connection_status( $status ) { |
| 28 | |
| 29 | $status['isActive'] = Jetpack::is_connection_ready(); |
| 30 | |
| 31 | return $status; |
| 32 | } |
| 33 | } |
| 34 |