PHP code example of oskosk / jetpack-api
1. Go to this page and download the library: Download oskosk/jetpack-api library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
oskosk / jetpack-api example snippets
// This is your plugin file
if ( ! class_exists( 'JetpackApi' ) ) {
ments();
// Check if a Jetpack feature is available
if ( JetpackApi::is_feature_available( 'photon' ) ) {
// Do stuff with photon
}
// Check if Jetpack is connected
if ( JetpackApi::is_connected() ) {
// Use safely anything that Jetpack disabled until it's been connected
}