diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2016-07-28 23:29:30 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2016-07-28 23:29:30 -0400 |
commit | 5c4552fad98db23b2698e8a598bf20f42cb430ef (patch) | |
tree | 61fc1f692646288704376f32d914eeef152e375e /plugins/jetpack/3rd-party | |
parent | Update plugin jecpack to 4.0.4 (diff) | |
download | blogs-gentoo-5c4552fad98db23b2698e8a598bf20f42cb430ef.tar.gz blogs-gentoo-5c4552fad98db23b2698e8a598bf20f42cb430ef.tar.bz2 blogs-gentoo-5c4552fad98db23b2698e8a598bf20f42cb430ef.zip |
Update plugin jetpack to 4.1.1
Diffstat (limited to 'plugins/jetpack/3rd-party')
-rw-r--r-- | plugins/jetpack/3rd-party/3rd-party.php | 1 | ||||
-rw-r--r-- | plugins/jetpack/3rd-party/bitly.php | 9 | ||||
-rw-r--r-- | plugins/jetpack/3rd-party/vaultpress.php | 13 |
3 files changed, 21 insertions, 2 deletions
diff --git a/plugins/jetpack/3rd-party/3rd-party.php b/plugins/jetpack/3rd-party/3rd-party.php index 6ba6a189..2bab75b8 100644 --- a/plugins/jetpack/3rd-party/3rd-party.php +++ b/plugins/jetpack/3rd-party/3rd-party.php @@ -10,3 +10,4 @@ require_once( JETPACK__PLUGIN_DIR . '3rd-party/wpml.php' ); require_once( JETPACK__PLUGIN_DIR . '3rd-party/bitly.php' ); require_once( JETPACK__PLUGIN_DIR . '3rd-party/bbpress.php' ); require_once( JETPACK__PLUGIN_DIR . '3rd-party/woocommerce.php' ); +require_once( JETPACK__PLUGIN_DIR . '3rd-party/vaultpress.php' ); diff --git a/plugins/jetpack/3rd-party/bitly.php b/plugins/jetpack/3rd-party/bitly.php index 9d087b77..eeca3b7f 100644 --- a/plugins/jetpack/3rd-party/bitly.php +++ b/plugins/jetpack/3rd-party/bitly.php @@ -7,7 +7,10 @@ if( class_exists( 'Bitly' ) ) { if( isset( $GLOBALS['bitly'] ) ) { - remove_action( 'wp_head', array( $GLOBALS['bitly'], 'og_tags' ) ); + if ( method_exists( $GLOBALS['bitly'], 'og_tags' ) ) { + remove_action( 'wp_head', array( $GLOBALS['bitly'], 'og_tags' ) ); + } + add_action( 'wp_head', 'jetpack_bitly_og_tag', 100 ); } @@ -21,7 +24,9 @@ if( class_exists( 'Bitly' ) ) { function jetpack_bitly_og_tag() { if( has_filter( 'wp_head', 'jetpack_og_tags') === false ) { // Add the bitly part again back if we don't have any jetpack_og_tags added - $GLOBALS['bitly']->og_tags(); + if ( method_exists( $GLOBALS['bitly'], 'og_tags' ) ) { + $GLOBALS['bitly']->og_tags(); + } } elseif ( isset( $GLOBALS['posts'] ) && $GLOBALS['posts'][0]->ID > 0 ) { printf( "<meta property=\"bitly:url\" content=\"%s\" /> \n", esc_attr( $GLOBALS['bitly']->get_bitly_link_for_post_id( $GLOBALS['posts'][0]->ID ) ) ); } diff --git a/plugins/jetpack/3rd-party/vaultpress.php b/plugins/jetpack/3rd-party/vaultpress.php new file mode 100644 index 00000000..d2c1374c --- /dev/null +++ b/plugins/jetpack/3rd-party/vaultpress.php @@ -0,0 +1,13 @@ +<?php + +/** + * For backward compatibility with VaultPress 1.8.3 to play nicely with Jetpack 4.1 + */ +add_action( 'init', 'jetpack_vaultpress_sync_options' ); +function jetpack_vaultpress_sync_options() { + if ( ! class_exists( 'VaultPress' ) ) { + return; + } + $vaultpress = VaultPress::init(); + Jetpack_Sync::sync_options( __FILE__, $vaultpress->auto_register_option, $vaultpress->option_name ); +} |