diff options
Diffstat (limited to 'plugins/jetpack/modules/sharedaddy')
-rw-r--r-- | plugins/jetpack/modules/sharedaddy/admin-sharing.css | 4 | ||||
-rw-r--r-- | plugins/jetpack/modules/sharedaddy/images/googleplus1.png | bin | 722 -> 660 bytes | |||
-rw-r--r-- | plugins/jetpack/modules/sharedaddy/images/googleplus1@2x.png | bin | 1333 -> 1187 bytes | |||
-rw-r--r-- | plugins/jetpack/modules/sharedaddy/images/icon-facebook-2x.png | bin | 1036 -> 1080 bytes | |||
-rw-r--r-- | plugins/jetpack/modules/sharedaddy/images/icon-facebook.png | bin | 568 -> 634 bytes | |||
-rw-r--r-- | plugins/jetpack/modules/sharedaddy/images/smart-googleplus1.png | bin | 926 -> 6719 bytes | |||
-rw-r--r-- | plugins/jetpack/modules/sharedaddy/images/smart-googleplus1@2x.png | bin | 2394 -> 7795 bytes | |||
-rw-r--r-- | plugins/jetpack/modules/sharedaddy/sharing-service.php | 5 | ||||
-rw-r--r-- | plugins/jetpack/modules/sharedaddy/sharing-sources.php | 27 | ||||
-rw-r--r-- | plugins/jetpack/modules/sharedaddy/sharing.php | 3 |
10 files changed, 18 insertions, 21 deletions
diff --git a/plugins/jetpack/modules/sharedaddy/admin-sharing.css b/plugins/jetpack/modules/sharedaddy/admin-sharing.css index 51234530..620d6fc3 100644 --- a/plugins/jetpack/modules/sharedaddy/admin-sharing.css +++ b/plugins/jetpack/modules/sharedaddy/admin-sharing.css @@ -164,8 +164,8 @@ .preview-google-plus-1 .option-smart-on { background: #FFF url(images/smart-googleplus1.png) no-repeat top left; - background-size: 60px 20px; - width: 60px; + background-size: 96px 20px; + width: 96px; height: 20px; } diff --git a/plugins/jetpack/modules/sharedaddy/images/googleplus1.png b/plugins/jetpack/modules/sharedaddy/images/googleplus1.png Binary files differindex ee687af1..a2963ece 100644 --- a/plugins/jetpack/modules/sharedaddy/images/googleplus1.png +++ b/plugins/jetpack/modules/sharedaddy/images/googleplus1.png diff --git a/plugins/jetpack/modules/sharedaddy/images/googleplus1@2x.png b/plugins/jetpack/modules/sharedaddy/images/googleplus1@2x.png Binary files differindex 60dd1c03..6f59661d 100644 --- a/plugins/jetpack/modules/sharedaddy/images/googleplus1@2x.png +++ b/plugins/jetpack/modules/sharedaddy/images/googleplus1@2x.png diff --git a/plugins/jetpack/modules/sharedaddy/images/icon-facebook-2x.png b/plugins/jetpack/modules/sharedaddy/images/icon-facebook-2x.png Binary files differindex 10b36803..faed26b0 100644 --- a/plugins/jetpack/modules/sharedaddy/images/icon-facebook-2x.png +++ b/plugins/jetpack/modules/sharedaddy/images/icon-facebook-2x.png diff --git a/plugins/jetpack/modules/sharedaddy/images/icon-facebook.png b/plugins/jetpack/modules/sharedaddy/images/icon-facebook.png Binary files differindex 91d3702f..8b5ce251 100644 --- a/plugins/jetpack/modules/sharedaddy/images/icon-facebook.png +++ b/plugins/jetpack/modules/sharedaddy/images/icon-facebook.png diff --git a/plugins/jetpack/modules/sharedaddy/images/smart-googleplus1.png b/plugins/jetpack/modules/sharedaddy/images/smart-googleplus1.png Binary files differindex ba593f5a..13e257fa 100644 --- a/plugins/jetpack/modules/sharedaddy/images/smart-googleplus1.png +++ b/plugins/jetpack/modules/sharedaddy/images/smart-googleplus1.png diff --git a/plugins/jetpack/modules/sharedaddy/images/smart-googleplus1@2x.png b/plugins/jetpack/modules/sharedaddy/images/smart-googleplus1@2x.png Binary files differindex 0bb999a4..5bbb092b 100644 --- a/plugins/jetpack/modules/sharedaddy/images/smart-googleplus1@2x.png +++ b/plugins/jetpack/modules/sharedaddy/images/smart-googleplus1@2x.png diff --git a/plugins/jetpack/modules/sharedaddy/sharing-service.php b/plugins/jetpack/modules/sharedaddy/sharing-service.php index 8b10b6e0..80f4d8de 100644 --- a/plugins/jetpack/modules/sharedaddy/sharing-service.php +++ b/plugins/jetpack/modules/sharedaddy/sharing-service.php @@ -460,6 +460,9 @@ add_action( 'template_redirect', 'sharing_process_requests', 9 ); function sharing_display( $text = '', $echo = false ) { global $post, $wp_current_filter; + if ( empty( $post ) ) + return $text; + if ( is_preview() ) { return $text; } @@ -620,7 +623,7 @@ function get_base_recaptcha_lang_code() { 'tr' => 'tr' ); - $blog_lang_code = function_exists( 'get_blog_lang_code' ) ? get_blog_lang_code() : get_bloginfo( 'language' ); + $blog_lang_code = function_exists( 'get_blog_lang_code' ) ? get_blog_lang_code() : get_bloginfo( 'language' ); if( isset( $base_recaptcha_lang_code_mapping[ $blog_lang_code ] ) ) return $base_recaptcha_lang_code_mapping[ $blog_lang_code ]; diff --git a/plugins/jetpack/modules/sharedaddy/sharing-sources.php b/plugins/jetpack/modules/sharedaddy/sharing-sources.php index 53164741..1599eba9 100644 --- a/plugins/jetpack/modules/sharedaddy/sharing-sources.php +++ b/plugins/jetpack/modules/sharedaddy/sharing-sources.php @@ -827,7 +827,7 @@ class Share_GooglePlus1 extends Sharing_Source { } public function get_name() { - return __( 'Google +1', 'jetpack' ); + return __( 'Google', 'jetpack' ); } public function has_custom_button_style() { @@ -838,11 +838,9 @@ class Share_GooglePlus1 extends Sharing_Source { $share_url = $this->get_share_url( $post->ID ); if ( $this->smart ) { - return '<div class="googleplus1_button"><div class="g-plusone" data-size="medium" data-callback="sharing_plusone" data-href="' . esc_url( $share_url ) . '"></div></div>'; + return '<div class="googleplus1_button"><div class="g-plus" data-action="share" data-annotation="bubble" data-href="' . esc_url( $share_url ) . '"></div></div>'; } else { - //if ( 'icon-text' == $this->button_style || 'text' == $this->button_style ) - //sharing_register_post_for_share_counts( $post->ID ); - return $this->get_link( get_permalink( $post->ID ), _x( 'Google +1', 'share to', 'jetpack' ), __( 'Click to share on Google+', 'jetpack' ), 'share=google-plus-1', 'sharing-google-' . $post->ID ); + return $this->get_link( get_permalink( $post->ID ), _x( 'Google', 'share to', 'jetpack' ), __( 'Click to share on Google+', 'jetpack' ), 'share=google-plus-1', 'sharing-google-' . $post->ID ); } } @@ -869,20 +867,15 @@ class Share_GooglePlus1 extends Sharing_Source { if ( $this->smart ) { ?> <script type="text/javascript"> - function sharing_plusone( obj ) { - jQuery.ajax( { - url: '<?php echo get_permalink( $post->ID ) . '?share=google-plus-1'; ?>', - type: 'POST', - data: obj - } ); - } - jQuery( document.body ).on( 'post-load', function() { - gapi.plusone.go(); - }); + (function() { + var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; + po.src = 'https://apis.google.com/js/plusone.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); + })(); </script> - <script type="text/javascript" src="//apis.google.com/js/plusone.js"></script> <?php + <?php } else { - $this->js_dialog( 'google-plus-1', array( 'width' => 600, 'height' => 600 ) ); + $this->js_dialog( 'google-plus-1', array( 'width' => 480, 'height' => 550 ) ); } } diff --git a/plugins/jetpack/modules/sharedaddy/sharing.php b/plugins/jetpack/modules/sharedaddy/sharing.php index 974fe741..24a1e91f 100644 --- a/plugins/jetpack/modules/sharedaddy/sharing.php +++ b/plugins/jetpack/modules/sharedaddy/sharing.php @@ -166,6 +166,7 @@ class Sharing_Admin { <?php if ( current_user_can( 'manage_options' ) ) : ?> + <div class="share_manage_options"> <h3><?php _e( 'Sharing Buttons', 'jetpack' ) ?></h3> <p><?php _e( 'Add sharing buttons to your blog and allow your visitors to share posts with their friends.', 'jetpack' ) ?></p> @@ -402,7 +403,7 @@ class Sharing_Admin { <input type="hidden" name="_wpnonce" value="<?php echo wp_create_nonce( 'sharing-new_service' );?>" /> </form> </div> - + </div> <?php endif; ?> |