diff options
author | Theo Chatzimichos <tampakrap@gentoo.org> | 2013-10-03 21:53:38 +0200 |
---|---|---|
committer | Theo Chatzimichos <tampakrap@gentoo.org> | 2013-10-03 21:53:38 +0200 |
commit | 61f7269ffabd11b7de56507c69191be42d7cfa60 (patch) | |
tree | 2ad81bec8d0c124019b23c841d80882c303801bc /plugins/jetpack/jetpack.php | |
parent | forgot to include new files of jetpack (diff) | |
download | blogs-gentoo-61f7269ffabd11b7de56507c69191be42d7cfa60.tar.gz blogs-gentoo-61f7269ffabd11b7de56507c69191be42d7cfa60.tar.bz2 blogs-gentoo-61f7269ffabd11b7de56507c69191be42d7cfa60.zip |
update jetpack
Diffstat (limited to 'plugins/jetpack/jetpack.php')
-rw-r--r-- | plugins/jetpack/jetpack.php | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/plugins/jetpack/jetpack.php b/plugins/jetpack/jetpack.php index 7c0fa023..882da7f0 100644 --- a/plugins/jetpack/jetpack.php +++ b/plugins/jetpack/jetpack.php @@ -5,7 +5,7 @@ * Plugin URI: http://wordpress.org/extend/plugins/jetpack/ * 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. * Author: Automattic - * Version: 2.3.3 + * Version: 2.5 * Author URI: http://jetpack.me * License: GPL2+ * Text Domain: jetpack @@ -14,10 +14,10 @@ defined( 'JETPACK__API_BASE' ) or define( 'JETPACK__API_BASE', 'https://jetpack.wordpress.com/jetpack.' ); define( 'JETPACK__API_VERSION', 1 ); -define( 'JETPACK__MINIMUM_WP_VERSION', '3.3' ); +define( 'JETPACK__MINIMUM_WP_VERSION', '3.5' ); defined( 'JETPACK_CLIENT__AUTH_LOCATION' ) or define( 'JETPACK_CLIENT__AUTH_LOCATION', 'header' ); defined( 'JETPACK_CLIENT__HTTPS' ) or define( 'JETPACK_CLIENT__HTTPS', 'AUTO' ); -define( 'JETPACK__VERSION', '2.3.3' ); +define( 'JETPACK__VERSION', '2.5' ); define( 'JETPACK__PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); defined( 'JETPACK__GLOTPRESS_LOCALES_PATH' ) or define( 'JETPACK__GLOTPRESS_LOCALES_PATH', JETPACK__PLUGIN_DIR . 'locales.php' ); @@ -49,19 +49,36 @@ require_once( JETPACK__PLUGIN_DIR . 'class.photon.php' ); require_once( JETPACK__PLUGIN_DIR . 'functions.photon.php' ); require_once( JETPACK__PLUGIN_DIR . 'functions.compat.php' ); require_once( JETPACK__PLUGIN_DIR . 'functions.gallery.php' ); +require_once( JETPACK__PLUGIN_DIR . 'functions.twitter-cards.php' ); +require_once( JETPACK__PLUGIN_DIR . 'require-lib.php' ); register_activation_hook( __FILE__, array( 'Jetpack', 'plugin_activation' ) ); register_deactivation_hook( __FILE__, array( 'Jetpack', 'plugin_deactivation' ) ); add_action( 'init', array( 'Jetpack', 'init' ) ); -add_action( 'init', array( 'Jetpack_Heartbeat', 'init' ), 100 ); add_action( 'plugins_loaded', array( 'Jetpack', 'load_modules' ), 100 ); add_filter( 'jetpack_static_url', array( 'Jetpack', 'staticize_subdomain' ) ); +add_filter( 'jetpack_open_graph_tags', 'change_twitter_site_param' ); + +function change_twitter_site_param( $og_tags ) { + $og_tags['twitter:site'] = '@jetpack'; + return $og_tags; +} + +/** + * Add an easy way to photon-ize a URL that is safe to call even if Jetpack isn't active. + * + * See: http://jetpack.me/2013/07/11/photon-and-themes/ + */ +if ( Jetpack::init()->is_module_active( 'photon' ) ) { + add_filter( 'jetpack_photon_url', 'jetpack_photon_url', 10, 3 ); +} else { + remove_filter( 'jetpack_photon_url', 'jetpack_photon_url', 10, 3 ); +} + /* if ( is_admin() && ! Jetpack::check_identity_crisis() ) { Jetpack_Sync::sync_options( __FILE__, 'db_version', 'jetpack_active_modules', 'active_plugins' ); } */ - -Jetpack_Sync::sync_options( __FILE__, 'widget_twitter' ); |