| 1 |
<?php |
| 2 |
|
| 3 |
/* |
| 4 |
* Plugin Name: Jetpack by WordPress.com |
| 5 |
* Plugin URI: http://wordpress.org/extend/plugins/jetpack/ |
| 6 |
* Description: Bring the power of the WordPress.com cloud to your self-hosted WordPress. Jetpack enables you to connect your blog to a WordPress.com account to use the powerful features normally only available to WordPress.com users. |
| 7 |
* Author: Automattic |
| 8 |
* Version: 3.1.5 |
| 9 |
* Author URI: http://jetpack.me |
| 10 |
* License: GPL2+ |
| 11 |
* Text Domain: jetpack |
| 12 |
* Domain Path: /languages/ |
| 13 |
*/ |
| 14 |
|
| 15 |
define( 'JETPACK__MINIMUM_WP_VERSION', '3.8' ); |
| 16 |
|
| 17 |
define( 'JETPACK__VERSION', '3.1.5' ); |
| 18 |
define( 'JETPACK_MASTER_USER', true ); |
| 19 |
define( 'JETPACK__API_VERSION', 1 ); |
| 20 |
define( 'JETPACK__PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); |
| 21 |
define( 'JETPACK__PLUGIN_FILE', __FILE__ ); |
| 22 |
|
| 23 |
defined( 'JETPACK_CLIENT__AUTH_LOCATION' ) or define( 'JETPACK_CLIENT__AUTH_LOCATION', 'header' ); |
| 24 |
defined( 'JETPACK_CLIENT__HTTPS' ) or define( 'JETPACK_CLIENT__HTTPS', 'AUTO' ); |
| 25 |
defined( 'JETPACK__GLOTPRESS_LOCALES_PATH' ) or define( 'JETPACK__GLOTPRESS_LOCALES_PATH', JETPACK__PLUGIN_DIR . 'locales.php' ); |
| 26 |
defined( 'JETPACK__API_BASE' ) or define( 'JETPACK__API_BASE', 'https://jetpack.wordpress.com/jetpack.' ); |
| 27 |
|
| 28 |
// @todo: Abstract out the admin functions, and only include them if is_admin() |
| 29 |
// @todo: Only include things like class.jetpack-sync.php if we're connected. |
| 30 |
require_once( JETPACK__PLUGIN_DIR . 'class.jetpack.php' ); |
| 31 |
require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-network.php' ); |
| 32 |
require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-client.php' ); |
| 33 |
require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-data.php' ); |
| 34 |
require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-client-server.php' ); |
| 35 |
require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-sync.php' ); |
| 36 |
require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-options.php' ); |
| 37 |
require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-user-agent.php' ); |
| 38 |
require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-post-images.php' ); |
| 39 |
require_once( JETPACK__PLUGIN_DIR . 'class.media-extractor.php' ); |
| 40 |
require_once( JETPACK__PLUGIN_DIR . 'class.media-summary.php' ); |
| 41 |
require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-error.php' ); |
| 42 |
require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-debugger.php' ); |
| 43 |
require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-heartbeat.php' ); |
| 44 |
require_once( JETPACK__PLUGIN_DIR . 'class.photon.php' ); |
| 45 |
require_once( JETPACK__PLUGIN_DIR . 'functions.photon.php' ); |
| 46 |
require_once( JETPACK__PLUGIN_DIR . 'functions.compat.php' ); |
| 47 |
require_once( JETPACK__PLUGIN_DIR . 'functions.gallery.php' ); |
| 48 |
require_once( JETPACK__PLUGIN_DIR . 'require-lib.php' ); |
| 49 |
|
| 50 |
if ( is_admin() ) { |
| 51 |
require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-admin.php' ); |
| 52 |
} |
| 53 |
|
| 54 |
// Play nice with http://wp-cli.org/ |
| 55 |
if ( defined( 'WP_CLI' ) && WP_CLI ) { |
| 56 |
require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-cli.php' ); |
| 57 |
} |
| 58 |
|
| 59 |
register_activation_hook( __FILE__, array( 'Jetpack', 'plugin_activation' ) ); |
| 60 |
register_deactivation_hook( __FILE__, array( 'Jetpack', 'plugin_deactivation' ) ); |
| 61 |
|
| 62 |
add_action( 'init', array( 'Jetpack', 'init' ) ); |
| 63 |
add_action( 'plugins_loaded', array( 'Jetpack', 'load_modules' ), 100 ); |
| 64 |
add_filter( 'jetpack_static_url', array( 'Jetpack', 'staticize_subdomain' ) ); |
| 65 |
|
| 66 |
/** |
| 67 |
* Add an easy way to photon-ize a URL that is safe to call even if Jetpack isn't active. |
| 68 |
* |
| 69 |
* See: http://jetpack.me/2013/07/11/photon-and-themes/ |
| 70 |
*/ |
| 71 |
if ( Jetpack::is_module_active( 'photon' ) ) { |
| 72 |
add_filter( 'jetpack_photon_url', 'jetpack_photon_url', 10, 3 ); |
| 73 |
} |
| 74 |
|
| 75 |
/* |
| 76 |
if ( is_admin() && ! Jetpack::check_identity_crisis() ) { |
| 77 |
Jetpack_Sync::sync_options( __FILE__, 'db_version', 'jetpack_active_modules', 'active_plugins' ); |
| 78 |
} |
| 79 |
*/ |
| 80 |
|
| 81 |
require_once( JETPACK__PLUGIN_DIR . '3rd-party/3rd-party.php' ); |
| 82 |
|