Jetpack by WordPress.com - Version 2.4.5

Version Description

Release Date: May 26, 2016

  • Important security update. Please upgrade immediately.
Download this release

Release Info

Developer samhotchkiss
Plugin Icon 128x128 Jetpack by WordPress.com
Version 2.4.5
Comparing to
See all releases

Code changes from version 2.3.8 to 2.4.5

Files changed (140) hide show
  1. _inc/gallery-settings.js +1 -1
  2. _inc/images/module-icons-sprite-2x.png +0 -0
  3. _inc/images/module-icons-sprite.png +0 -0
  4. _inc/jetpack.css +27 -19
  5. class.jetpack-debugger.php +337 -336
  6. class.jetpack-heartbeat.php +3 -3
  7. class.jetpack-options.php +1 -0
  8. class.jetpack.php +89 -79
  9. class.json-api-endpoints.php +7 -0
  10. class.photon.php +1 -1
  11. functions.twitter-cards.php +67 -0
  12. jetpack.php +21 -4
  13. languages/jetpack-ar.mo +0 -0
  14. languages/jetpack-az.mo +0 -0
  15. languages/jetpack-bs_BA.mo +0 -0
  16. languages/jetpack-ca.mo +0 -0
  17. languages/jetpack-cs_CZ.mo +0 -0
  18. languages/jetpack-da_DK.mo +0 -0
  19. languages/jetpack-de_DE.mo +0 -0
  20. languages/jetpack-el.mo +0 -0
  21. languages/jetpack-es_ES.mo +0 -0
  22. languages/jetpack-fa_IR.mo +0 -0
  23. languages/jetpack-fi.mo +0 -0
  24. languages/jetpack-fr_FR.mo +0 -0
  25. languages/jetpack-gl_ES.mo +0 -0
  26. languages/jetpack-he_IL.mo +0 -0
  27. languages/jetpack-hr.mo +0 -0
  28. languages/jetpack-hu_HU.mo +0 -0
  29. languages/jetpack-id_ID.mo +0 -0
  30. languages/jetpack-it_IT.mo +0 -0
  31. languages/jetpack-ja.mo +0 -0
  32. languages/jetpack-ko_KR.mo +0 -0
  33. languages/jetpack-lt_LT.mo +0 -0
  34. languages/jetpack-mk_MK.mo +0 -0
  35. languages/jetpack-my_MM.mo +0 -0
  36. languages/jetpack-nb_NO.mo +0 -0
  37. languages/jetpack-nl_NL.mo +0 -0
  38. languages/jetpack-nn_NO.mo +0 -0
  39. languages/jetpack-pl_PL.mo +0 -0
  40. languages/jetpack-pt_BR.mo +0 -0
  41. languages/jetpack-pt_PT.mo +0 -0
  42. languages/jetpack-ro_RO.mo +0 -0
  43. languages/jetpack-ru_RU.mo +0 -0
  44. languages/jetpack-sa_IN.mo +0 -0
  45. languages/jetpack-sk_SK.mo +0 -0
  46. languages/jetpack-sq.mo +0 -0
  47. languages/jetpack-sr_RS.mo +0 -0
  48. languages/jetpack-sv_SE.mo +0 -0
  49. languages/jetpack-th.mo +0 -0
  50. languages/jetpack-tr_TR.mo +0 -0
  51. languages/jetpack-uk.mo +0 -0
  52. languages/jetpack-ur.mo +0 -0
  53. languages/jetpack-zh_CN.mo +0 -0
  54. languages/jetpack-zh_TW.mo +0 -0
  55. modules/after-the-deadline.php +1 -0
  56. modules/after-the-deadline/config-unignore.php +3 -0
  57. modules/carousel.php +1 -0
  58. modules/comments.php +1 -0
  59. modules/contact-form.php +1 -0
  60. modules/contact-form/admin.php +6 -1
  61. modules/contact-form/css/menu-alter.css +2 -2
  62. modules/contact-form/css/rtl/menu-alter-rtl.css +3 -3
  63. modules/contact-form/grunion-contact-form.php +1 -1
  64. modules/custom-css.php +1 -0
  65. modules/custom-css/custom-css.php +15 -4
  66. modules/custom-css/custom-css/css/css-editor.css +3 -0
  67. modules/custom-css/custom-css/preprocessors/lessc.inc.php +438 -123
  68. modules/custom-css/custom-css/preprocessors/scss.inc.php +829 -235
  69. modules/custom-post-types/comics.php +12 -12
  70. modules/custom-post-types/testimonial.php +3 -3
  71. modules/debug.php +6 -0
  72. modules/enhanced-distribution.php +1 -0
  73. modules/gravatar-hovercards.php +1 -0
  74. modules/holiday-snow.php +1 -0
  75. modules/infinite-scroll.php +1 -0
  76. modules/json-api.php +1 -0
  77. modules/latex.php +1 -0
  78. modules/likes.php +13 -12
  79. modules/likes/post-count-jetpack.js +18 -0
  80. modules/likes/post-count.js +4 -16
  81. modules/likes/style.css +1 -1
  82. modules/minileven.php +1 -0
  83. modules/minileven/theme/pub/minileven/functions.php +5 -5
  84. modules/minileven/theme/pub/minileven/style.css +7 -4
  85. modules/mobile-push.php +1 -0
  86. modules/module-extras.php +9 -50
  87. modules/module-info.php +41 -24
  88. modules/notes.php +1 -0
  89. modules/omnisearch.php +1 -0
  90. modules/omnisearch/omnisearch-core.php +5 -0
  91. modules/omnisearch/omnisearch-media.php +46 -0
  92. modules/omnisearch/omnisearch.css +16 -3
  93. modules/omnisearch/rtl/omnisearch-rtl.css +17 -4
  94. modules/photon.php +1 -0
  95. modules/post-by-email.php +1 -0
  96. modules/publicize.php +1 -0
  97. modules/publicize/assets/publicize.js +1 -1
  98. modules/publicize/assets/rtl/publicize-rtl.css +2 -1
  99. modules/publicize/ui.php +10 -6
  100. modules/random-redirect.php +43 -0
  101. modules/sharedaddy.php +1 -0
  102. modules/sharedaddy/images/facebook.png +0 -0
  103. modules/sharedaddy/images/facebook@2x.png +0 -0
  104. modules/sharedaddy/images/icon-facebook-2x.png +0 -0
  105. modules/sharedaddy/images/icon-facebook.png +0 -0
  106. modules/sharedaddy/sharing-service.php +1 -1
  107. modules/sharedaddy/sharing.php +2 -1
  108. modules/shortcodes.php +1 -0
  109. modules/shortcodes/css/rtl/slideshow-shortcode-rtl.css +2 -1
  110. modules/shortcodes/css/slideshow-shortcode.css +1 -0
  111. modules/shortcodes/css/style.css +140 -0
  112. modules/shortcodes/images/collapse.png +0 -0
  113. modules/shortcodes/images/expand.png +0 -0
  114. modules/shortcodes/images/slide-nav.png +0 -0
  115. modules/shortcodes/js/jmpress.js +2721 -0
  116. modules/shortcodes/js/jmpress.min.js +13 -0
  117. modules/shortcodes/js/main.js +197 -0
  118. modules/shortcodes/presentations.php +382 -0
  119. modules/shortcodes/twitter-timeline.php +31 -0
  120. modules/shortcodes/vine.php +65 -0
  121. modules/shortlinks.php +1 -0
  122. modules/stats.php +1 -0
  123. modules/subscriptions.php +32 -12
  124. modules/theme-tools.php +62 -0
  125. modules/tiled-gallery.php +1 -0
  126. modules/tiled-gallery/tiled-gallery.php +5 -0
  127. modules/vaultpress.php +1 -0
  128. modules/widget-visibility.php +11 -0
  129. modules/widget-visibility/widget-conditions.php +379 -0
  130. modules/widget-visibility/widget-conditions/rtl/widget-conditions-rtl.css +41 -0
  131. modules/widget-visibility/widget-conditions/widget-conditions.css +39 -0
  132. modules/widget-visibility/widget-conditions/widget-conditions.js +112 -0
  133. modules/widgets.php +1 -0
  134. modules/widgets/top-posts.php +1 -1
  135. modules/widgets/twitter-timeline.php +12 -3
  136. modules/wpcc.php +24 -0
  137. modules/wpcc/wpcc-sign-on.css +11 -0
  138. modules/wpcc/wpcc-sign-on.js +4 -0
  139. modules/wpcc/wpcc-sign-on.php +437 -0
  140. readme.txt +54 -6
_inc/gallery-settings.js CHANGED
@@ -29,4 +29,4 @@
29
  return this;
30
  }
31
  });
32
- })(jQuery);
29
  return this;
30
  }
31
  });
32
+ })(jQuery);
_inc/images/module-icons-sprite-2x.png CHANGED
Binary file
_inc/images/module-icons-sprite.png CHANGED
Binary file
_inc/jetpack.css CHANGED
@@ -30,17 +30,17 @@
30
  */
31
 
32
  /* Force the menu not to be sticky, so we can color the arrow. */
33
- .toplevel_page_jetpack.admin-color-mp6.sticky-menu #adminmenuwrap,
34
- body[class*=" jetpack_page_jetpack_"].admin-color-mp6.sticky-menu #adminmenuwrap {
35
  position: relative;
36
  z-index: auto;
37
  top: 0;
38
  }
39
 
40
- .toplevel_page_jetpack.admin-color-mp6 ul#adminmenu a.wp-has-current-submenu:after,
41
- .toplevel_page_jetpack.admin-color-mp6 ul#adminmenu > li.current > a.current:after,
42
- body[class*=" jetpack_page_jetpack_"].admin-color-mp6 ul#adminmenu a.wp-has-current-submenu:after,
43
- body[class*=" jetpack_page_jetpack_"].admin-color-mp6 ul#adminmenu > li.current > a.current:after {
44
  border-right-color:#8fad4b;
45
  }
46
 
@@ -49,8 +49,8 @@ body[class*=" jetpack_page_jetpack_"].jetpack-disconnected #wpwrap {
49
  background: url(images/header-clouds.png) -150px -60px repeat-x;
50
  }
51
 
52
- .toplevel_page_jetpack.jetpack-disconnected.admin-color-mp6 #wpwrap,
53
- body[class*=" jetpack_page_jetpack_"].jetpack-disconnected.admin-color-mp6 #wpwrap {
54
  background-position: -143px -60px;
55
  }
56
 
@@ -59,8 +59,8 @@ body[class*=" jetpack_page_jetpack_"].jetpack-disconnected.folded #wpwrap {
59
  background-position: -263px -60px;
60
  }
61
 
62
- .toplevel_page_jetpack.jetpack-disconnected.admin-color-mp6.folded #wpwrap,
63
- body[class*=" jetpack_page_jetpack_"].jetpack-disconnected.admin-color-mp6.folded #wpwrap {
64
  background-position: -257px -60px;
65
  }
66
 
@@ -69,8 +69,8 @@ body[class*=" jetpack_page_jetpack_"].jetpack-connected #wpwrap {
69
  background: url(images/header-clouds-small.png) 45px 0 repeat-x;
70
  }
71
 
72
- .toplevel_page_jetpack.jetpack-connected.admin-color-mp6 #wpwrap,
73
- body[class*=" jetpack_page_jetpack_"].jetpack-connected.admin-color-mp6 #wpwrap {
74
  background-position: 52px 0;
75
  }
76
 
@@ -79,8 +79,8 @@ body[class*=" jetpack_page_jetpack_"].jetpack-connected.folded #wpwrap {
79
  background-position: -68px 0;
80
  }
81
 
82
- .toplevel_page_jetpack.jetpack-connected.admin-color-mp6.folded #wpwrap,
83
- body[class*=" jetpack_page_jetpack_"].jetpack-connected.admin-color-mp6.folded #wpwrap {
84
  background-position: -62px 0;
85
  }
86
 
@@ -91,8 +91,8 @@ body[class*=" jetpack_page_jetpack_"].jetpack-connected.admin-color-mp6.folded #
91
  background-position: -263px -60px;
92
  }
93
 
94
- .toplevel_page_jetpack.jetpack-disconnected.admin-color-mp6.auto-fold #wpwrap,
95
- body[class*=" jetpack_page_jetpack_"].jetpack-disconnected.admin-color-mp6.auto-fold #wpwrap {
96
  background-position: -257px -60px;
97
  }
98
 
@@ -101,8 +101,8 @@ body[class*=" jetpack_page_jetpack_"].jetpack-connected.admin-color-mp6.folded #
101
  background-position: -68px 0;
102
  }
103
 
104
- .toplevel_page_jetpack.jetpack-connected.admin-color-mp6.auto-fold #wpwrap,
105
- body[class*=" jetpack_page_jetpack_"].jetpack-connected.admin-color-mp6.auto-fold #wpwrap {
106
  background-position: -62px 0;
107
  }
108
 
@@ -667,7 +667,7 @@ p.jp-help {
667
  border-bottom-left-radius: 3px;
668
  background-repeat: no-repeat;
669
  background-image: url(images/module-icons-sprite.png);
670
- background-size: 2705px 50px; /* remember to update this every time a new module is added! */
671
  }
672
 
673
  @media only screen and (-moz-min-device-pixel-ratio: 1.5),
@@ -789,6 +789,14 @@ p.jp-help {
789
  background-position: -2625px 5px;
790
  }
791
 
 
 
 
 
 
 
 
 
792
  .jetpack-module div.module-image p {
793
  background-color: #b4d278;
794
  color: #fff;
30
  */
31
 
32
  /* Force the menu not to be sticky, so we can color the arrow. */
33
+ .toplevel_page_jetpack.mp6.sticky-menu #adminmenuwrap,
34
+ body[class*=" jetpack_page_jetpack_"].mp6.sticky-menu #adminmenuwrap {
35
  position: relative;
36
  z-index: auto;
37
  top: 0;
38
  }
39
 
40
+ .toplevel_page_jetpack.mp6 ul#adminmenu a.wp-has-current-submenu:after,
41
+ .toplevel_page_jetpack.mp6 ul#adminmenu > li.current > a.current:after,
42
+ body[class*=" jetpack_page_jetpack_"].mp6 ul#adminmenu a.wp-has-current-submenu:after,
43
+ body[class*=" jetpack_page_jetpack_"].mp6 ul#adminmenu > li.current > a.current:after {
44
  border-right-color:#8fad4b;
45
  }
46
 
49
  background: url(images/header-clouds.png) -150px -60px repeat-x;
50
  }
51
 
52
+ .toplevel_page_jetpack.jetpack-disconnected.mp6 #wpwrap,
53
+ body[class*=" jetpack_page_jetpack_"].jetpack-disconnected.mp6 #wpwrap {
54
  background-position: -143px -60px;
55
  }
56
 
59
  background-position: -263px -60px;
60
  }
61
 
62
+ .toplevel_page_jetpack.jetpack-disconnected.mp6.folded #wpwrap,
63
+ body[class*=" jetpack_page_jetpack_"].jetpack-disconnected.mp6.folded #wpwrap {
64
  background-position: -257px -60px;
65
  }
66
 
69
  background: url(images/header-clouds-small.png) 45px 0 repeat-x;
70
  }
71
 
72
+ .toplevel_page_jetpack.jetpack-connected.mp6 #wpwrap,
73
+ body[class*=" jetpack_page_jetpack_"].jetpack-connected.mp6 #wpwrap {
74
  background-position: 52px 0;
75
  }
76
 
79
  background-position: -68px 0;
80
  }
81
 
82
+ .toplevel_page_jetpack.jetpack-connected.mp6.folded #wpwrap,
83
+ body[class*=" jetpack_page_jetpack_"].jetpack-connected.mp6.folded #wpwrap {
84
  background-position: -62px 0;
85
  }
86
 
91
  background-position: -263px -60px;
92
  }
93
 
94
+ .toplevel_page_jetpack.jetpack-disconnected.mp6.auto-fold #wpwrap,
95
+ body[class*=" jetpack_page_jetpack_"].jetpack-disconnected.mp6.auto-fold #wpwrap {
96
  background-position: -257px -60px;
97
  }
98
 
101
  background-position: -68px 0;
102
  }
103
 
104
+ .toplevel_page_jetpack.jetpack-connected.mp6.auto-fold #wpwrap,
105
+ body[class*=" jetpack_page_jetpack_"].jetpack-connected.mp6.auto-fold #wpwrap {
106
  background-position: -62px 0;
107
  }
108
 
667
  border-bottom-left-radius: 3px;
668
  background-repeat: no-repeat;
669
  background-image: url(images/module-icons-sprite.png);
670
+ background-size: 2885px 50px; /* remember to update this every time a new module is added! */
671
  }
672
 
673
  @media only screen and (-moz-min-device-pixel-ratio: 1.5),
789
  background-position: -2625px 5px;
790
  }
791
 
792
+ #wpcc.jetpack-module div.module-image {
793
+ background-position: -2710px 5px;
794
+ }
795
+
796
+ #widget-visibility.jetpack-module div.module-image {
797
+ background-position: -2800px 5px;
798
+ }
799
+
800
  .jetpack-module div.module-image p {
801
  background-color: #b4d278;
802
  color: #fff;
class.jetpack-debugger.php CHANGED
@@ -1,353 +1,354 @@
1
  <?php
2
 
3
- function is_jetpack_support_open() {
4
- try {
5
- $response = wp_remote_request( "http://jetpack.me/is-support-open" );
6
- $body = wp_remote_retrieve_body( $response );
7
- $json = json_decode( $body );
8
- return ( ( bool )$json->is_support_open );
9
- }
10
- catch ( Exception $e ) {
11
- return true;
12
- }
13
- }
14
-
15
- function jetpack_increase_timeout($time) {
16
- $time = 20; //seconds
17
- return $time;
18
- }
19
-
20
-
21
- function jetpack_debug_display_handler() {
22
- if ( ! current_user_can( 'manage_options' ) )
23
- wp_die( esc_html__('You do not have sufficient permissions to access this page.', 'jetpack' ) );
24
-
25
- global $current_user;
26
- get_currentuserinfo();
27
-
28
- $user_id = get_current_user_id();
29
- $user_tokens = Jetpack::get_option( 'user_tokens' );
30
- if ( is_array( $user_tokens ) && array_key_exists( $user_id, $user_tokens ) ) {
31
- $user_token = $user_tokens[$user_id];
32
- } else {
33
- $user_token = '[this user has no token]';
34
- }
35
- unset( $user_tokens );
36
 
37
- $debug_info = "\r\n";
38
- foreach ( array(
39
- 'CLIENT_ID' => 'id',
40
- 'BLOG_TOKEN' => 'blog_token',
41
- 'MASTER_USER' => 'master_user',
42
- 'CERT' => 'fallback_no_verify_ssl_certs',
43
- 'TIME_DIFF' => 'time_diff',
44
- 'VERSION' => 'version',
45
- 'OLD_VERSION' => 'old_version',
46
- 'PUBLIC' => 'public',
47
- ) as $label => $option_name ) {
48
- $debug_info .= "\r\n" . esc_html( $label . ": " . Jetpack::get_option( $option_name ) );
49
  }
50
 
51
- $debug_info .= "\r\n" . esc_html( "USER_ID: " . $user_id );
52
- $debug_info .= "\r\n" . esc_html( "USER_TOKEN: " . $user_token );
53
- $debug_info .= "\r\n" . esc_html( "PHP_VERSION: " . PHP_VERSION );
54
- $debug_info .= "\r\n" . esc_html( "WORDPRESS_VERSION: " . $GLOBALS['wp_version'] );
55
- $debug_info .= "\r\n" . esc_html( "JETPACK__VERSION: " . JETPACK__VERSION );
56
- $debug_info .= "\r\n" . esc_html( "JETPACK__PLUGIN_DIR: " . JETPACK__PLUGIN_DIR );
57
- $debug_info .= "\r\n" . esc_html( "SITE_URL: " . site_url() );
58
- $debug_info .= "\r\n" . esc_html( "HOME_URL: " . home_url() );
59
-
60
- $debug_info .= "\r\n\r\nTEST RESULTS:\r\n\r\n";
61
- $debug_raw_info = '';
62
-
63
-
64
- $tests = array();
65
-
66
- $tests['HTTP']['result'] = wp_remote_get( preg_replace( '/^https:/', 'http:', JETPACK__API_BASE ) . 'test/1/' );
67
- $tests['HTTP']['fail_message'] = esc_html__( 'Your site isn’t reaching the Jetpack servers.', 'jetpack' );
68
-
69
- $tests['HTTPS']['result'] = wp_remote_get( preg_replace( '/^http:/', 'https:', JETPACK__API_BASE ) . 'test/1/' );
70
- $tests['HTTPS']['fail_message'] = esc_html__( 'Your site isn’t securely reaching the Jetpack servers.', 'jetpack' );
71
-
72
-
73
- $self_xml_rpc_url = site_url( 'xmlrpc.php' );
74
 
75
- $args = array();
76
- $testsite_url = Jetpack::fix_url_for_bad_hosts( JETPACK__API_BASE . 'testsite/1/?url=', $args );
77
-
78
- add_filter( 'http_request_timeout', 'jetpack_increase_timeout' );
79
-
80
- $tests['SELF']['result'] = wp_remote_get( $testsite_url . $self_xml_rpc_url );
81
- $tests['SELF']['fail_message'] = esc_html__( 'It looks like your site can not communicate properly with Jetpack.', 'jetpack' );
82
 
83
- remove_filter( 'http_request_timeout', 'jetpack_increase_timeout' );
84
-
85
- ?>
86
- <div class="wrap">
87
- <h2><?php esc_html_e( 'Jetpack Debugging Center', 'jetpack' ); ?></h2>
88
- <h3><?php _e( "Testing your site's compatibily with Jetpack...", 'jetpack' ); ?></h3>
89
- <div class="jetpack-debug-test-container">
90
- <?php
91
- ob_start();
92
- foreach ( $tests as $test_name => $test_info ) :
93
- if ( is_wp_error( $test_info['result'] ) ||
94
- false == ( $response_code = wp_remote_retrieve_response_code( $test_info['result'] ) ) ||
95
- '200' != $response_code ) {
96
- $debug_info .= $test_name . ": FAIL\r\n";
97
- ?>
98
- <div class="jetpack-test-error">
99
- <p>
100
- <a class="jetpack-test-heading" href="#"><?php echo $test_info['fail_message']; ?>
101
- <span class="noticon noticon-collapse"></span>
102
- </a>
103
- </p>
104
- <pre class="jetpack-test-details"><?php esc_html_e( $test_name , 'jetpack'); ?>:
105
- <?php esc_html_e( is_wp_error( $test_info['result'] ) ? $test_info['result']->get_error_message() : print_r( $test_info['result'], 1 ) ); ?></pre>
106
- </div><?php
107
- } else {
108
- $debug_info .= $test_name . ": PASS\r\n";
109
- }
110
- $debug_raw_info .= "\r\n\r\n" . $test_name . "\r\n" . esc_html( print_r( $test_info['result'], 1 ) );
111
- ?>
112
- <?php endforeach;
113
- $html = ob_get_clean();
114
-
115
- if ( '' == trim( $html ) ) {
116
- echo '<div class="jetpack-tests-succed">' . esc_html__( 'Your Jetpack setup looks a-okay!', 'jetpack' ) . '</div>';
117
  }
118
- else {
119
- echo '<h3>' . esc_html__( 'There seems to be a problem with your site’s ability to communicate with Jetpack!', 'jetpack' ) . '</h3>';
120
- echo $html;
 
 
 
 
 
 
 
 
 
 
 
121
  }
122
- $debug_info .= "\r\n\r\nRAW TEST RESULTS:" . $debug_raw_info ."\r\n";
123
- ?>
124
- </div>
125
- <div class="entry-content">
126
- <h3><?php esc_html_e( 'Trouble with Jetpack?', 'jetpack' ); ?></h3>
127
- <h4><?php esc_html_e( 'It may be caused by one of these issues, which you can diagnose yourself:', 'jetpack' ); ?></h4>
128
- <ol>
129
- <li><b><em><?php esc_html_e( 'A known issue.', 'jetpack' ); ?></em></b> <?php echo sprintf( __( 'Some themes and plugins have <a href="%1$s" target="_blank">known conflicts</a> with Jetpack – check the <a href="%2$s" target="_blank">list</a>. (You can also browse the <a href="%3$s">Jetpack support pages</a> or <a href="%4$s">Jetpack support forum</a> to see if others have experienced and solved the problem.)', 'jetpack' ), 'http://jetpack.me/known-issues/', 'http://jetpack.me/known-issues/', 'http://jetpack.me/support/', 'http://wordpress.org/support/plugin/jetpack' ); ?></li>
130
- <li><b><em><?php esc_html_e( 'An incompatible plugin.', 'jetpack' ); ?></em></b> <?php esc_html_e( "Find out by disabling all plugins except Jetpack. If the problem persists, it's not a plugin issue. If the problem is solved, turn your plugins on one by one until the problem pops up again – there's the culprit! Let us know, and we'll try to help.", 'jetpack' ); ?></li>
131
- <li><b><em><?php esc_html_e( 'A theme conflict.', 'jetpack' ); ?></em></b> <?php esc_html_e( "If your problem isn't known or caused by a plugin, try activating Twenty Twelve (the default WordPress theme). If this solves the problem, something in your theme is probably broken – let the theme's author know.", 'jetpack' ); ?></li>
132
- <li><b><em><?php esc_html_e( 'A problem with your XMLRPC file.', 'jetpack' ); ?></em></b> <?php echo sprintf( __( 'Load your <a href="%s">XMLRPC file</a>. It should say “XML-RPC server accepts POST requests only.” on a line by itself.', 'jetpack' ), site_url( 'xmlrpc.php' ) ); ?>
133
- <ul>
134
- <li>- <?php esc_html_e( "If it's not by itself, a theme or plugin is displaying extra characters. Try steps 2 and 3.", 'jetpack' ); ?></li>
135
- <li>- <?php esc_html_e( "If you get a 404 message, contact your web host. Their security may block XMLRPC.", 'jetpack' ); ?></li>
136
- </ul>
137
- </li>
138
- </ol>
139
- <p class="jetpack-show-contact-form"><?php _e( 'If none of these help you find a solution, <a href="#">click here to contact Jetpack support</a>. Tell us as much as you can about the issue and what steps you\'ve tried to resolve it, and one of our Happiness Engineers will be in touch to help.', 'jetpack' ); ?>
140
- </p>
141
- </div>
142
- <div id="contact-message" style="display:none">
143
- <?php if ( is_jetpack_support_open() ): ?>
144
- <form id="contactme" method="post" action="http://jetpack.me/contact-support/">
145
- <input type="hidden" name="action" value="submit">
146
- <input type="hidden" name="jetpack" value="needs-service">
147
-
148
- <input type="hidden" name="contact_form" id="contact_form" value="1">
149
- <input type="hidden" name="blog_url" id="blog_url" value="<?php echo esc_attr( site_url() ); ?>">
150
- <input type="hidden" name="subject" id="subject" value="from: <?php echo esc_attr( site_url() ); ?> Jetpack contact form">
151
- <div class="formbox">
152
- <label for="message" class="h"><?php esc_html_e( 'Please describe the problem you are having.', 'jetpack' ); ?></label>
153
- <textarea name="message" cols="40" rows="7" id="did"></textarea>
154
- </div>
155
 
156
- <div id="name_div" class="formbox">
157
- <label class="h" for="your_name"><?php esc_html_e( 'Name', 'jetpack' ); ?></label>
158
- <span class="errormsg"><?php esc_html_e( 'Let us know your name.', 'jetpack' ); ?></span>
159
- <input name="your_name" type="text" id="your_name" value="<?php esc_html_e( $current_user->display_name , 'jetpack'); ?>" size="40">
160
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
161
 
162
- <div id="email_div" class="formbox">
163
- <label class="h" for="your_email"><?php esc_html_e( 'E-mail', 'jetpack' ); ?></label>
164
- <span class="errormsg"><?php esc_html_e( 'Use a valid email address.', 'jetpack' ); ?></span>
165
- <input name="your_email" type="text" id="your_email" value="<?php esc_html_e( $current_user->user_email , 'jetpack'); ?>" size="40">
166
- </div>
167
-
168
- <div id="toggle_debug_info" class="formbox">
169
- <p><?php _e( 'The test results and some other useful debug information will be sent to the support team. Please feel free to <a href="#">review/modify</a> this information.', 'jetpack' ); ?></p>
170
- </div>
171
-
172
- <div id="debug_info_div" class="formbox" style="display:none">
173
- <label class="h" for="debug_info"><?php esc_html_e( 'Debug Info', 'jetpack' ); ?></label>
174
- <textarea name="debug_info" cols="40" rows="7" id="debug_info"><?php echo esc_attr( $debug_info ); ?></textarea>
175
- </div>
176
-
177
- <div style="clear: both;"></div>
178
 
179
- <div id="blog_div" class="formbox">
180
- <div id="submit_div" class="contact-support">
181
- <input type="submit" name="submit" value="Contact Support">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
182
  </div>
183
- </div>
184
- <div style="clear: both;"></div>
185
- </form>
186
- <?php endif; ?>
187
  </div>
188
- </div>
189
- <?php
190
- }
191
-
192
- function jetpack_debug_admin_head() {
193
- ?>
194
- <style type="text/css">
195
-
196
- .jetpack-debug-test-container {
197
- margin-top: 20px;
198
- margin-bottom: 30px;
199
- }
200
-
201
- .jetpack-tests-succed {
202
- font-size: large;
203
- color: #8BAB3E;
204
- }
205
-
206
- .jetpack-test-details {
207
- margin: 4px 6px;
208
- padding: 10px;
209
- overflow: auto;
210
- display: none;
211
- }
212
-
213
- .jetpack-test-error {
214
- margin-bottom: 10px;
215
- background: #FFEBE8;
216
- border: solid 1px #C00;
217
- border-radius: 3px;
218
- }
219
-
220
- .jetpack-test-error p {
221
- margin: 0;
222
- padding: 0;
223
- }
224
-
225
- .jetpack-test-error a.jetpack-test-heading {
226
- padding: 4px 6px;
227
- display: block;
228
- text-decoration: none;
229
- color: inherit;
230
- }
231
-
232
- .jetpack-test-error .noticon {
233
- float: right;
234
- }
235
-
236
- form#contactme {
237
- border: 1px solid #dfdfdf;
238
- background: #eaf3fa;
239
- padding: 20px;
240
- margin: 10px;
241
- background-color: #eaf3fa;
242
- border-radius: 5px;
243
- font-size: 15px;
244
- font-family: "Open Sans", "Helvetica Neue", sans-serif;
245
- }
246
-
247
- form#contactme label.h {
248
- color: #444;
249
- display: block;
250
- font-weight: bold;
251
- margin: 0 0 7px 10px;
252
- text-shadow: 1px 1px 0 #fff;
253
- }
254
-
255
- .formbox {
256
- margin: 0 0 25px 0;
257
- }
258
-
259
- .formbox input[type="text"], .formbox input[type="email"], .formbox input[type="url"], .formbox textarea {
260
- border: 1px solid #e5e5e5;
261
- border-radius: 11px;
262
- box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);
263
- color: #666;
264
- font-size: 14px;
265
- padding: 10px;
266
- width: 97%;
267
- }
268
- .formbox .contact-support input[type="submit"] {
269
- float: right;
270
- margin: 0 !important;
271
- border-radius: 20px !important;
272
- cursor: pointer;
273
- font-size: 13pt !important;
274
- height: auto !important;
275
- margin: 0 0 2em 10px !important;
276
- padding: 8px 16px !important;
277
- background-color: #ddd;
278
- border: 1px solid rgba(0,0,0,0.05);
279
- border-top-color: rgba(255,255,255,0.1);
280
- border-bottom-color: rgba(0,0,0,0.15);
281
- color: #333;
282
- font-weight: 400;
283
- display: inline-block;
284
- text-align: center;
285
- text-decoration: none;
286
- }
287
-
288
- .formbox span.errormsg {
289
- margin: 0 0 10px 10px;
290
- color: #d00;
291
- display: none;
292
- }
293
-
294
- .formbox.error span.errormsg {
295
- display: block;
296
- }
297
-
298
- #contact-message ul {
299
- margin: 0 0 20px 10px;
300
- }
301
-
302
- #contact-message li {
303
- margin: 0 0 10px 10px;
304
- list-style: disc;
305
- display: list-item;
306
- }
307
-
308
- </style>
309
- <script type="text/javascript">
310
- jQuery( document ).ready( function($) {
311
-
312
- $('#debug_info').prepend('jQuery version: ' + jQuery.fn.jquery + "\r\n");
313
-
314
- $( '.jetpack-test-error .jetpack-test-heading' ).on( 'click', function() {
315
- $( this ).parents( '.jetpack-test-error' ).find( '.jetpack-test-details' ).slideToggle();
316
- return false;
317
- } );
318
-
319
- $( '.jetpack-show-contact-form a' ).on( 'click', function() {
320
- $('#contact-message').slideToggle();
321
- return false;
322
- } );
323
-
324
- $( '#toggle_debug_info a' ).on( 'click', function() {
325
- $('#debug_info_div').slideToggle();
326
- return false;
327
- } );
328
-
329
- $('form#contactme').on("submit", function(e){
330
- var form = $(this);
331
- var message = form.find('#did');
332
- var name = form.find('#your_name');
333
- var email = form.find('#your_email')
334
- var validation_error = false;
335
- if( !name.val() ) {
336
- name.parents('.formbox').addClass('error');
337
- validation_error = true;
338
  }
339
- if( !email.val() ) {
340
- email.parents('.formbox').addClass('error');
341
- validation_error = true;
 
342
  }
343
- if ( validation_error ) {
344
- return false;
 
 
 
 
345
  }
346
- message.val(message.val() + "\r\n\r\n----------------------------------------------\r\n\r\nDEBUG INFO:\r\n" + $('#debug_info').val() );
347
- return true;
348
- });
349
-
350
- } );
351
- </script>
352
- <?php
353
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
 
3
+ class Jetpack_Debugger {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
 
5
+ private static function is_jetpack_support_open() {
6
+ try {
7
+ $response = wp_remote_request( "http://jetpack.me/is-support-open" );
8
+ $body = wp_remote_retrieve_body( $response );
9
+ $json = json_decode( $body );
10
+ return ( ( bool )$json->is_support_open );
11
+ }
12
+ catch ( Exception $e ) {
13
+ return true;
14
+ }
 
 
15
  }
16
 
17
+ public static function jetpack_increase_timeout($time) {
18
+ $time = 20; //seconds
19
+ return $time;
20
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
+ public static function jetpack_debug_display_handler() {
23
+ if ( ! current_user_can( 'manage_options' ) )
24
+ wp_die( esc_html__('You do not have sufficient permissions to access this page.', 'jetpack' ) );
 
 
 
 
25
 
26
+ global $current_user;
27
+ get_currentuserinfo();
28
+
29
+ $user_id = get_current_user_id();
30
+ $user_tokens = Jetpack::get_option( 'user_tokens' );
31
+ if ( is_array( $user_tokens ) && array_key_exists( $user_id, $user_tokens ) ) {
32
+ $user_token = $user_tokens[$user_id];
33
+ } else {
34
+ $user_token = '[this user has no token]';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  }
36
+ unset( $user_tokens );
37
+
38
+ $debug_info = "\r\n";
39
+ foreach ( array(
40
+ 'CLIENT_ID' => 'id',
41
+ 'BLOG_TOKEN' => 'blog_token',
42
+ 'MASTER_USER' => 'master_user',
43
+ 'CERT' => 'fallback_no_verify_ssl_certs',
44
+ 'TIME_DIFF' => 'time_diff',
45
+ 'VERSION' => 'version',
46
+ 'OLD_VERSION' => 'old_version',
47
+ 'PUBLIC' => 'public',
48
+ ) as $label => $option_name ) {
49
+ $debug_info .= "\r\n" . esc_html( $label . ": " . Jetpack::get_option( $option_name ) );
50
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
 
52
+ $debug_info .= "\r\n" . esc_html( "USER_ID: " . $user_id );
53
+ $debug_info .= "\r\n" . esc_html( "USER_TOKEN: " . $user_token );
54
+ $debug_info .= "\r\n" . esc_html( "PHP_VERSION: " . PHP_VERSION );
55
+ $debug_info .= "\r\n" . esc_html( "WORDPRESS_VERSION: " . $GLOBALS['wp_version'] );
56
+ $debug_info .= "\r\n" . esc_html( "JETPACK__VERSION: " . JETPACK__VERSION );
57
+ $debug_info .= "\r\n" . esc_html( "JETPACK__PLUGIN_DIR: " . JETPACK__PLUGIN_DIR );
58
+ $debug_info .= "\r\n" . esc_html( "SITE_URL: " . site_url() );
59
+ $debug_info .= "\r\n" . esc_html( "HOME_URL: " . home_url() );
60
+
61
+ $debug_info .= "\r\n\r\nTEST RESULTS:\r\n\r\n";
62
+ $debug_raw_info = '';
63
+
64
+
65
+ $tests = array();
66
+
67
+ $tests['HTTP']['result'] = wp_remote_get( preg_replace( '/^https:/', 'http:', JETPACK__API_BASE ) . 'test/1/' );
68
+ $tests['HTTP']['fail_message'] = esc_html__( 'Your site isn’t reaching the Jetpack servers.', 'jetpack' );
69
+
70
+ $tests['HTTPS']['result'] = wp_remote_get( preg_replace( '/^http:/', 'https:', JETPACK__API_BASE ) . 'test/1/' );
71
+ $tests['HTTPS']['fail_message'] = esc_html__( 'Your site isn’t securely reaching the Jetpack servers.', 'jetpack' );
72
+
73
+ $self_xml_rpc_url = home_url( 'xmlrpc.php' );
74
 
75
+ $args = array();
76
+ $testsite_url = Jetpack::fix_url_for_bad_hosts( JETPACK__API_BASE . 'testsite/1/?url=', $args );
77
+
78
+ add_filter( 'http_request_timeout', array( 'Jetpack_Debugger', 'jetpack_increase_timeout' ) );
79
+
80
+ $tests['SELF']['result'] = wp_remote_get( $testsite_url . $self_xml_rpc_url );
81
+ $tests['SELF']['fail_message'] = esc_html__( 'It looks like your site can not communicate properly with Jetpack.', 'jetpack' );
 
 
 
 
 
 
 
 
 
82
 
83
+ remove_filter( 'http_request_timeout', array( 'Jetpack_Debugger', 'jetpack_increase_timeout' ) );
84
+
85
+ ?>
86
+ <div class="wrap">
87
+ <h2><?php esc_html_e( 'Jetpack Debugging Center', 'jetpack' ); ?></h2>
88
+ <h3><?php _e( "Testing your site's compatibily with Jetpack...", 'jetpack' ); ?></h3>
89
+ <div class="jetpack-debug-test-container">
90
+ <?php
91
+ ob_start();
92
+ foreach ( $tests as $test_name => $test_info ) :
93
+ if ( is_wp_error( $test_info['result'] ) ||
94
+ false == ( $response_code = wp_remote_retrieve_response_code( $test_info['result'] ) ) ||
95
+ '200' != $response_code ) {
96
+ $debug_info .= $test_name . ": FAIL\r\n";
97
+ ?>
98
+ <div class="jetpack-test-error">
99
+ <p>
100
+ <a class="jetpack-test-heading" href="#"><?php echo $test_info['fail_message']; ?>
101
+ <span class="noticon noticon-collapse"></span>
102
+ </a>
103
+ </p>
104
+ <pre class="jetpack-test-details"><?php esc_html_e( $test_name , 'jetpack'); ?>:
105
+ <?php esc_html_e( is_wp_error( $test_info['result'] ) ? $test_info['result']->get_error_message() : print_r( $test_info['result'], 1 ), 'jetpack' ); ?></pre>
106
+ </div><?php
107
+ } else {
108
+ $debug_info .= $test_name . ": PASS\r\n";
109
+ }
110
+ $debug_raw_info .= "\r\n\r\n" . $test_name . "\r\n" . esc_html( print_r( $test_info['result'], 1 ) );
111
+ ?>
112
+ <?php endforeach;
113
+ $html = ob_get_clean();
114
+
115
+ if ( '' == trim( $html ) ) {
116
+ echo '<div class="jetpack-tests-succed">' . esc_html__( 'Your Jetpack setup looks a-okay!', 'jetpack' ) . '</div>';
117
+ }
118
+ else {
119
+ echo '<h3>' . esc_html__( 'There seems to be a problem with your site’s ability to communicate with Jetpack!', 'jetpack' ) . '</h3>';
120
+ echo $html;
121
+ }
122
+ $debug_info .= "\r\n\r\nRAW TEST RESULTS:" . $debug_raw_info ."\r\n";
123
+ ?>
124
+ </div>
125
+ <div class="entry-content">
126
+ <h3><?php esc_html_e( 'Trouble with Jetpack?', 'jetpack' ); ?></h3>
127
+ <h4><?php esc_html_e( 'It may be caused by one of these issues, which you can diagnose yourself:', 'jetpack' ); ?></h4>
128
+ <ol>
129
+ <li><b><em><?php esc_html_e( 'A known issue.', 'jetpack' ); ?></em></b> <?php echo sprintf( __( 'Some themes and plugins have <a href="%1$s" target="_blank">known conflicts</a> with Jetpack – check the <a href="%2$s" target="_blank">list</a>. (You can also browse the <a href="%3$s">Jetpack support pages</a> or <a href="%4$s">Jetpack support forum</a> to see if others have experienced and solved the problem.)', 'jetpack' ), 'http://jetpack.me/known-issues/', 'http://jetpack.me/known-issues/', 'http://jetpack.me/support/', 'http://wordpress.org/support/plugin/jetpack' ); ?></li>
130
+ <li><b><em><?php esc_html_e( 'An incompatible plugin.', 'jetpack' ); ?></em></b> <?php esc_html_e( "Find out by disabling all plugins except Jetpack. If the problem persists, it's not a plugin issue. If the problem is solved, turn your plugins on one by one until the problem pops up again – there's the culprit! Let us know, and we'll try to help.", 'jetpack' ); ?></li>
131
+ <li><b><em><?php esc_html_e( 'A theme conflict.', 'jetpack' ); ?></em></b> <?php esc_html_e( "If your problem isn't known or caused by a plugin, try activating Twenty Twelve (the default WordPress theme). If this solves the problem, something in your theme is probably broken – let the theme's author know.", 'jetpack' ); ?></li>
132
+ <li><b><em><?php esc_html_e( 'A problem with your XMLRPC file.', 'jetpack' ); ?></em></b> <?php echo sprintf( __( 'Load your <a href="%s">XMLRPC file</a>. It should say “XML-RPC server accepts POST requests only.” on a line by itself.', 'jetpack' ), site_url( 'xmlrpc.php' ) ); ?>
133
+ <ul>
134
+ <li>- <?php esc_html_e( "If it's not by itself, a theme or plugin is displaying extra characters. Try steps 2 and 3.", 'jetpack' ); ?></li>
135
+ <li>- <?php esc_html_e( "If you get a 404 message, contact your web host. Their security may block XMLRPC.", 'jetpack' ); ?></li>
136
+ </ul>
137
+ </li>
138
+ </ol>
139
+ <p class="jetpack-show-contact-form"><?php _e( 'If none of these help you find a solution, <a href="#">click here to contact Jetpack support</a>. Tell us as much as you can about the issue and what steps you\'ve tried to resolve it, and one of our Happiness Engineers will be in touch to help.', 'jetpack' ); ?>
140
+ </p>
141
+ </div>
142
+ <div id="contact-message" style="display:none">
143
+ <?php if ( self::is_jetpack_support_open() ): ?>
144
+ <form id="contactme" method="post" action="http://jetpack.me/contact-support/">
145
+ <input type="hidden" name="action" value="submit">
146
+ <input type="hidden" name="jetpack" value="needs-service">
147
+
148
+ <input type="hidden" name="contact_form" id="contact_form" value="1">
149
+ <input type="hidden" name="blog_url" id="blog_url" value="<?php echo esc_attr( site_url() ); ?>">
150
+ <input type="hidden" name="subject" id="subject" value="from: <?php echo esc_attr( site_url() ); ?> Jetpack contact form">
151
+ <div class="formbox">
152
+ <label for="message" class="h"><?php esc_html_e( 'Please describe the problem you are having.', 'jetpack' ); ?></label>
153
+ <textarea name="message" cols="40" rows="7" id="did"></textarea>
154
+ </div>
155
+
156
+ <div id="name_div" class="formbox">
157
+ <label class="h" for="your_name"><?php esc_html_e( 'Name', 'jetpack' ); ?></label>
158
+ <span class="errormsg"><?php esc_html_e( 'Let us know your name.', 'jetpack' ); ?></span>
159
+ <input name="your_name" type="text" id="your_name" value="<?php esc_html_e( $current_user->display_name , 'jetpack'); ?>" size="40">
160
+ </div>
161
+
162
+ <div id="email_div" class="formbox">
163
+ <label class="h" for="your_email"><?php esc_html_e( 'E-mail', 'jetpack' ); ?></label>
164
+ <span class="errormsg"><?php esc_html_e( 'Use a valid email address.', 'jetpack' ); ?></span>
165
+ <input name="your_email" type="text" id="your_email" value="<?php esc_html_e( $current_user->user_email , 'jetpack'); ?>" size="40">
166
+ </div>
167
+
168
+ <div id="toggle_debug_info" class="formbox">
169
+ <p><?php _e( 'The test results and some other useful debug information will be sent to the support team. Please feel free to <a href="#">review/modify</a> this information.', 'jetpack' ); ?></p>
170
+ </div>
171
+
172
+ <div id="debug_info_div" class="formbox" style="display:none">
173
+ <label class="h" for="debug_info"><?php esc_html_e( 'Debug Info', 'jetpack' ); ?></label>
174
+ <textarea name="debug_info" cols="40" rows="7" id="debug_info"><?php echo esc_attr( $debug_info ); ?></textarea>
175
+ </div>
176
+
177
+ <div style="clear: both;"></div>
178
+
179
+ <div id="blog_div" class="formbox">
180
+ <div id="submit_div" class="contact-support">
181
+ <input type="submit" name="submit" value="Contact Support">
182
+ </div>
183
  </div>
184
+ <div style="clear: both;"></div>
185
+ </form>
186
+ <?php endif; ?>
187
+ </div>
188
  </div>
189
+ <?php
190
+ }
191
+
192
+ public static function jetpack_debug_admin_head() {
193
+ ?>
194
+ <style type="text/css">
195
+
196
+ .jetpack-debug-test-container {
197
+ margin-top: 20px;
198
+ margin-bottom: 30px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
199
  }
200
+
201
+ .jetpack-tests-succed {
202
+ font-size: large;
203
+ color: #8BAB3E;
204
  }
205
+
206
+ .jetpack-test-details {
207
+ margin: 4px 6px;
208
+ padding: 10px;
209
+ overflow: auto;
210
+ display: none;
211
  }
212
+
213
+ .jetpack-test-error {
214
+ margin-bottom: 10px;
215
+ background: #FFEBE8;
216
+ border: solid 1px #C00;
217
+ border-radius: 3px;
218
+ }
219
+
220
+ .jetpack-test-error p {
221
+ margin: 0;
222
+ padding: 0;
223
+ }
224
+
225
+ .jetpack-test-error a.jetpack-test-heading {
226
+ padding: 4px 6px;
227
+ display: block;
228
+ text-decoration: none;
229
+ color: inherit;
230
+ }
231
+
232
+ .jetpack-test-error .noticon {
233
+ float: right;
234
+ }
235
+
236
+ form#contactme {
237
+ border: 1px solid #dfdfdf;
238
+ background: #eaf3fa;
239
+ padding: 20px;
240
+ margin: 10px;
241
+ background-color: #eaf3fa;
242
+ border-radius: 5px;
243
+ font-size: 15px;
244
+ font-family: "Open Sans", "Helvetica Neue", sans-serif;
245
+ }
246
+
247
+ form#contactme label.h {
248
+ color: #444;
249
+ display: block;
250
+ font-weight: bold;
251
+ margin: 0 0 7px 10px;
252
+ text-shadow: 1px 1px 0 #fff;
253
+ }
254
+
255
+ .formbox {
256
+ margin: 0 0 25px 0;
257
+ }
258
+
259
+ .formbox input[type="text"], .formbox input[type="email"], .formbox input[type="url"], .formbox textarea {
260
+ border: 1px solid #e5e5e5;
261
+ border-radius: 11px;
262
+ box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);
263
+ color: #666;
264
+ font-size: 14px;
265
+ padding: 10px;
266
+ width: 97%;
267
+ }
268
+ .formbox .contact-support input[type="submit"] {
269
+ float: right;
270
+ margin: 0 !important;
271
+ border-radius: 20px !important;
272
+ cursor: pointer;
273
+ font-size: 13pt !important;
274
+ height: auto !important;
275
+ margin: 0 0 2em 10px !important;
276
+ padding: 8px 16px !important;
277
+ background-color: #ddd;
278
+ border: 1px solid rgba(0,0,0,0.05);
279
+ border-top-color: rgba(255,255,255,0.1);
280
+ border-bottom-color: rgba(0,0,0,0.15);
281
+ color: #333;
282
+ font-weight: 400;
283
+ display: inline-block;
284
+ text-align: center;
285
+ text-decoration: none;
286
+ }
287
+
288
+ .formbox span.errormsg {
289
+ margin: 0 0 10px 10px;
290
+ color: #d00;
291
+ display: none;
292
+ }
293
+
294
+ .formbox.error span.errormsg {
295
+ display: block;
296
+ }
297
+
298
+ #contact-message ul {
299
+ margin: 0 0 20px 10px;
300
+ }
301
+
302
+ #contact-message li {
303
+ margin: 0 0 10px 10px;
304
+ list-style: disc;
305
+ display: list-item;
306
+ }
307
+
308
+ </style>
309
+ <script type="text/javascript">
310
+ jQuery( document ).ready( function($) {
311
+
312
+ $('#debug_info').prepend('jQuery version: ' + jQuery.fn.jquery + "\r\n");
313
+
314
+ $( '.jetpack-test-error .jetpack-test-heading' ).on( 'click', function() {
315
+ $( this ).parents( '.jetpack-test-error' ).find( '.jetpack-test-details' ).slideToggle();
316
+ return false;
317
+ } );
318
+
319
+ $( '.jetpack-show-contact-form a' ).on( 'click', function() {
320
+ $('#contact-message').slideToggle();
321
+ return false;
322
+ } );
323
+
324
+ $( '#toggle_debug_info a' ).on( 'click', function() {
325
+ $('#debug_info_div').slideToggle();
326
+ return false;
327
+ } );
328
+
329
+ $('form#contactme').on("submit", function(e){
330
+ var form = $(this);
331
+ var message = form.find('#did');
332
+ var name = form.find('#your_name');
333
+ var email = form.find('#your_email')
334
+ var validation_error = false;
335
+ if( !name.val() ) {
336
+ name.parents('.formbox').addClass('error');
337
+ validation_error = true;
338
+ }
339
+ if( !email.val() ) {
340
+ email.parents('.formbox').addClass('error');
341
+ validation_error = true;
342
+ }
343
+ if ( validation_error ) {
344
+ return false;
345
+ }
346
+ message.val(message.val() + "\r\n\r\n----------------------------------------------\r\n\r\nDEBUG INFO:\r\n" + $('#debug_info').val() );
347
+ return true;
348
+ });
349
+
350
+ } );
351
+ </script>
352
+ <?php
353
+ }
354
+ }
class.jetpack-heartbeat.php CHANGED
@@ -73,7 +73,7 @@ class Jetpack_Heartbeat {
73
 
74
  $jetpack = Jetpack::init();
75
 
76
- $jetpack->stat( 'active-modules', implode( ',', $this->jetpack->get_active_modules() ) );
77
  $jetpack->stat( 'active', JETPACK__VERSION );
78
  $jetpack->stat( 'wp-version', get_bloginfo( 'version' ) );
79
  $jetpack->stat( 'php-version', PHP_VERSION );
@@ -108,14 +108,14 @@ class Jetpack_Heartbeat {
108
  public function add_cron_intervals( $schedules ) {
109
  $schedules['jetpack_weekly'] = array(
110
  'interval' => WEEK_IN_SECONDS,
111
- 'display' => __('Jetpack weekly')
112
  );
113
  return $schedules;
114
  }
115
 
116
  public function deactivate() {
117
  $timestamp = wp_next_scheduled( $this->cron_name );
118
- wp_unschedule_event($timestamp, $this->cron_name );
119
  }
120
 
121
  }
73
 
74
  $jetpack = Jetpack::init();
75
 
76
+ $jetpack->stat( 'active-modules', implode( ',', $jetpack->get_active_modules() ) );
77
  $jetpack->stat( 'active', JETPACK__VERSION );
78
  $jetpack->stat( 'wp-version', get_bloginfo( 'version' ) );
79
  $jetpack->stat( 'php-version', PHP_VERSION );
108
  public function add_cron_intervals( $schedules ) {
109
  $schedules['jetpack_weekly'] = array(
110
  'interval' => WEEK_IN_SECONDS,
111
+ 'display' => __( 'Jetpack weekly', 'jetpack' ),
112
  );
113
  return $schedules;
114
  }
115
 
116
  public function deactivate() {
117
  $timestamp = wp_next_scheduled( $this->cron_name );
118
+ wp_unschedule_event( $timestamp, $this->cron_name );
119
  }
120
 
121
  }
class.jetpack-options.php CHANGED
@@ -13,6 +13,7 @@ class Jetpack_Options {
13
  'do_activate',
14
  'publicize',
15
  'widget_twitter',
 
16
  );
17
  }
18
 
13
  'do_activate',
14
  'publicize',
15
  'widget_twitter',
16
+ 'wpcc_options',
17
  );
18
  }
19
 
class.jetpack.php CHANGED
@@ -37,6 +37,7 @@ class Jetpack {
37
  'after-the-deadline' => array( 'after-the-deadline/after-the-deadline.php', 'After The Deadline' ),
38
  'contact-form' => array( 'grunion-contact-form/grunion-contact-form.php', 'Grunion Contact Form' ),
39
  'custom-css' => array( 'safecss/safecss.php', 'WordPress.com Custom CSS' ),
 
40
  );
41
 
42
  var $capability_translations = array(
@@ -85,7 +86,7 @@ class Jetpack {
85
  /**
86
  * Holds the singleton instance of this class
87
  * @since 2.3.3
88
- * @var Jetpack
89
  */
90
  static $instance = false;
91
 
@@ -162,7 +163,7 @@ class Jetpack {
162
 
163
  // Modules should do Jetpack_Sync::sync_options( __FILE__, $option, ... ); instead
164
  // We access the "internal" method here only because the Jetpack object isn't instantiated yet
165
- $this->sync->options( __FILE__,
166
  'home',
167
  'siteurl',
168
  'blogname',
@@ -173,7 +174,7 @@ class Jetpack {
173
  if ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST && isset( $_GET['for'] ) && 'jetpack' == $_GET['for'] ) {
174
  @ini_set( 'display_errors', false ); // Display errors can cause the XML to be not well formed.
175
 
176
- require_once dirname( __FILE__ ) . '/class.jetpack-xmlrpc-server.php';
177
  $this->xmlrpc_server = new Jetpack_XMLRPC_Server();
178
 
179
  $this->require_jetpack_authentication();
@@ -448,7 +449,7 @@ class Jetpack {
448
  do_action( 'jetpack_modules_loaded' );
449
 
450
  // Load module-specific code that is needed even when a module isn't active. Loaded here because code contained therein may need actions such as setup_theme.
451
- require_once( dirname( __FILE__ ) . '/modules/module-extras.php' );
452
  }
453
 
454
  /**
@@ -460,7 +461,7 @@ class Jetpack {
460
  $_jetpack_rest_api_compat_includes = apply_filters( 'jetpack_rest_api_compat', array() );
461
 
462
  if ( function_exists( 'bbpress' ) )
463
- $_jetpack_rest_api_compat_includes[] = dirname( __FILE__ ) . '/class.jetpack-bbpress-json-api-compat.php';
464
 
465
  foreach ( $_jetpack_rest_api_compat_includes as $_jetpack_rest_api_compat_include )
466
  require_once $_jetpack_rest_api_compat_include;
@@ -490,28 +491,35 @@ class Jetpack {
490
  }
491
 
492
  $conflicting_plugins = array(
493
- 'facebook/facebook.php', // Official Facebook plugin
494
- 'wordpress-seo/wp-seo.php', // WordPress SEO by Yoast
495
- 'add-link-to-facebook/add-link-to-facebook.php', // Add Link to Facebook
496
- 'facebook-awd/AWD_facebook.php', // Facebook AWD All in one
497
- 'header-footer/plugin.php', // Header and Footer
498
- 'nextgen-facebook/nextgen-facebook.php', // NextGEN Facebook OG
499
- 'seo-facebook-comments/seofacebook.php', // SEO Facebook Comments
500
- 'seo-ultimate/seo-ultimate.php', // SEO Ultimate
501
- 'sexybookmarks/sexy-bookmarks.php', // Shareaholic
502
- 'shareaholic/sexy-bookmarks.php', // Shareaholic
503
- 'social-discussions/social-discussions.php', // Social Discussions
504
- 'social-networks-auto-poster-facebook-twitter-g/NextScripts_SNAP.php', // NextScripts SNAP
505
- 'wordbooker/wordbooker.php', // Wordbooker
506
- 'socialize/socialize.php', // Socialize
507
- 'simple-facebook-connect/sfc.php', // Simple Facebook Connect
508
- 'social-sharing-toolkit/social_sharing_toolkit.php', // Social Sharing Toolkit
509
- 'wp-facebook-open-graph-protocol/wp-facebook-ogp.php', // WP Facebook Open Graph protocol
510
- 'opengraph/opengraph.php', // Open Graph
511
- 'sharepress/sharepress.php', // SharePress
512
- 'wp-facebook-like-send-open-graph-meta/wp-facebook-like-send-open-graph-meta.php', // WP Facebook Like Send & Open Graph Meta
513
- 'network-publisher/networkpub.php', // Network Publisher
514
- 'wp-ogp/wp-ogp.php', // WP-OGP
 
 
 
 
 
 
 
515
  );
516
 
517
  foreach ( $conflicting_plugins as $plugin ) {
@@ -522,7 +530,7 @@ class Jetpack {
522
  }
523
 
524
  if ( apply_filters( 'jetpack_enable_open_graph', false ) )
525
- require_once dirname( __FILE__ ) . '/functions.opengraph.php';
526
  }
527
 
528
  /* Jetpack Options API */
@@ -701,7 +709,7 @@ class Jetpack {
701
  static $modules = null;
702
 
703
  if ( !isset( $modules ) ) {
704
- $files = Jetpack::glob_php( dirname( __FILE__ ) . '/modules' );
705
 
706
  $modules = array();
707
 
@@ -714,6 +722,8 @@ class Jetpack {
714
  }
715
  }
716
 
 
 
717
  if ( !$min_version && !$max_version ) {
718
  return array_keys( $modules );
719
  }
@@ -741,33 +751,25 @@ class Jetpack {
741
  $return = array();
742
 
743
  foreach ( Jetpack::get_available_modules( $min_version, $max_version ) as $module ) {
744
- // Add special cases here for modules to avoid auto-activation
745
- switch ( $module ) {
746
-
747
- // These modules are default off: they change things blog-side
748
- case 'comments' :
749
- case 'carousel' :
750
- case 'minileven':
751
- case 'infinite-scroll' :
752
- case 'photon' :
753
- case 'tiled-gallery' :
754
- case 'likes' :
755
- break;
756
 
757
- // These modules are default off if we think the site is a private one
758
- case 'enhanced-distribution' :
759
- case 'json-api' :
760
- if ( !Jetpack::get_option( 'public' ) ) {
 
 
 
 
 
 
 
761
  break;
762
- }
763
- // else no break
764
- // The rest are default on
765
- default :
766
- $return[] = $module;
767
  }
 
768
  }
769
 
770
- return $return;
771
  }
772
 
773
  /**
@@ -781,7 +783,7 @@ class Jetpack {
781
  * Generate a module's path from its slug.
782
  */
783
  public static function get_module_path( $slug ) {
784
- return dirname( __FILE__ ) . "/modules/$slug.php";
785
  }
786
 
787
  /**
@@ -799,6 +801,7 @@ class Jetpack {
799
  'deactivate' => 'Deactivate',
800
  'free' => 'Free',
801
  'requires_connection' => 'Requires Connection',
 
802
  );
803
 
804
  $file = Jetpack::get_module_path( Jetpack::get_module_slug( $module ) );
@@ -816,6 +819,13 @@ class Jetpack {
816
  $mod['deactivate'] = empty( $mod['deactivate'] );
817
  $mod['free'] = empty( $mod['free'] );
818
  $mod['requires_connection'] = ( ! empty( $mod['requires_connection'] ) && 'No' == $mod['requires_connection'] ) ? false : true;
 
 
 
 
 
 
 
819
  return $mod;
820
  }
821
 
@@ -988,7 +998,7 @@ class Jetpack {
988
 
989
  $module_data = Jetpack::get_module( $module );
990
 
991
- if ( ! Jetpack::is_active() ) {
992
  if ( ! Jetpack::is_development_mode() )
993
  return false;
994
 
@@ -1101,7 +1111,7 @@ p {
1101
  <?php
1102
  if ( $deactivate ) {
1103
  $plugins = get_option( 'active_plugins' );
1104
- $jetpack = plugin_basename( __FILE__ );
1105
  $update = false;
1106
  foreach ( $plugins as $i => $plugin ) {
1107
  if ( $plugin === $jetpack ) {
@@ -1273,7 +1283,7 @@ p {
1273
 
1274
  add_action( 'load-plugins.php', array( $this, 'intercept_plugin_error_scrape_init' ) );
1275
  add_action( 'admin_head', array( $this, 'admin_menu_css' ) );
1276
- add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'plugin_action_links' ) );
1277
 
1278
  if ( Jetpack::is_active() || Jetpack::is_development_mode() ) {
1279
  // Artificially throw errors in certain whitelisted cases during plugin activation
@@ -1372,10 +1382,9 @@ p {
1372
  }
1373
 
1374
  $hook = add_menu_page( 'Jetpack', $title, 'read', 'jetpack', array( $this, 'admin_page' ), 'div' );
1375
-
1376
- $debugger_hook = add_submenu_page( 'jetpack', 'Jetpack Debugging Center', '', 'manage_options', 'jetpack-debugger', array( $this, 'debugger_page' ) );
1377
- add_action( "admin_head-$debugger_hook", 'jetpack_debug_admin_head' );
1378
 
 
 
1379
 
1380
  add_action( "load-$hook", array( $this, 'admin_page_load' ) );
1381
 
@@ -1404,7 +1413,7 @@ p {
1404
  add_action( "load-$hook", array( $this, 'admin_help' ) );
1405
  add_action( "admin_head-$hook", array( $this, 'admin_head' ) );
1406
  add_action( "admin_print_styles-$hook", array( $this, 'admin_styles' ) );
1407
- add_action( "admin_print_scripts-$hook", array( $this, 'admin_scripts' ) );
1408
  }
1409
  /**/
1410
  function add_remote_request_handlers() {
@@ -1585,7 +1594,7 @@ p {
1585
  '<p><strong>' . __( 'For more information:', 'jetpack' ) . '</strong></p>' .
1586
  '<p><a href="http://jetpack.me/faq/" target="_blank">' . __( 'Jetpack FAQ', 'jetpack' ) . '</a></p>' .
1587
  '<p><a href="http://jetpack.me/support/" target="_blank">' . __( 'Jetpack Support', 'jetpack' ) . '</a></p>' .
1588
- '<p><a href="' . Jetpack::admin_url( array( 'page' => 'jetpack-debugger' ) ) .'">' . __( 'Jetpack Debugging Center', 'jetpack' ) . '</a></p>'
1589
 
1590
  );
1591
  }
@@ -1593,12 +1602,12 @@ p {
1593
  function admin_menu_css() { ?>
1594
  <style type="text/css" id="jetpack-menu-css">
1595
  #toplevel_page_jetpack .wp-menu-image {
1596
- background: url( <?php echo plugins_url( basename( dirname( __FILE__ ) ) . '/_inc/images/menuicon-sprite.png' ) ?> ) 0 90% no-repeat;
1597
  }
1598
  /* Retina Jetpack Menu Icon */
1599
  @media only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5) {
1600
  #toplevel_page_jetpack .wp-menu-image {
1601
- background: url( <?php echo plugins_url( basename( dirname( __FILE__ ) ) . '/_inc/images/menuicon-sprite-2x.png' ) ?> ) 0 90% no-repeat;
1602
  background-size:30px 64px;
1603
  }
1604
  }
@@ -1635,12 +1644,12 @@ p {
1635
 
1636
  function admin_styles() {
1637
  global $wp_styles;
1638
- wp_enqueue_style( 'jetpack', plugins_url( basename( dirname( __FILE__ ) ) . '/_inc/jetpack.css' ), false, JETPACK__VERSION . '-20121016' );
1639
  $wp_styles->add_data( 'jetpack', 'rtl', true );
1640
  }
1641
 
1642
  function admin_scripts() {
1643
- wp_enqueue_script( 'jetpack-js', plugins_url( basename( dirname( __FILE__ ) ) ) . '/_inc/jetpack.js', array( 'jquery' ), JETPACK__VERSION . '-20121111' );
1644
  wp_localize_script( 'jetpack-js', 'jetpackL10n', array(
1645
  'ays_disconnect' => "This will deactivate all Jetpack modules.\nAre you sure you want to disconnect?",
1646
  'ays_unlink' => "This will prevent user-specific modules such as Publicize, Notifications and Post By Email from working.\nAre you sure you want to unlink?",
@@ -1666,7 +1675,7 @@ p {
1666
  return;
1667
  ?>
1668
 
1669
- <div id="message" class="updated jetpack-message jp-connect">
1670
  <div id="jp-dismiss" class="jetpack-close-button-container">
1671
  <a class="jetpack-close-button" href="?page=jetpack&jetpack-notice=dismiss" title="<?php _e( 'Dismiss this notice and deactivate Jetpack.', 'jetpack' ); ?>"><?php _e( 'Dismiss this notice and deactivate Jetpack.', 'jetpack' ); ?></a>
1672
  </div>
@@ -2371,10 +2380,10 @@ p {
2371
  }
2372
 
2373
  function dismiss_jetpack_notice() {
2374
- if ( isset( $_GET['jetpack-notice'] ) && 'dismiss' == $_GET['jetpack-notice'] && ! is_plugin_active_for_network( plugin_basename( __FILE__ ) ) ) {
2375
  require_once ABSPATH . 'wp-admin/includes/plugin.php';
2376
 
2377
- deactivate_plugins( plugin_basename( __FILE__ ), false, false );
2378
 
2379
  wp_safe_redirect( admin_url() . 'plugins.php?deactivate=true&plugin_status=all&paged=1&s=' );
2380
  exit;
@@ -2434,7 +2443,7 @@ p {
2434
  ?>
2435
  <?php if ( ! $is_connected ) : ?>
2436
 
2437
- <div id="message" class="updated jetpack-message jp-connect">
2438
  <div id="jp-dismiss" class="jetpack-close-button-container">
2439
  <a class="jetpack-close-button" href="?page=jetpack&jetpack-notice=dismiss" title="<?php _e( 'Dismiss this notice.', 'jetpack' ); ?>"><?php _e( 'Dismiss this notice.', 'jetpack' ); ?></a>
2440
  </div>
@@ -2452,7 +2461,7 @@ p {
2452
 
2453
  <?php elseif ( ! $is_user_connected ) : ?>
2454
 
2455
- <div id="message" class="updated jetpack-message jp-connect">
2456
  <div class="jetpack-wrap-container">
2457
  <div class="jetpack-text-container">
2458
  <h4>
@@ -2650,7 +2659,7 @@ p {
2650
  if ( !current_user_can( 'manage_options' ) ) {
2651
  die( '-1' );
2652
  }
2653
- jetpack_debug_display_handler();
2654
  exit;
2655
  }
2656
 
@@ -2679,7 +2688,7 @@ p {
2679
  }
2680
 
2681
  function admin_screen_list_modules() {
2682
- require_once dirname( __FILE__ ) . '/modules/module-info.php';
2683
  $jetpack_connected = true;
2684
  if ( !Jetpack::is_active() )
2685
  $jetpack_connected = false;
@@ -2912,9 +2921,9 @@ p {
2912
 
2913
  /**
2914
  * Checks to see if the URL is using SSL to connect with Jetpack
2915
- *
2916
  * @since 2.3.3
2917
- * @return boolean
2918
  */
2919
  public static function permit_ssl( $force_recheck = false ) {
2920
  // Do some fancy tests to see if ssl is being supported
@@ -2934,7 +2943,7 @@ p {
2934
  break;
2935
  }
2936
 
2937
- // If it's not 'NEVER', test to see
2938
  if ( $ssl ) {
2939
  $response = wp_remote_get( JETPACK__API_BASE . 'test/1/' );
2940
  if ( is_wp_error( $response ) || ( 'OK' !== wp_remote_retrieve_body( $response ) ) ) {
@@ -3088,7 +3097,7 @@ p {
3088
  */
3089
  public static function load_xml_rpc_client() {
3090
  require_once ABSPATH . WPINC . '/class-IXR.php';
3091
- require_once dirname( __FILE__ ) . '/class.jetpack-ixr-client.php';
3092
  }
3093
 
3094
  function verify_xml_rpc_signature() {
@@ -3135,7 +3144,7 @@ p {
3135
  return false;
3136
  }
3137
 
3138
- require_once dirname( __FILE__ ) . '/class.jetpack-signature.php';
3139
 
3140
  $jetpack_signature = new Jetpack_Signature( $token->secret, (int) Jetpack::get_option( 'time_diff' ) );
3141
  if ( isset( $_POST['_jetpack_is_multipart'] ) ) {
@@ -3503,7 +3512,7 @@ p {
3503
 
3504
  // Verifies the request by checking the signature
3505
  function verify_json_api_authorization_request() {
3506
- require_once dirname( __FILE__ ) . '/class.jetpack-signature.php';
3507
 
3508
  $token = Jetpack_Data::get_access_token( JETPACK_MASTER_USER );
3509
  if ( !$token || empty( $token->secret ) ) {
@@ -3587,7 +3596,8 @@ p {
3587
  * Get $content_width, but with a <s>twist</s> filter.
3588
  */
3589
  public static function get_content_width() {
3590
- return apply_filters( 'jetpack_content_width', $GLOBALS['content_width'] );
 
3591
  }
3592
 
3593
  /**
@@ -3597,7 +3607,7 @@ p {
3597
  * @param int $size Size of the avatar image
3598
  * @param string $default URL to a default image to use if no avatar is available
3599
  * @param bool $force_display Whether to force it to return an avatar even if show_avatars is disabled
3600
- *
3601
  * @return array First element is the URL, second is the class.
3602
  */
3603
  public static function get_avatar_url( $id_or_email, $size = 96, $default = '', $force_display = false ) {
37
  'after-the-deadline' => array( 'after-the-deadline/after-the-deadline.php', 'After The Deadline' ),
38
  'contact-form' => array( 'grunion-contact-form/grunion-contact-form.php', 'Grunion Contact Form' ),
39
  'custom-css' => array( 'safecss/safecss.php', 'WordPress.com Custom CSS' ),
40
+ 'random-redirect' => array( 'random-redirect/random-redirect.php', 'Random Redirect' ),
41
  );
42
 
43
  var $capability_translations = array(
86
  /**
87
  * Holds the singleton instance of this class
88
  * @since 2.3.3
89
+ * @var Jetpack
90
  */
91
  static $instance = false;
92
 
163
 
164
  // Modules should do Jetpack_Sync::sync_options( __FILE__, $option, ... ); instead
165
  // We access the "internal" method here only because the Jetpack object isn't instantiated yet
166
+ $this->sync->options( JETPACK__PLUGIN_DIR . 'jetpack.php',
167
  'home',
168
  'siteurl',
169
  'blogname',
174
  if ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST && isset( $_GET['for'] ) && 'jetpack' == $_GET['for'] ) {
175
  @ini_set( 'display_errors', false ); // Display errors can cause the XML to be not well formed.
176
 
177
+ require_once JETPACK__PLUGIN_DIR . 'class.jetpack-xmlrpc-server.php';
178
  $this->xmlrpc_server = new Jetpack_XMLRPC_Server();
179
 
180
  $this->require_jetpack_authentication();
449
  do_action( 'jetpack_modules_loaded' );
450
 
451
  // Load module-specific code that is needed even when a module isn't active. Loaded here because code contained therein may need actions such as setup_theme.
452
+ require_once( JETPACK__PLUGIN_DIR . 'modules/module-extras.php' );
453
  }
454
 
455
  /**
461
  $_jetpack_rest_api_compat_includes = apply_filters( 'jetpack_rest_api_compat', array() );
462
 
463
  if ( function_exists( 'bbpress' ) )
464
+ $_jetpack_rest_api_compat_includes[] = JETPACK__PLUGIN_DIR . 'class.jetpack-bbpress-json-api-compat.php';
465
 
466
  foreach ( $_jetpack_rest_api_compat_includes as $_jetpack_rest_api_compat_include )
467
  require_once $_jetpack_rest_api_compat_include;
491
  }
492
 
493
  $conflicting_plugins = array(
494
+ 'facebook/facebook.php', // Official Facebook plugin
495
+ 'wordpress-seo/wp-seo.php', // WordPress SEO by Yoast
496
+ 'add-link-to-facebook/add-link-to-facebook.php', // Add Link to Facebook
497
+ 'facebook-awd/AWD_facebook.php', // Facebook AWD All in one
498
+ 'header-footer/plugin.php', // Header and Footer
499
+ 'nextgen-facebook/nextgen-facebook.php', // NextGEN Facebook OG
500
+ 'seo-facebook-comments/seofacebook.php', // SEO Facebook Comments
501
+ 'seo-ultimate/seo-ultimate.php', // SEO Ultimate
502
+ 'sexybookmarks/sexy-bookmarks.php', // Shareaholic
503
+ 'shareaholic/sexy-bookmarks.php', // Shareaholic
504
+ 'social-discussions/social-discussions.php', // Social Discussions
505
+ 'social-networks-auto-poster-facebook-twitter-g/NextScripts_SNAP.php', // NextScripts SNAP
506
+ 'wordbooker/wordbooker.php', // Wordbooker
507
+ 'socialize/socialize.php', // Socialize
508
+ 'simple-facebook-connect/sfc.php', // Simple Facebook Connect
509
+ 'social-sharing-toolkit/social_sharing_toolkit.php', // Social Sharing Toolkit
510
+ 'wp-facebook-open-graph-protocol/wp-facebook-ogp.php', // WP Facebook Open Graph protocol
511
+ 'opengraph/opengraph.php', // Open Graph
512
+ 'sharepress/sharepress.php', // SharePress
513
+ 'wp-facebook-like-send-open-graph-meta/wp-facebook-like-send-open-graph-meta.php', // WP Facebook Like Send & Open Graph Meta
514
+ 'network-publisher/networkpub.php', // Network Publisher
515
+ 'wp-ogp/wp-ogp.php', // WP-OGP
516
+ 'twitter-cards/twitter-cards.php', // Twitter Cards
517
+ 'twitter-cards-meta/twitter-cards-meta.php', // Twitter Cards Meta
518
+ 'ig-twitter-cards/ig-twitter-cards.php', // IG:Twitter Cards
519
+ 'kevinjohn-gallagher-pure-web-brilliants-social-graph-twitter-cards-extention/kevinjohn_gallagher___social_graph_twitter_output.php', // Pure Web Brilliant's Social Graph Twitter Cards Extention
520
+ 'jm-twitter-cards/jm-twitter-cards.php', // JM Twitter Cards
521
+ 'wp-twitter-cards/twitter_cards.php', // WP Twitter Cards
522
+ 'eewee-twitter-card/index.php', // eewee twitter card
523
  );
524
 
525
  foreach ( $conflicting_plugins as $plugin ) {
530
  }
531
 
532
  if ( apply_filters( 'jetpack_enable_open_graph', false ) )
533
+ require_once JETPACK__PLUGIN_DIR . 'functions.opengraph.php';
534
  }
535
 
536
  /* Jetpack Options API */
709
  static $modules = null;
710
 
711
  if ( !isset( $modules ) ) {
712
+ $files = Jetpack::glob_php( JETPACK__PLUGIN_DIR . 'modules' );
713
 
714
  $modules = array();
715
 
722
  }
723
  }
724
 
725
+ $modules = apply_filters( 'jetpack_get_available_modules', $modules, $min_version, $max_version );
726
+
727
  if ( !$min_version && !$max_version ) {
728
  return array_keys( $modules );
729
  }
751
  $return = array();
752
 
753
  foreach ( Jetpack::get_available_modules( $min_version, $max_version ) as $module ) {
754
+ $module_data = Jetpack::get_module( $module );
 
 
 
 
 
 
 
 
 
 
 
755
 
756
+ switch ( strtolower( $module_data['auto_activate'] ) ) {
757
+ case 'yes' :
758
+ $return[] = $module;
759
+ break;
760
+ case 'public' :
761
+ if ( Jetpack::get_option( 'public' ) ) {
762
+ $return[] = $module;
763
+ }
764
+ break;
765
+ case 'no' :
766
+ default :
767
  break;
 
 
 
 
 
768
  }
769
+
770
  }
771
 
772
+ return apply_filters( 'jetpack_get_default_modules', $return, $min_version, $max_version );
773
  }
774
 
775
  /**
783
  * Generate a module's path from its slug.
784
  */
785
  public static function get_module_path( $slug ) {
786
+ return JETPACK__PLUGIN_DIR . "modules/$slug.php";
787
  }
788
 
789
  /**
801
  'deactivate' => 'Deactivate',
802
  'free' => 'Free',
803
  'requires_connection' => 'Requires Connection',
804
+ 'auto_activate' => 'Auto Activate',
805
  );
806
 
807
  $file = Jetpack::get_module_path( Jetpack::get_module_slug( $module ) );
819
  $mod['deactivate'] = empty( $mod['deactivate'] );
820
  $mod['free'] = empty( $mod['free'] );
821
  $mod['requires_connection'] = ( ! empty( $mod['requires_connection'] ) && 'No' == $mod['requires_connection'] ) ? false : true;
822
+
823
+ if ( empty( $mod['auto_activate'] ) || ! in_array( strtolower( $mod['auto_activate'] ), array( 'yes', 'no', 'public' ) ) ) {
824
+ $mod['auto_activate'] = 'No';
825
+ } else {
826
+ $mod['auto_activate'] = (string) $mod['auto_activate'];
827
+ }
828
+
829
  return $mod;
830
  }
831
 
998
 
999
  $module_data = Jetpack::get_module( $module );
1000
 
1001
+ if ( ! Jetpack::is_active() ) {
1002
  if ( ! Jetpack::is_development_mode() )
1003
  return false;
1004
 
1111
  <?php
1112
  if ( $deactivate ) {
1113
  $plugins = get_option( 'active_plugins' );
1114
+ $jetpack = plugin_basename( JETPACK__PLUGIN_DIR . 'jetpack.php' );
1115
  $update = false;
1116
  foreach ( $plugins as $i => $plugin ) {
1117
  if ( $plugin === $jetpack ) {
1283
 
1284
  add_action( 'load-plugins.php', array( $this, 'intercept_plugin_error_scrape_init' ) );
1285
  add_action( 'admin_head', array( $this, 'admin_menu_css' ) );
1286
+ add_filter( 'plugin_action_links_' . plugin_basename( JETPACK__PLUGIN_DIR . 'jetpack.php' ), array( $this, 'plugin_action_links' ) );
1287
 
1288
  if ( Jetpack::is_active() || Jetpack::is_development_mode() ) {
1289
  // Artificially throw errors in certain whitelisted cases during plugin activation
1382
  }
1383
 
1384
  $hook = add_menu_page( 'Jetpack', $title, 'read', 'jetpack', array( $this, 'admin_page' ), 'div' );
 
 
 
1385
 
1386
+ $debugger_hook = add_submenu_page( null, __( 'Jetpack Debugging Center', 'jetpack' ), '', 'manage_options', 'jetpack-debugger', array( $this, 'debugger_page' ) );
1387
+ add_action( "admin_head-$debugger_hook", array( 'Jetpack_Debugger', 'jetpack_debug_admin_head' ) );
1388
 
1389
  add_action( "load-$hook", array( $this, 'admin_page_load' ) );
1390
 
1413
  add_action( "load-$hook", array( $this, 'admin_help' ) );
1414
  add_action( "admin_head-$hook", array( $this, 'admin_head' ) );
1415
  add_action( "admin_print_styles-$hook", array( $this, 'admin_styles' ) );
1416
+ add_action( "admin_print_scripts-$hook", array( $this, 'admin_scripts' ) );
1417
  }
1418
  /**/
1419
  function add_remote_request_handlers() {
1594
  '<p><strong>' . __( 'For more information:', 'jetpack' ) . '</strong></p>' .
1595
  '<p><a href="http://jetpack.me/faq/" target="_blank">' . __( 'Jetpack FAQ', 'jetpack' ) . '</a></p>' .
1596
  '<p><a href="http://jetpack.me/support/" target="_blank">' . __( 'Jetpack Support', 'jetpack' ) . '</a></p>' .
1597
+ '<p><a href="' . Jetpack::admin_url( array( 'page' => 'jetpack-debugger' ) ) .'">' . __( 'Jetpack Debugging Center', 'jetpack' ) . '</a></p>'
1598
 
1599
  );
1600
  }
1602
  function admin_menu_css() { ?>
1603
  <style type="text/css" id="jetpack-menu-css">
1604
  #toplevel_page_jetpack .wp-menu-image {
1605
+ background: url( <?php echo plugins_url( '_inc/images/menuicon-sprite.png', __FILE__ ) ?> ) 0 90% no-repeat;
1606
  }
1607
  /* Retina Jetpack Menu Icon */
1608
  @media only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5) {
1609
  #toplevel_page_jetpack .wp-menu-image {
1610
+ background: url( <?php echo plugins_url( '_inc/images/menuicon-sprite-2x.png', __FILE__ ) ?> ) 0 90% no-repeat;
1611
  background-size:30px 64px;
1612
  }
1613
  }
1644
 
1645
  function admin_styles() {
1646
  global $wp_styles;
1647
+ wp_enqueue_style( 'jetpack', plugins_url( '_inc/jetpack.css', __FILE__ ), false, JETPACK__VERSION . '-20121016' );
1648
  $wp_styles->add_data( 'jetpack', 'rtl', true );
1649
  }
1650
 
1651
  function admin_scripts() {
1652
+ wp_enqueue_script( 'jetpack-js', plugins_url( '_inc/jetpack.js', __FILE__ ), array( 'jquery' ), JETPACK__VERSION . '-20121111' );
1653
  wp_localize_script( 'jetpack-js', 'jetpackL10n', array(
1654
  'ays_disconnect' => "This will deactivate all Jetpack modules.\nAre you sure you want to disconnect?",
1655
  'ays_unlink' => "This will prevent user-specific modules such as Publicize, Notifications and Post By Email from working.\nAre you sure you want to unlink?",
1675
  return;
1676
  ?>
1677
 
1678
+ <div id="message" class="updated jetpack-message jp-connect" style="display:block !important;">
1679
  <div id="jp-dismiss" class="jetpack-close-button-container">
1680
  <a class="jetpack-close-button" href="?page=jetpack&jetpack-notice=dismiss" title="<?php _e( 'Dismiss this notice and deactivate Jetpack.', 'jetpack' ); ?>"><?php _e( 'Dismiss this notice and deactivate Jetpack.', 'jetpack' ); ?></a>
1681
  </div>
2380
  }
2381
 
2382
  function dismiss_jetpack_notice() {
2383
+ if ( isset( $_GET['jetpack-notice'] ) && 'dismiss' == $_GET['jetpack-notice'] && ! is_plugin_active_for_network( plugin_basename( JETPACK__PLUGIN_DIR . 'jetpack.php' ) ) ) {
2384
  require_once ABSPATH . 'wp-admin/includes/plugin.php';
2385
 
2386
+ deactivate_plugins( JETPACK__PLUGIN_DIR . 'jetpack.php', false, false );
2387
 
2388
  wp_safe_redirect( admin_url() . 'plugins.php?deactivate=true&plugin_status=all&paged=1&s=' );
2389
  exit;
2443
  ?>
2444
  <?php if ( ! $is_connected ) : ?>
2445
 
2446
+ <div id="message" class="updated jetpack-message jp-connect" style="display:block !important;">
2447
  <div id="jp-dismiss" class="jetpack-close-button-container">
2448
  <a class="jetpack-close-button" href="?page=jetpack&jetpack-notice=dismiss" title="<?php _e( 'Dismiss this notice.', 'jetpack' ); ?>"><?php _e( 'Dismiss this notice.', 'jetpack' ); ?></a>
2449
  </div>
2461
 
2462
  <?php elseif ( ! $is_user_connected ) : ?>
2463
 
2464
+ <div id="message" class="updated jetpack-message jp-connect" style="display:block !important;">
2465
  <div class="jetpack-wrap-container">
2466
  <div class="jetpack-text-container">
2467
  <h4>
2659
  if ( !current_user_can( 'manage_options' ) ) {
2660
  die( '-1' );
2661
  }
2662
+ Jetpack_Debugger::jetpack_debug_display_handler();
2663
  exit;
2664
  }
2665
 
2688
  }
2689
 
2690
  function admin_screen_list_modules() {
2691
+ require_once JETPACK__PLUGIN_DIR . 'modules/module-info.php';
2692
  $jetpack_connected = true;
2693
  if ( !Jetpack::is_active() )
2694
  $jetpack_connected = false;
2921
 
2922
  /**
2923
  * Checks to see if the URL is using SSL to connect with Jetpack
2924
+ *
2925
  * @since 2.3.3
2926
+ * @return boolean
2927
  */
2928
  public static function permit_ssl( $force_recheck = false ) {
2929
  // Do some fancy tests to see if ssl is being supported
2943
  break;
2944
  }
2945
 
2946
+ // If it's not 'NEVER', test to see
2947
  if ( $ssl ) {
2948
  $response = wp_remote_get( JETPACK__API_BASE . 'test/1/' );
2949
  if ( is_wp_error( $response ) || ( 'OK' !== wp_remote_retrieve_body( $response ) ) ) {
3097
  */
3098
  public static function load_xml_rpc_client() {
3099
  require_once ABSPATH . WPINC . '/class-IXR.php';
3100
+ require_once JETPACK__PLUGIN_DIR . 'class.jetpack-ixr-client.php';
3101
  }
3102
 
3103
  function verify_xml_rpc_signature() {
3144
  return false;
3145
  }
3146
 
3147
+ require_once JETPACK__PLUGIN_DIR . 'class.jetpack-signature.php';
3148
 
3149
  $jetpack_signature = new Jetpack_Signature( $token->secret, (int) Jetpack::get_option( 'time_diff' ) );
3150
  if ( isset( $_POST['_jetpack_is_multipart'] ) ) {
3512
 
3513
  // Verifies the request by checking the signature
3514
  function verify_json_api_authorization_request() {
3515
+ require_once JETPACK__PLUGIN_DIR . 'class.jetpack-signature.php';
3516
 
3517
  $token = Jetpack_Data::get_access_token( JETPACK_MASTER_USER );
3518
  if ( !$token || empty( $token->secret ) ) {
3596
  * Get $content_width, but with a <s>twist</s> filter.
3597
  */
3598
  public static function get_content_width() {
3599
+ $content_width = isset( $GLOBALS['content_width'] ) ? $GLOBALS['content_width'] : false;
3600
+ return apply_filters( 'jetpack_content_width', $content_width );
3601
  }
3602
 
3603
  /**
3607
  * @param int $size Size of the avatar image
3608
  * @param string $default URL to a default image to use if no avatar is available
3609
  * @param bool $force_display Whether to force it to return an avatar even if show_avatars is disabled
3610
+ *
3611
  * @return array First element is the URL, second is the class.
3612
  */
3613
  public static function get_avatar_url( $id_or_email, $size = 96, $default = '', $force_display = false ) {
class.json-api-endpoints.php CHANGED
@@ -880,6 +880,7 @@ EOPHP;
880
  $name = $author->comment_author;
881
  $URL = $author->comment_author_url;
882
  $profile_URL = 'http://en.gravatar.com/' . md5( strtolower( trim( $email ) ) );
 
883
  } else {
884
  if ( isset( $author->post_author ) ) {
885
  if ( 0 == $author->post_author )
@@ -902,6 +903,7 @@ EOPHP;
902
  $email = $user->user_email;
903
  $name = $user->display_name;
904
  $URL = $user->user_url;
 
905
  if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
906
  $profile_URL = "http://en.gravatar.com/{$user->user_login}";
907
  } else {
@@ -917,6 +919,7 @@ EOPHP;
917
  'ID' => (int) $ID,
918
  'email' => $email, // (string|bool)
919
  'name' => (string) $name,
 
920
  'URL' => (string) esc_url_raw( $URL ),
921
  'avatar_URL' => (string) esc_url_raw( $avatar_URL ),
922
  'profile_URL' => (string) esc_url_raw( $profile_URL ),
@@ -2230,7 +2233,11 @@ class WPCOM_JSON_API_Update_Taxonomy_Endpoint extends WPCOM_JSON_API_Taxonomy_En
2230
  )
2231
  );
2232
 
 
 
 
2233
  $taxonomy = get_term_by( 'id', $data['term_id'], $taxonomy_type );
 
2234
  $return = $this->get_taxonomy( $taxonomy->slug, $taxonomy_type, $args['context'] );
2235
  if ( !$return || is_wp_error( $return ) ) {
2236
  return $return;
880
  $name = $author->comment_author;
881
  $URL = $author->comment_author_url;
882
  $profile_URL = 'http://en.gravatar.com/' . md5( strtolower( trim( $email ) ) );
883
+ $nice = '';
884
  } else {
885
  if ( isset( $author->post_author ) ) {
886
  if ( 0 == $author->post_author )
903
  $email = $user->user_email;
904
  $name = $user->display_name;
905
  $URL = $user->user_url;
906
+ $nice = $user->user_nicename;
907
  if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
908
  $profile_URL = "http://en.gravatar.com/{$user->user_login}";
909
  } else {
919
  'ID' => (int) $ID,
920
  'email' => $email, // (string|bool)
921
  'name' => (string) $name,
922
+ 'nice_name' => (string) $nice,
923
  'URL' => (string) esc_url_raw( $URL ),
924
  'avatar_URL' => (string) esc_url_raw( $avatar_URL ),
925
  'profile_URL' => (string) esc_url_raw( $profile_URL ),
2233
  )
2234
  );
2235
 
2236
+ if ( is_wp_error( $data ) )
2237
+ return $data;
2238
+
2239
  $taxonomy = get_term_by( 'id', $data['term_id'], $taxonomy_type );
2240
+
2241
  $return = $this->get_taxonomy( $taxonomy->slug, $taxonomy_type, $args['context'] );
2242
  if ( !$return || is_wp_error( $return ) ) {
2243
  return $return;
class.photon.php CHANGED
@@ -444,7 +444,7 @@ class Jetpack_Photon {
444
  ) );
445
 
446
  // Bail if scheme isn't http or port is set that isn't port 80
447
- if ( 'http' != $url_info['scheme'] || ! in_array( $url_info['port'], array( 80, null ) ) )
448
  return false;
449
 
450
  // Bail if no host is found
444
  ) );
445
 
446
  // Bail if scheme isn't http or port is set that isn't port 80
447
+ if ( ( 'http' != $url_info['scheme'] || ! in_array( $url_info['port'], array( 80, null ) ) ) && apply_filters( 'jetpack_photon_reject_https', true ) )
448
  return false;
449
 
450
  // Bail if no host is found
functions.twitter-cards.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /* Twitter Cards
4
+ *
5
+ * Hooks onto the Open Graph protocol and extends it by adding only the tags
6
+ * we need for twitter cards.
7
+ *
8
+ * @see /wp-content/blog-plugins/open-graph.php
9
+ * @see https://dev.twitter.com/docs/cards
10
+ */
11
+ function wpcom_twitter_cards_tags( $og_tags ) {
12
+ global $post, $wpdb;
13
+
14
+ $og_tags['twitter:site'] = '@wordpressdotcom';
15
+
16
+ if ( ! is_singular() || ! empty( $og_tags['twitter:card'] ) )
17
+ return $og_tags;
18
+
19
+ $img_count = 0;
20
+ foreach ( $og_tags as $key => $value ) {
21
+ if ( 'og:image' != $key || ! is_array( $value ) || empty( $value[0] ) )
22
+ continue;
23
+
24
+ $img_count = 0;
25
+ foreach ( (array) $value as $counter => $image ) {
26
+ $og_tags['twitter:image' . $counter] = $image;
27
+ $img_count++;
28
+ if ( $img_count >= 4 )
29
+ break; // Only 4 images allowed
30
+ }
31
+ }
32
+
33
+ // Figure out what kind of card this is, based on the number of images found
34
+ if ( 0 == $img_count ) {
35
+ // No images = summary
36
+ $card = 'summary';
37
+ } else if ( $img_count <= 3 ) {
38
+ // < 4 images = photo
39
+ $card = 'photo';
40
+ $og_tags['twitter:image'] = $og_tags['twitter:image0']; // Rename back to photo format (from gallery)
41
+ unset( $og_tags['twitter:image0'] );
42
+ for ( $i = 1; $i < 4; $i++ ) {
43
+ unset( $og_tags['twitter:image' . $i] ); // Remove >0 image references
44
+ }
45
+ } else if ( $img_count >= 4 ) {
46
+ // >= 4 images = gallery
47
+ $card = 'gallery';
48
+ }
49
+ $og_tags['twitter:card'] = $card;
50
+
51
+ // If we have information on the author/creator, then include that as well
52
+ if ( ! empty( $post ) && ! empty( $post->post_author ) ) {
53
+ $handle = apply_filters( 'jetpack_sharing_twitter_via', '', $post->ID );
54
+ if ( !empty( $handle ) )
55
+ $og_tags['twitter:creator'] = '@' . $handle;
56
+ }
57
+
58
+ return $og_tags;
59
+ }
60
+
61
+ add_filter( 'jetpack_open_graph_tags', 'wpcom_twitter_cards_tags' );
62
+
63
+ function wpcom_twitter_cards_output( $og_tag ) {
64
+ return ( false !== strpos( $og_tag, 'twitter:' ) ) ? preg_replace( '/property="([^"]+)"/', 'name="\1"', $og_tag ) : $og_tag;
65
+ }
66
+
67
+ add_filter( 'jetpack_open_graph_output', 'wpcom_twitter_cards_output' );
jetpack.php CHANGED
@@ -5,7 +5,7 @@
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: 2.3.8
9
  * Author URI: http://jetpack.me
10
  * License: GPL2+
11
  * Text Domain: jetpack
@@ -17,7 +17,7 @@ define( 'JETPACK__API_VERSION', 1 );
17
  define( 'JETPACK__MINIMUM_WP_VERSION', '3.5' );
18
  defined( 'JETPACK_CLIENT__AUTH_LOCATION' ) or define( 'JETPACK_CLIENT__AUTH_LOCATION', 'header' );
19
  defined( 'JETPACK_CLIENT__HTTPS' ) or define( 'JETPACK_CLIENT__HTTPS', 'AUTO' );
20
- define( 'JETPACK__VERSION', '2.3.8' );
21
  define( 'JETPACK__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
22
  defined( 'JETPACK__GLOTPRESS_LOCALES_PATH' ) or define( 'JETPACK__GLOTPRESS_LOCALES_PATH', JETPACK__PLUGIN_DIR . 'locales.php' );
23
 
@@ -49,6 +49,7 @@ require_once( JETPACK__PLUGIN_DIR . 'class.photon.php' );
49
  require_once( JETPACK__PLUGIN_DIR . 'functions.photon.php' );
50
  require_once( JETPACK__PLUGIN_DIR . 'functions.compat.php' );
51
  require_once( JETPACK__PLUGIN_DIR . 'functions.gallery.php' );
 
52
 
53
  register_activation_hook( __FILE__, array( 'Jetpack', 'plugin_activation' ) );
54
  register_deactivation_hook( __FILE__, array( 'Jetpack', 'plugin_deactivation' ) );
@@ -57,10 +58,26 @@ add_action( 'init', array( 'Jetpack', 'init' ) );
57
  add_action( 'plugins_loaded', array( 'Jetpack', 'load_modules' ), 100 );
58
  add_filter( 'jetpack_static_url', array( 'Jetpack', 'staticize_subdomain' ) );
59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  /*
61
  if ( is_admin() && ! Jetpack::check_identity_crisis() ) {
62
  Jetpack_Sync::sync_options( __FILE__, 'db_version', 'jetpack_active_modules', 'active_plugins' );
63
  }
64
  */
65
-
66
- Jetpack_Sync::sync_options( __FILE__, 'widget_twitter' );
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: 2.4.5