PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 3.0.6
Jetpack – WP Security, Backup, Speed, & Growth v3.0.6
16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 14.1.1 14.2.2 14.3.1 All 501 releases
jetpack / jetpack.php
jetpack.php
89 lines 4.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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.0.6
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 define( 'JETPACK__VERSION', '3.0.6' );
17 define( 'JETPACK_MASTER_USER', true );
18 define( 'JETPACK__API_VERSION', 1 );
19 define( 'JETPACK__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
20
21 defined( 'JETPACK_CLIENT__AUTH_LOCATION' ) or define( 'JETPACK_CLIENT__AUTH_LOCATION', 'header' );
22 defined( 'JETPACK_CLIENT__HTTPS' ) or define( 'JETPACK_CLIENT__HTTPS', 'AUTO' );
23 defined( 'JETPACK__GLOTPRESS_LOCALES_PATH' ) or define( 'JETPACK__GLOTPRESS_LOCALES_PATH', JETPACK__PLUGIN_DIR . 'locales.php' );
24 defined( 'JETPACK__API_BASE' ) or define( 'JETPACK__API_BASE', 'https://jetpack.wordpress.com/jetpack.' );
25
26 // Constants for expressing human-readable intervals
27 // in their respective number of seconds.
28 // Introduced in WordPress 3.5, specified here for backward compatibility.
29 defined( 'MINUTE_IN_SECONDS' ) or define( 'MINUTE_IN_SECONDS', 60 );
30 defined( 'HOUR_IN_SECONDS' ) or define( 'HOUR_IN_SECONDS', 60 * MINUTE_IN_SECONDS );
31 defined( 'DAY_IN_SECONDS' ) or define( 'DAY_IN_SECONDS', 24 * HOUR_IN_SECONDS );
32 defined( 'WEEK_IN_SECONDS' ) or define( 'WEEK_IN_SECONDS', 7 * DAY_IN_SECONDS );
33 defined( 'YEAR_IN_SECONDS' ) or define( 'YEAR_IN_SECONDS', 365 * DAY_IN_SECONDS );
34
35 // @todo: Abstract out the admin functions, and only include them if is_admin()
36 // @todo: Only include things like class.jetpack-sync.php if we're connected.
37 require_once( JETPACK__PLUGIN_DIR . 'class.jetpack.php' );
38 require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-network.php' );
39 require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-client.php' );
40 require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-data.php' );
41 require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-client-server.php' );
42 require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-sync.php' );
43 require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-options.php' );
44 require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-user-agent.php' );
45 require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-post-images.php' );
46 require_once( JETPACK__PLUGIN_DIR . 'class.media-extractor.php' );
47 require_once( JETPACK__PLUGIN_DIR . 'class.media-summary.php' );
48 require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-error.php' );
49 require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-debugger.php' );
50 require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-heartbeat.php' );
51 require_once( JETPACK__PLUGIN_DIR . 'class.photon.php' );
52 require_once( JETPACK__PLUGIN_DIR . 'functions.photon.php' );
53 require_once( JETPACK__PLUGIN_DIR . 'functions.compat.php' );
54 require_once( JETPACK__PLUGIN_DIR . 'functions.gallery.php' );
55 require_once( JETPACK__PLUGIN_DIR . 'require-lib.php' );
56
57 if ( is_admin() ) {
58 require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-admin.php' );
59 }
60
61 // Play nice with http://wp-cli.org/
62 if ( defined( 'WP_CLI' ) && WP_CLI ) {
63 require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-cli.php' );
64 }
65
66 register_activation_hook( __FILE__, array( 'Jetpack', 'plugin_activation' ) );
67 register_deactivation_hook( __FILE__, array( 'Jetpack', 'plugin_deactivation' ) );
68
69 add_action( 'init', array( 'Jetpack', 'init' ) );
70 add_action( 'plugins_loaded', array( 'Jetpack', 'load_modules' ), 100 );
71 add_filter( 'jetpack_static_url', array( 'Jetpack', 'staticize_subdomain' ) );
72
73 /**
74 * Add an easy way to photon-ize a URL that is safe to call even if Jetpack isn't active.
75 *
76 * See: http://jetpack.me/2013/07/11/photon-and-themes/
77 */
78 if ( Jetpack::is_module_active( 'photon' ) ) {
79 add_filter( 'jetpack_photon_url', 'jetpack_photon_url', 10, 3 );
80 }
81
82 /*
83 if ( is_admin() && ! Jetpack::check_identity_crisis() ) {
84 Jetpack_Sync::sync_options( __FILE__, 'db_version', 'jetpack_active_modules', 'active_plugins' );
85 }
86 */
87
88 require_once( JETPACK__PLUGIN_DIR . '3rd-party/3rd-party.php' );
89