Jetpack by WordPress.com - Version 3.5.4

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 3.5.4
Comparing to
See all releases

Code changes from version 3.4.4 to 3.5.4

Files changed (56) hide show
  1. _inc/genericons/genericons/example.html +0 -719
  2. _inc/jetpack-modules.models.js +1 -1
  3. _inc/jp.js +1 -1
  4. _inc/lib/admin-pages/class.jetpack-landing-page.php +0 -3
  5. class.jetpack-admin.php +41 -10
  6. class.jetpack-network.php +6 -0
  7. class.jetpack-post-images.php +7 -5
  8. class.jetpack-twitter-cards.php +8 -2
  9. class.jetpack.php +140 -120
  10. class.json-api-endpoints.php +210 -10
  11. class.json-api.php +9 -0
  12. css/dashboard-widget-rtl.css +29 -18
  13. css/dashboard-widget-rtl.min.css +1 -1
  14. css/dashboard-widget.css +28 -17
  15. css/dashboard-widget.css.map +1 -1
  16. css/dashboard-widget.min.css +1 -1
  17. css/dashboard-widget.min.css.map +1 -1
  18. css/jetpack-admin-rtl.css +1 -7
  19. css/jetpack-admin-rtl.min.css +1 -1
  20. css/jetpack-admin.css +0 -6
  21. css/jetpack-admin.css.map +1 -1
  22. css/jetpack-admin.min.css +1 -1
  23. css/jetpack-admin.min.css.map +1 -1
  24. css/jetpack-banners-rtl.css +26 -6
  25. css/jetpack-banners-rtl.min.css +1 -1
  26. css/jetpack-banners.css +25 -5
  27. css/jetpack-banners.css.map +1 -1
  28. css/jetpack-banners.min.css +1 -1
  29. css/jetpack-banners.min.css.map +1 -1
  30. css/jetpack-icons.css +1 -1
  31. css/jetpack-icons.min.css +1 -1
  32. css/jetpack-icons.min.css.map +1 -1
  33. css/jetpack-rtl.css +1 -1
  34. css/jetpack.css +1 -1
  35. functions.compat.php +24 -0
  36. functions.opengraph.php +4 -16
  37. functions.photon.php +27 -1
  38. jetpack.php +2 -2
  39. json-api-config.php +1 -0
  40. json-endpoints.php +611 -0
  41. json-endpoints/class.wpcom-json-api-get-site-endpoint.php +37 -6
  42. json-endpoints/class.wpcom-json-api-get-taxonomies-endpoint.php +2 -2
  43. json-endpoints/class.wpcom-json-api-list-media-v1-1-endpoint.php +10 -8
  44. json-endpoints/class.wpcom-json-api-list-posts-v1-1-endpoint.php +4 -1
  45. json-endpoints/class.wpcom-json-api-menus-v1-1-endpoint.php +697 -0
  46. json-endpoints/class.wpcom-json-api-post-v1-1-endpoint.php +6 -2
  47. json-endpoints/class.wpcom-json-api-update-comment-endpoint.php +1 -1
  48. json-endpoints/class.wpcom-json-api-update-post-endpoint.php +47 -7
  49. json-endpoints/class.wpcom-json-api-update-post-v1-1-endpoint.php +59 -8
  50. json-endpoints/class.wpcom-json-api-update-post-v1-2-endpoint.php +572 -0
  51. json-endpoints/jetpack/class.jetpack-json-api-plugins-list-endpoint.php +1 -0
  52. json-endpoints/jetpack/class.jetpack-json-api-updates-status-endpoint.php +1 -1
  53. languages/jetpack-af.mo +0 -0
  54. languages/jetpack-af.po +0 -5563
  55. languages/jetpack-ar.mo +0 -0
  56. languages/jetpack-ar.po +0 -2470
_inc/genericons/genericons/example.html DELETED
@@ -1,719 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Genericons</title>
5
- <link rel="stylesheet" href="genericons.css">
6
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
7
- <style type="text/css">
8
- /**
9
- * Example page CSS
10
- */
11
-
12
- body {
13
- font-family: sans-serif;
14
- line-height: 1.5;
15
- margin: 0;
16
- color: #2f2d2c;
17
- background: #fff;
18
- font-size: 11pt;
19
- }
20
-
21
- a {
22
- color: #2f2d2c;
23
- }
24
-
25
- h4 {
26
- margin-top: 40px;
27
- }
28
-
29
- #iconlist {
30
- clear: both;
31
- margin-bottom: 20px;
32
- }
33
-
34
- #iconlist div {
35
- padding: 10px;
36
- overflow: hidden;
37
- white-space: nowrap;
38
- font-size: 32px;
39
- line-height: 1;
40
- position: relative;
41
- width: 32px;
42
- height: 32px;
43
- }
44
-
45
- #iconlist div:before {
46
- margin-right: 20px;
47
- }
48
-
49
- #iconlist div:hover {
50
- cursor: pointer;
51
- color: #e4c05c;
52
- }
53
-
54
- #primary {
55
- background: #e4c05c;
56
- overflow: hidden;
57
- }
58
-
59
- #content {
60
- position: relative;
61
- color: #fff;
62
- max-width: 980px;
63
- padding: 0 10px;
64
- margin: 0 auto;
65
- }
66
-
67
- #icons {
68
- background: #fbfbfb;
69
- }
70
-
71
- #icons #iconlist {
72
- max-width: 980px;
73
- box-sizing: border-box;
74
- -moz-box-sizing:border-box;
75
- -webkit-box-sizing:border-box;
76
- padding: 20px 0;
77
- margin: 0 auto;
78
- }
79
-
80
- #glyph {
81
- float: left;
82
- width: 50%;
83
- box-sizing: border-box;
84
- -moz-box-sizing:border-box;
85
- -webkit-box-sizing:border-box;
86
- -ms-box-sizing:border-box;
87
- padding: 20px 0;
88
- }
89
-
90
- #glyph .info {
91
- float: right;
92
- width: 180px;
93
- padding: 36px 0 0 0;
94
- }
95
-
96
- #glyph .info a {
97
- color: #2f2d2c;
98
- display: block;
99
- padding: 8px 0 8px 15px;
100
- }
101
-
102
- #glyph .info strong {
103
- font-weight: normal;
104
- display: block;
105
- padding: 8px 0;
106
- }
107
-
108
- #glyph .genericon {
109
- font-size: 256px;
110
- width: 256px;
111
- height: 256px;
112
- overflow: visible;
113
- float: left;
114
- }
115
-
116
- .description {
117
- margin-top: 50px;
118
- width: 48%;
119
- float: right;
120
- padding-left: 40px;
121
- margin-left: 2%;
122
- box-sizing: border-box;
123
- -moz-box-sizing:border-box;
124
- -webkit-box-sizing:border-box;
125
- -ms-box-sizing:border-box;
126
- background-size: 4px 4px;
127
- }
128
-
129
- #primary h2 {
130
- color: white;
131
- margin: 0 auto;
132
- padding: 22px 0 0 20px;
133
- max-width: 980px;
134
- font-size: 2em;
135
- }
136
-
137
- #primary h2 span {
138
- display: block;
139
- font-weight: normal;
140
- font-size: 12pt;
141
- }
142
-
143
- #footer {
144
- clear: both;
145
- max-width: 980px;
146
- margin: 80px auto;
147
- text-align: center;
148
- text-transform: uppercase;
149
- letter-spacing: .1em;
150
- font-size: 7pt;
151
- color: #ddd;
152
- }
153
-
154
- #footer a {
155
- color: #ccc;
156
- display: inline-block;
157
- width: 150px;
158
- overflow: hidden;
159
- text-indent: 100%;
160
- position: relative;
161
- top: 2px;
162
- opacity: .3;
163
- background-repeat: no-repeat;
164
- background-position: center top;
165
- background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4wLjQsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iMTUwcHgiIGhlaWdodD0iMTRweCIgdmlld0JveD0iMTAgMCAxNTAgMTQiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMTAgMCAxNTAgMTQiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZmlsbD0iIzQ0NDQ0NCIgZD0iTTY1LjQzOCwxMi41Yy0zLjYyNiwwLTUuOTc2LTIuNjEyLTUuOTc2LTUuMzMxVjYuODMxYzAtMi43NjUsMi4zNTEtNS4zMyw1Ljk3Ni01LjMzDQoJCWMzLjY0MSwwLDUuOTksMi41NjUsNS45OSw1LjMzdjAuMzM5QzcxLjQyOCw5Ljg4OCw2OS4wNzksMTIuNSw2NS40MzgsMTIuNXogTTY5LjQ5Miw2Ljg2MWMwLTEuOTgtMS40NDQtMy43NDgtNC4wNTUtMy43NDgNCgkJcy00LjA0LDEuNzY4LTQuMDQsMy43NDh2MC4yNDZjMCwxLjk4MSwxLjQyOSwzLjc3OSw0LjA0LDMuNzc5czQuMDU1LTEuNzk4LDQuMDU1LTMuNzc5VjYuODYxeiIvPg0KCTxwYXRoIGZpbGw9IiM0NDQ0NDQiIGQ9Ik0yNC40OTgsMTIuMWwtMS4zNTItMi41MzVoLTYuMDA3TDE1LjgzNCwxMi4xaC0yLjAyOGw1LjUzMS0xMC4yM2gxLjU5N2w1LjYyMiwxMC4yM0gyNC40OThMMjQuNDk4LDEyLjF6DQoJCSBNMjAuMDksMy44NjZsLTIuMjI4LDQuMzAxaDQuNTMxTDIwLjA5LDMuODY2eiIvPg0KCTxwYXRoIGZpbGw9IiM0NDQ0NDQiIGQ9Ik0zNS4yODEsMTIuNWMtMy42NzEsMC01LjM3Ni0xLjk5Ni01LjM3Ni00LjY1NFYxLjg3aDEuOTA0djYuMDA2YzAsMS44OTEsMS4yNDUsMy4wMTMsMy42MSwzLjAxMw0KCQljMi40MjgsMCwzLjQyNi0xLjEyMiwzLjQyNi0zLjAxM1YxLjg3aDEuOTJ2NS45NzZDNDAuNzY3LDEwLjM4LDM5LjEzOCwxMi41LDM1LjI4MSwxMi41eiIvPg0KCTxwYXRoIGZpbGw9IiM0NDQ0NDQiIGQ9Ik01MS40NTgsMy40NjdWMTIuMWgtMS45MTlWMy40NjdoLTQuNDcxVjEuODdoMTAuODZ2MS41OThMNTEuNDU4LDMuNDY3TDUxLjQ1OCwzLjQ2N3oiLz4NCgk8cGF0aCBmaWxsPSIjNDQ0NDQ0IiBkPSJNODguNTQzLDEyLjFWNC4wMDRsLTAuNTA5LDAuODkxTDgzLjc0OSwxMi4xaC0wLjkzN2wtNC4yNC03LjIwNWwtMC41MDYtMC44OTFWMTIuMWgtMS44NzVWMS44N2gyLjY1OA0KCQlsNC4wNCw3LjAyMWwwLjQ3NiwwLjg2bDAuNDc3LTAuODZsMy45OTQtNy4wMjFoMi42MjdWMTIuMUg4OC41NDNMODguNTQzLDEyLjF6Ii8+DQoJPHBhdGggZmlsbD0iIzQ0NDQ0NCIgZD0iTTEwNC45NzgsMTIuMWwtMS4zNTItMi41MzVoLTYuMDA4TDk2LjMxMywxMi4xaC0yLjAyOGw1LjUzMS0xMC4yMzFoMS41OTlsNS42MjIsMTAuMjMxSDEwNC45Nzh6DQoJCSBNMTAwLjU3LDMuODY2bC0yLjIyOCw0LjMwMWg0LjUyOUwxMDAuNTcsMy44NjZ6Ii8+DQoJPHBhdGggZmlsbD0iIzQ0NDQ0NCIgZD0iTTExNC43NzgsMy40NjdWMTIuMWgtMS45MlYzLjQ2N2gtNC40N1YxLjg3aDEwLjg2djEuNTk4TDExNC43NzgsMy40NjdMMTE0Ljc3OCwzLjQ2N3oiLz4NCgk8cGF0aCBmaWxsPSIjNDQ0NDQ0IiBkPSJNMTI4Ljg2NiwzLjQ2N1YxMi4xaC0xLjkxOVYzLjQ2N2gtNC40NzJWMS44N2gxMC44NnYxLjU5OEwxMjguODY2LDMuNDY3TDEyOC44NjYsMy40Njd6Ii8+DQoJPHBhdGggZmlsbD0iIzQ0NDQ0NCIgZD0iTTEzOC4wNjcsMTIuMVYyLjgzN2MwLjc2OSwwLDEuMDc2LTAuNDE1LDEuMDc2LTAuOTY4aDAuODE0VjEyLjFIMTM4LjA2N0wxMzguMDY3LDEyLjF6Ii8+DQoJPHBhdGggZmlsbD0iIzQ0NDQ0NCIgZD0iTTE1NC45OTYsNC43NTdjLTAuOTIxLTAuODQ1LTIuMjc0LTEuNjQ0LTQuMTAyLTEuNjQ0Yy0yLjczMywwLTQuMjcsMS44NzUtNC4yNywzLjgyNXYwLjINCgkJYzAsMS45MzcsMS41NTEsMy43NDgsNC40MDgsMy43NDhjMS43MDUsMCwzLjExOC0wLjgxNCw0LjAwOS0xLjY0NGwxLjE1MiwxLjIxNWMtMS4xMjEsMS4xMDctMy4wMjYsMi4wNDMtNS4yODUsMi4wNDMNCgkJYy0zLjg3LDAtNi4yMjMtMi41MjEtNi4yMjMtNS4yODRWNi44NzdjMC0yLjc2NiwyLjU2Ni01LjM3Nyw2LjMxNC01LjM3N2MyLjE2NywwLDQuMTM2LDAuOTA2LDUuMTk0LDIuMDQzTDE1NC45OTYsNC43NTd6Ii8+DQoJPHBhdGggZmlsbD0iIzQ0NDQ0NCIgZD0iTTY2LjcwMiw1LjA2YzAuMzQ3LDAuMjI0LDAuNDQ0LDAuNjg3LDAuMjE5LDEuMDM3TDY1LjE2OSw4LjgxYy0wLjIyNSwwLjM0Ny0wLjY4OCwwLjQ0OC0xLjAzMywwLjIyOWwwLDANCgkJQzYzLjc5LDguODEyLDYzLjY5Miw4LjM1MSw2My45MTcsOGwxLjc1MS0yLjcxM0M2NS44OTMsNC45MzgsNjYuMzU1LDQuODM3LDY2LjcwMiw1LjA2TDY2LjcwMiw1LjA2eiIvPg0KPC9nPg0KPC9zdmc+DQo=');
166
- }
167
-
168
- #footer a:hover {
169
- opacity: 1;
170
- }
171
-
172
- pre, code {
173
- font: 14px/1.5 monospace;
174
- }
175
-
176
- .code {
177
- display: block;
178
- font: 14px/1.5 monospace;
179
- width: 600px;
180
- white-space: pre;
181
- border: 1px solid #ccc;
182
- padding: 10px;
183
- overflow: auto;
184
- min-height: 110px;
185
- }
186
-
187
- #iconlist .new, #iconlist .update {
188
- position: relative;
189
- }
190
-
191
- #iconlist .new:after, #iconlist .update:after {
192
- color: #e4c05c;
193
- display: block;
194
- content: "NEW";
195
- font: bold 8px/1 sans-serif;
196
- position: absolute;
197
- top: 0px;
198
- text-align: center;
199
- z-index: 10;
200
- width: 100%;
201
- }
202
-
203
- #iconlist .update:after {
204
- content: "UPDATE";
205
- left: -1px;
206
- }
207
-
208
- body.searching #iconlist span.update:after, body.searching #iconlist span.new:after {
209
- display: none;
210
- }
211
-
212
- #search {
213
- border: 0;
214
- border-radius: 2px;
215
- position: absolute;
216
- right: 20px;
217
- font: 11pt sans-serif;
218
- padding: 10px;
219
- top: 20px;
220
- background: rgba(255,255,255,.8);
221
- }
222
-
223
- #search:focus {
224
- background: #fff;
225
- outline: none;
226
- }
227
-
228
- .genericon-404 {
229
- display: none !important; /* This is an easter egg */
230
- }
231
-
232
- .genericon:after {
233
- content: attr(alt);
234
- display: block;
235
- font-size: 9px;
236
- color: #999;
237
- text-align: center;
238
- }
239
-
240
- .hideUACs.genericon:after {
241
- content: none;
242
- }
243
-
244
-
245
- @media only screen and ( max-width: 900px ) {
246
-
247
- #glyph {
248
- float: none;
249
- width: 100%;
250
- }
251
-
252
- #glyph .info {
253
- width: 30%;
254
- }
255
- #glyph .genericon {
256
- width: 70%;
257
- }
258
-
259
- .description {
260
- clear: both;
261
- width: 100%;
262
- background: none;
263
- padding-left: 0;
264
- float: none;
265
- }
266
-
267
- }
268
- </style>
269
- <script type="text/javascript">
270
- /**
271
- * Example page JS
272
- */
273
-
274
- function copyToClipboard ( text, copyMode ) {
275
- if ( copyMode == "css" ) {
276
- window.prompt( "Copy this, then paste in your CSS :before selector.", text );
277
- } else if ( copyMode == "html" ) {
278
- window.prompt( "Copy this, then paste in your HTML.", text );
279
- } else {
280
- window.prompt( "Copy this, then paste in your Photoshop textfield.", text );
281
- }
282
- }
283
-
284
- function pickRandomIcon() {
285
- var divs = jQuery("#iconlist div").get().sort(function(){
286
- return Math.round(Math.random())-0.5;
287
- }).slice(0,1);
288
-
289
- attr = jQuery(divs).attr('alt');
290
- cssclass = jQuery(divs).attr('class');
291
- displayGlyph( attr, cssclass );
292
-
293
- }
294
-
295
- function displayGlyph( attr, cssclass ) {
296
-
297
- // set permalink
298
- var permalink = cssclass.split(' genericon-')[1];
299
- window.location.hash = permalink;
300
-
301
- // css copy string
302
- csstext = "content: \'\\" + attr + "';";
303
-
304
- // html copy string
305
- htmltext = '<span class="' + cssclass + '"></span>';
306
-
307
- // glyph copy string
308
- glyphtemp = "&#x" + attr + ";";
309
- jQuery('#temp').html( glyphtemp );
310
- glyphtext = jQuery('#temp').text();
311
-
312
- // final output
313
- output = '<div class="' + cssclass + '"></div>'
314
- + '<div class="info">'
315
- + '<strong>&larr; ' + cssclass.split( ' ' )[1] + '</strong>'
316
- + '<a href="javascript:copyToClipboard(csstext, \'css\')">Copy CSS</a>'
317
- + '<a href="javascript:copyToClipboard(htmltext, \'html\')">Copy HTML</a>'
318
- + '<a href="javascript:copyToClipboard(glyphtext)">Copy Glyph</a>'
319
- + '</div>';
320
-
321
- jQuery( '#glyph' ).html( output );
322
-
323
- }
324
-
325
- function sortUnicode ( a, b ) {
326
- var numberA = jQuery(a).attr('alt').replace('f', '');
327
- var numberB = jQuery(b).attr('alt').replace('f', '');
328
- var contentA =parseInt( numberA, 16 );
329
- var contentB =parseInt( numberB, 16 );
330
- return (contentA < contentB) ? -1 : (contentA > contentB) ? 1 : 0;
331
- }
332
-
333
- jQuery(document).ready(function() {
334
-
335
- // pick random icon if no permalink, otherwise go to permalink
336
- if ( window.location.hash ) {
337
- permalink = "genericon-" + window.location.hash.split('#')[1];
338
- attr = jQuery( '.' + permalink ).attr( 'alt' );
339
- cssclass = jQuery( '.' + permalink ).attr('class');
340
- displayGlyph( attr, cssclass );
341
- } else {
342
- pickRandomIcon();
343
- }
344
-
345
- jQuery( '#iconlist div' ).click(function() {
346
-
347
- attr = jQuery( this ).attr( 'alt' );
348
- cssclass = jQuery( this ).attr( 'class' );
349
-
350
- displayGlyph( attr, cssclass );
351
-
352
- });
353
-
354
- var $rows = jQuery('#iconlist div');
355
- jQuery('#search').keyup(function() {
356
-
357
- // remove update text when using search
358
- jQuery('body').addClass('searching');
359
-
360
- var val = jQuery.trim(jQuery(this).val()).replace(/ +/g, ' ').toLowerCase();
361
-
362
- $rows.show().filter(function() {
363
- var text = jQuery(this).text().replace(/\s+/g, ' ').toLowerCase();
364
- return !~text.indexOf(val);
365
- }).hide();
366
- });
367
-
368
- jQuery('input#search').focus();
369
-
370
- // sort based on number
371
- jQuery('#iconlist div').sort( sortUnicode ).appendTo('#iconlist');
372
-
373
- });
374
-
375
- function toggleUACs() {
376
- jQuery('.genericon').toggleClass('hideUACs');
377
- }
378
- </script>
379
- </head>
380
-
381
- <body>
382
-
383
- <div id="main">
384
-
385
- <div id="primary">
386
- <div id="content">
387
-
388
- <h2>Genericons <span>&mdash; A free, GPL, flexible icon font for blogs!</span></h2>
389
-
390
- <input placeholder="Filter..." name="search" id="search" type="text" value="" maxlength="150" />
391
-
392
- <div id="glyph">
393
- </div>
394
-
395
- <div class="description">
396
- <p>Genericons are vector icons embedded in a webfont designed to be clean and simple keeping with a generic aesthetic. Use for instant HiDPI or to easily change colors on the fly.</p>
397
- </div>
398
-
399
- </div>
400
- </div>
401
-
402
- <div id="icons">
403
- <div id="iconlist">
404
-
405
- <!-- note, the text inside the HTML elements is purely for the seach -->
406
-
407
- <div alt="f423" class="genericon genericon-404" title="genericon-404">404</div>
408
-
409
- <div alt="f508" class="genericon genericon-activity" title="genericon-activity">activity</div>
410
-
411
- <div alt="f509" class="genericon genericon-anchor" title="genericon-anchor">anchor</div>
412
-
413
- <div alt="f101" class="genericon genericon-aside" title="genericon-aside">aside</div>
414
-
415
- <div alt="f416" class="genericon genericon-attachment" title="genericon-attachment">attachment</div>
416
-
417
- <div alt="f109" class="genericon genericon-audio" title="genericon-audio">audio</div>
418
-
419
- <div alt="f471" class="genericon genericon-bold" title="genericon-bold">bold</div>
420
-
421
- <div alt="f444" class="genericon genericon-book" title="genericon-book">book</div>
422
-
423
- <div alt="f50a" class="genericon genericon-bug" title="genericon-bug">bug</div>
424
-
425
- <div alt="f447" class="genericon genericon-cart" title="genericon-cart">cart</div>
426
-
427
- <div alt="f301" class="genericon genericon-category" title="genericon-category">category</div>
428
-
429
- <div alt="f108" class="genericon genericon-chat" title="genericon-chat">chat</div>
430
-
431
- <div alt="f418" class="genericon genericon-checkmark" title="genericon-checkmark">checkmark</div>
432
-
433
- <div alt="f405" class="genericon genericon-close" title="genericon-close">close</div>
434
-
435
- <div alt="f406" class="genericon genericon-close-alt" title="genericon-close-alt">close-alt</div>
436
-
437
- <div alt="f426" class="genericon genericon-cloud" title="genericon-cloud">cloud</div>
438
-
439
- <div alt="f440" class="genericon genericon-cloud-download" title="genericon-cloud-download">cloud-download</div>
440
-
441
- <div alt="f441" class="genericon genericon-cloud-upload" title="genericon-cloud-upload">cloud-upload</div>
442
-
443
- <div alt="f462" class="genericon genericon-code" title="genericon-code">code</div>
444
-
445
- <div alt="f216" class="genericon genericon-codepen" title="genericon-codepen">codepen</div>
446
-
447
- <div alt="f445" class="genericon genericon-cog" title="genericon-cog">cog</div>
448
-
449
- <div alt="f432" class="genericon genericon-collapse" title="genericon-collapse">collapse</div>
450
-
451
- <div alt="f300" class="genericon genericon-comment" title="genericon-comment">comment</div>
452
-
453
- <div alt="f305" class="genericon genericon-day" title="genericon-day">day</div>
454
-
455
- <div alt="f221" class="genericon genericon-digg" title="genericon-digg">digg</div>
456
-
457
- <div alt="f443" class="genericon genericon-document" title="genericon-document">document</div>
458
-
459
- <div alt="f428" class="genericon genericon-dot" title="genericon-dot">dot</div>
460
-
461
- <div alt="f502" class="genericon genericon-downarrow" title="genericon-downarrow">downarrow</div>
462
-
463
- <div alt="f50b" class="genericon genericon-download" title="genericon-download">download</div>
464
-
465
- <div alt="f436" class="genericon genericon-draggable" title="genericon-draggable">draggable</div>
466
-
467
- <div alt="f201" class="genericon genericon-dribbble" title="genericon-dribbble">dribbble</div>
468
-
469
- <div alt="f225" class="genericon genericon-dropbox" title="genericon-dropbox">dropbox</div>
470
-
471
- <div alt="f433" class="genericon genericon-dropdown" title="genericon-dropdown">dropdown</div>
472
-
473
- <div alt="f434" class="genericon genericon-dropdown-left" title="genericon-dropdown-left">dropdown-left</div>
474
-
475
- <div alt="f411" class="genericon genericon-edit" title="genericon-edit">edit</div>
476
-
477
- <div alt="f476" class="genericon genericon-ellipsis" title="genericon-ellipsis">ellipsis</div>
478
-
479
- <div alt="f431" class="genericon genericon-expand" title="genericon-expand">expand</div>
480
-
481
- <div alt="f442" class="genericon genericon-external" title="genericon-external">external</div>
482
-
483
- <div alt="f203" class="genericon genericon-facebook" title="genericon-facebook">facebook</div>
484
-
485
- <div alt="f204" class="genericon genericon-facebook-alt" title="genericon-facebook-alt">facebook-alt</div>
486
-
487
- <div alt="f458" class="genericon genericon-fastforward" title="genericon-fastforward">fastforward</div>
488
-
489
- <div alt="f413" class="genericon genericon-feed" title="genericon-feed">feed</div>
490
-
491
- <div alt="f468" class="genericon genericon-flag" title="genericon-flag">flag</div>
492
-
493
- <div alt="f211" class="genericon genericon-flickr" title="genericon-flickr">flickr</div>
494
-
495
- <div alt="f226" class="genericon genericon-foursquare" title="genericon-foursquare">foursquare</div>
496
-
497
- <div alt="f474" class="genericon genericon-fullscreen" title="genericon-fullscreen">fullscreen</div>
498
-
499
- <div alt="f103" class="genericon genericon-gallery" title="genericon-gallery">gallery</div>
500
-
501
- <div alt="f200" class="genericon genericon-github" title="genericon-github">github</div>
502
-
503
- <div alt="f206" class="genericon genericon-googleplus" title="genericon-googleplus">googleplus</div>
504
-
505
- <div alt="f218" class="genericon genericon-googleplus-alt" title="genericon-googleplus-alt">googleplus-alt</div>
506
-
507
- <div alt="f50c" class="genericon genericon-handset" title="genericon-handset">handset</div>
508
-
509
- <div alt="f461" class="genericon genericon-heart" title="genericon-heart">heart</div>
510
-
511
- <div alt="f457" class="genericon genericon-help" title="genericon-help">help</div>
512
-
513
- <div alt="f404" class="genericon genericon-hide" title="genericon-hide">hide</div>
514
-
515
- <div alt="f505" class="genericon genericon-hierarchy" title="genericon-hierarchy">hierarchy</div>
516
-
517
- <div alt="f409" class="genericon genericon-home" title="genericon-home">home</div>
518
-
519
- <div alt="f102" class="genericon genericon-image" title="genericon-image">image</div>
520
-
521
- <div alt="f455" class="genericon genericon-info" title="genericon-info">info</div>
522
-
523
- <div alt="f215" class="genericon genericon-instagram" title="genericon-instagram">instagram</div>
524
-
525
- <div alt="f472" class="genericon genericon-italic" title="genericon-italic">italic</div>
526
-
527
- <div alt="f427" class="genericon genericon-key" title="genericon-key">key</div>
528
-
529
- <div alt="f503" class="genericon genericon-leftarrow" title="genericon-leftarrow">leftarrow</div>
530
-
531
- <div alt="f107" class="genericon genericon-link" title="genericon-link">link</div>
532
-
533
- <div alt="f207" class="genericon genericon-linkedin" title="genericon-linkedin">linkedin</div>
534
-
535
- <div alt="f208" class="genericon genericon-linkedin-alt" title="genericon-linkedin-alt">linkedin-alt</div>
536
-
537
- <div alt="f417" class="genericon genericon-location" title="genericon-location">location</div>
538
-
539
- <div alt="f470" class="genericon genericon-lock" title="genericon-lock">lock</div>
540
-
541
- <div alt="f410" class="genericon genericon-mail" title="genericon-mail">mail</div>
542
-
543
- <div alt="f422" class="genericon genericon-maximize" title="genericon-maximize">maximize</div>
544
-
545
- <div alt="f419" class="genericon genericon-menu" title="genericon-menu">menu</div>
546
-
547
- <div alt="f50d" class="genericon genericon-microphone" title="genericon-microphone">microphone</div>
548
-
549
- <div alt="f421" class="genericon genericon-minimize" title="genericon-minimize">minimize</div>
550
-
551
- <div alt="f50e" class="genericon genericon-minus" title="genericon-minus">minus</div>
552
-
553
- <div alt="f307" class="genericon genericon-month" title="genericon-month">month</div>
554
-
555
- <div alt="f50f" class="genericon genericon-move" title="genericon-move">move</div>
556
-
557
- <div alt="f429" class="genericon genericon-next" title="genericon-next">next</div>
558
-
559
- <div alt="f456" class="genericon genericon-notice" title="genericon-notice">notice</div>
560
-
561
- <div alt="f506" class="genericon genericon-paintbrush" title="genericon-paintbrush">paintbrush</div>
562
-
563
- <div alt="f219" class="genericon genericon-path" title="genericon-path">path</div>
564
-
565
- <div alt="f448" class="genericon genericon-pause" title="genericon-pause">pause</div>
566
-
567
- <div alt="f437" class="genericon genericon-phone" title="genericon-phone">phone</div>
568
-
569
- <div alt="f473" class="genericon genericon-picture" title="genericon-picture">picture</div>
570
-
571
- <div alt="f308" class="genericon genericon-pinned" title="genericon-pinned">pinned</div>
572
-
573
- <div alt="f209" class="genericon genericon-pinterest" title="genericon-pinterest">pinterest</div>
574
-
575
- <div alt="f210" class="genericon genericon-pinterest-alt" title="genericon-pinterest-alt">pinterest-alt</div>
576
-
577
- <div alt="f452" class="genericon genericon-play" title="genericon-play">play</div>
578
-
579
- <div alt="f439" class="genericon genericon-plugin" title="genericon-plugin">plugin</div>
580
-
581
- <div alt="f510" class="genericon genericon-plus" title="genericon-plus">plus</div>
582
-
583
- <div alt="f224" class="genericon genericon-pocket" title="genericon-pocket">pocket</div>
584
-
585
- <div alt="f217" class="genericon genericon-polldaddy" title="genericon-polldaddy">polldaddy</div>
586
-
587
- <div alt="f460" class="genericon genericon-portfolio" title="genericon-portfolio">portfolio</div>
588
-
589
- <div alt="f430" class="genericon genericon-previous" title="genericon-previous">previous</div>
590
-
591
- <div alt="f469" class="genericon genericon-print" title="genericon-print">print</div>
592
-
593
- <div alt="f106" class="genericon genericon-quote" title="genericon-quote">quote</div>
594
-
595
- <div alt="f511" class="genericon genericon-rating-empty" title="genericon-rating-empty">rating-empty</div>
596
-
597
- <div alt="f512" class="genericon genericon-rating-full" title="genericon-rating-full">rating-full</div>
598
-
599
- <div alt="f513" class="genericon genericon-rating-half" title="genericon-rating-half">rating-half</div>
600
-
601
- <div alt="f222" class="genericon genericon-reddit" title="genericon-reddit">reddit</div>
602
-
603
- <div alt="f420" class="genericon genericon-refresh" title="genericon-refresh">refresh</div>
604
-
605
- <div alt="f412" class="genericon genericon-reply" title="genericon-reply">reply</div>
606
-
607
- <div alt="f466" class="genericon genericon-reply-alt" title="genericon-reply-alt">reply-alt</div>
608
-
609
- <div alt="f467" class="genericon genericon-reply-single" title="genericon-reply-single">reply-single</div>
610
-
611
- <div alt="f459" class="genericon genericon-rewind" title="genericon-rewind">rewind</div>
612
-
613
- <div alt="f501" class="genericon genericon-rightarrow" title="genericon-rightarrow">rightarrow</div>
614
-
615
- <div alt="f400" class="genericon genericon-search" title="genericon-search">search</div>
616
-
617
- <div alt="f438" class="genericon genericon-send-to-phone" title="genericon-send-to-phone">send-to-phone</div>
618
-
619
- <div alt="f454" class="genericon genericon-send-to-tablet" title="genericon-send-to-tablet">send-to-tablet</div>
620
-
621
- <div alt="f415" class="genericon genericon-share" title="genericon-share">share</div>
622
-
623
- <div alt="f403" class="genericon genericon-show" title="genericon-show">show</div>
624
-
625
- <div alt="f514" class="genericon genericon-shuffle" title="genericon-shuffle">shuffle</div>
626
-
627
- <div alt="f507" class="genericon genericon-sitemap" title="genericon-sitemap">sitemap</div>
628
-
629
- <div alt="f451" class="genericon genericon-skip-ahead" title="genericon-skip-ahead">skip-ahead</div>
630
-
631
- <div alt="f450" class="genericon genericon-skip-back" title="genericon-skip-back">skip-back</div>
632
-
633
- <div alt="f220" class="genericon genericon-skype" title="genericon-skype">skype</div>
634
-
635
- <div alt="f424" class="genericon genericon-spam" title="genericon-spam">spam</div>
636
-
637
- <div alt="f515" class="genericon genericon-spotify" title="genericon-spotify">spotify</div>
638
-
639
- <div alt="f100" class="genericon genericon-standard" title="genericon-standard">standard</div>
640
-
641
- <div alt="f408" class="genericon genericon-star" title="genericon-star">star</div>
642
-
643
- <div alt="f105" class="genericon genericon-status" title="genericon-status">status</div>
644
-
645
- <div alt="f449" class="genericon genericon-stop" title="genericon-stop">stop</div>
646
-
647
- <div alt="f223" class="genericon genericon-stumbleupon" title="genericon-stumbleupon">stumbleupon</div>
648
-
649
- <div alt="f463" class="genericon genericon-subscribe" title="genericon-subscribe">subscribe</div>
650
-
651
- <div alt="f465" class="genericon genericon-subscribed" title="genericon-subscribed">subscribed</div>
652
-
653
- <div alt="f425" class="genericon genericon-summary" title="genericon-summary">summary</div>
654
-
655
- <div alt="f453" class="genericon genericon-tablet" title="genericon-tablet">tablet</div>
656
-
657
- <div alt="f302" class="genericon genericon-tag" title="genericon-tag">tag</div>
658
-
659
- <div alt="f303" class="genericon genericon-time" title="genericon-time">time</div>
660
-
661
- <div alt="f435" class="genericon genericon-top" title="genericon-top">top</div>
662
-
663
- <div alt="f407" class="genericon genericon-trash" title="genericon-trash">trash</div>
664
-
665
- <div alt="f214" class="genericon genericon-tumblr" title="genericon-tumblr">tumblr</div>
666
-
667
- <div alt="f516" class="genericon genericon-twitch" title="genericon-twitch">twitch</div>
668
-
669
- <div alt="f202" class="genericon genericon-twitter" title="genericon-twitter">twitter</div>
670
-
671
- <div alt="f446" class="genericon genericon-unapprove" title="genericon-unapprove">unapprove</div>
672
-
673
- <div alt="f464" class="genericon genericon-unsubscribe" title="genericon-unsubscribe">unsubscribe</div>
674
-
675
- <div alt="f401" class="genericon genericon-unzoom" title="genericon-unzoom">unzoom</div>
676
-
677
- <div alt="f500" class="genericon genericon-uparrow" title="genericon-uparrow">uparrow</div>
678
-
679
- <div alt="f304" class="genericon genericon-user" title="genericon-user">user</div>
680
-
681
- <div alt="f104" class="genericon genericon-video" title="genericon-video">video</div>
682
-
683
- <div alt="f517" class="genericon genericon-videocamera" title="genericon-videocamera">videocamera</div>
684
-
685
- <div alt="f212" class="genericon genericon-vimeo" title="genericon-vimeo">vimeo</div>
686
-
687
- <div alt="f414" class="genericon genericon-warning" title="genericon-warning">warning</div>
688
-
689
- <div alt="f475" class="genericon genericon-website" title="genericon-website">website</div>
690
-
691
- <div alt="f306" class="genericon genericon-week" title="genericon-week">week</div>
692
-
693
- <div alt="f205" class="genericon genericon-wordpress" title="genericon-wordpress">wordpress</div>
694
-
695
- <div alt="f504" class="genericon genericon-xpost" title="genericon-xpost">xpost</div>
696
-
697
- <div alt="f213" class="genericon genericon-youtube" title="genericon-youtube">youtube</div>
698
-
699
- <div alt="f402" class="genericon genericon-zoom" title="genericon-zoom">zoom</div>
700
-
701
-
702
- </div>
703
-
704
- <div id="temp" style="display: none;"></div>
705
-
706
- </div>
707
-
708
- <div id="footer">
709
-
710
- <p>An <a href="http://automattic.com" rel="nofollow">Automattic</a> Portrayal</p>
711
- <p>No designers were harmed in the making of this icon font.</p>
712
-
713
-
714
- </div>
715
-
716
- </div>
717
-
718
- </body>
719
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
_inc/jetpack-modules.models.js CHANGED
@@ -36,7 +36,7 @@ window.jetpackModules.models = (function( window, $, _, Backbone ) {
36
 
37
  if ( m_search.length ) {
38
  items = _.filter( items, function( item ) {
39
- var search_text = item.name + ' ' + item.description;
40
  return ( -1 !== search_text.toLowerCase().indexOf( m_search ) );
41
  } );
42
  }
36
 
37
  if ( m_search.length ) {
38
  items = _.filter( items, function( item ) {
39
+ var search_text = item.name + ' ' + item.description + ' ' + item.long_description + ' ' + item.search_terms + ' ' + item.jumpstart_desc + ' ' + item.module_tags;
40
  return ( -1 !== search_text.toLowerCase().indexOf( m_search ) );
41
  } );
42
  }
_inc/jp.js CHANGED
@@ -65,7 +65,7 @@
65
 
66
  // Hide the successful connection message after a little bit
67
  setTimeout( function(){
68
- jQuery( '.jetpack-message' ).hide( 600 );
69
  }, 6000);
70
 
71
  // Modal events
65
 
66
  // Hide the successful connection message after a little bit
67
  setTimeout( function(){
68
+ jQuery( '.jetpack-message:not(.stay-visible)' ).hide( 600 );
69
  }, 6000);
70
 
71
  // Modal events
_inc/lib/admin-pages/class.jetpack-landing-page.php CHANGED
@@ -6,9 +6,6 @@ class Jetpack_Landing_Page extends Jetpack_Admin_Page {
6
  protected $dont_show_if_not_active = false;
7
 
8
  function get_page_hook() {
9
- // @todo: Remove in Jetpack class itself.
10
- remove_action( 'admin_menu', array( $this->jetpack, 'admin_menu' ), 999 );
11
-
12
  $title = _x( 'Jetpack', 'The menu item label', 'jetpack' );
13
 
14
  list( $jetpack_version ) = explode( ':', Jetpack_Options::get_option( 'version' ) );
6
  protected $dont_show_if_not_active = false;
7
 
8
  function get_page_hook() {
 
 
 
9
  $title = _x( 'Jetpack', 'The menu item label', 'jetpack' );
10
 
11
  list( $jetpack_version ) = explode( ':', Jetpack_Options::get_option( 'version' ) );
class.jetpack-admin.php CHANGED
@@ -25,19 +25,18 @@ class Jetpack_Admin {
25
  $this->jetpack = Jetpack::init();
26
 
27
  jetpack_require_lib( 'admin-pages/class.jetpack-landing-page' );
28
- jetpack_require_lib( 'admin-pages/class.jetpack-settings-page' );
29
-
30
- // Initialize objects building landing and settings pages
31
  $this->landing_page = new Jetpack_Landing_Page;
 
 
32
  $this->settings_page = new Jetpack_Settings_Page;
33
 
34
  // Add hooks for admin menus
35
  add_action( 'admin_menu', array( $this->landing_page, 'add_actions' ), 998 );
36
  add_action( 'jetpack_admin_menu', array( $this, 'admin_menu_debugger' ) );
37
- add_action( 'jetpack_admin_menu', array( $this->settings_page, 'add_actions' ) );
38
 
39
  // Add redirect to current page for activation/deactivation of modules
40
- add_action( 'jetpack_pre_activate_module', array( $this, 'fix_redirect' ) );
41
  add_action( 'jetpack_pre_deactivate_module', array( $this, 'fix_redirect' ) );
42
 
43
  // Add module bulk actions handler
@@ -45,12 +44,13 @@ class Jetpack_Admin {
45
  }
46
 
47
  static function sort_requires_connection_last( $module1, $module2 ) {
48
- if ( $module1['requires_connection'] == $module2['requires_connection'] )
49
  return 0;
50
- if ( $module1['requires_connection'] )
51
  return 1;
52
- if ( $module2['requires_connection'] )
53
  return -1;
 
54
 
55
  return 0;
56
  }
@@ -93,7 +93,35 @@ class Jetpack_Admin {
93
  } else {
94
  do_action( 'jetpack_module_more_info_' . $module );
95
  }
96
- $module_array['long_description'] = ob_get_clean();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
 
98
  $module_array['configurable'] = false;
99
  if ( current_user_can( 'manage_options' ) && apply_filters( 'jetpack_module_configurable_' . $module, false ) ) {
@@ -169,7 +197,10 @@ class Jetpack_Admin {
169
  }
170
  }
171
 
172
- function fix_redirect() {
 
 
 
173
  if ( wp_get_referer() ) {
174
  add_filter( 'wp_redirect', 'wp_get_referer' );
175
  }
25
  $this->jetpack = Jetpack::init();
26
 
27
  jetpack_require_lib( 'admin-pages/class.jetpack-landing-page' );
 
 
 
28
  $this->landing_page = new Jetpack_Landing_Page;
29
+
30
+ jetpack_require_lib( 'admin-pages/class.jetpack-settings-page' );
31
  $this->settings_page = new Jetpack_Settings_Page;
32
 
33
  // Add hooks for admin menus
34
  add_action( 'admin_menu', array( $this->landing_page, 'add_actions' ), 998 );
35
  add_action( 'jetpack_admin_menu', array( $this, 'admin_menu_debugger' ) );
36
+ add_action( 'jetpack_admin_menu', array( $this->settings_page, 'add_actions' ) );
37
 
38
  // Add redirect to current page for activation/deactivation of modules
39
+ add_action( 'jetpack_pre_activate_module', array( $this, 'fix_redirect' ), 10, 2 );
40
  add_action( 'jetpack_pre_deactivate_module', array( $this, 'fix_redirect' ) );
41
 
42
  // Add module bulk actions handler
44
  }
45
 
46
  static function sort_requires_connection_last( $module1, $module2 ) {
47
+ if ( $module1['requires_connection'] == $module2['requires_connection'] ) {
48
  return 0;
49
+ } elseif ( $module1['requires_connection'] ) {
50
  return 1;
51
+ } elseif ( $module2['requires_connection'] ) {
52
  return -1;
53
+ }
54
 
55
  return 0;
56
  }
93
  } else {
94
  do_action( 'jetpack_module_more_info_' . $module );
95
  }
96
+
97
+ /**
98
+ * Filter the long description of a module.
99
+ *
100
+ * @since 3.5.0
101
+ *
102
+ * @param string ob_get_clean() The module long description.
103
+ * @param string $module The module name.
104
+ */
105
+ $module_array['long_description'] = apply_filters( 'jetpack_long_module_description', ob_get_clean(), $module );
106
+
107
+ ob_start();
108
+ /**
109
+ * Filter the search terms for a module
110
+ *
111
+ * Search terms are be typically added to a module in module-info.php.
112
+ *
113
+ * Use syntax:
114
+ * function jetpack_$module_search_terms( $terms ) {
115
+ * $terms = _x( 'term 1, term 2', 'search terms', 'jetpack' );
116
+ * return $terms;
117
+ * }
118
+ * add_filter( 'jetpack_search_terms_$module', 'jetpack_$module_search_terms' );
119
+ *
120
+ * @since 3.5.0
121
+ * @param string The search terms (comma separated)
122
+ */
123
+ echo apply_filters( 'jetpack_search_terms_' . $module, '' );
124
+ $module_array['search_terms'] = ob_get_clean();
125
 
126
  $module_array['configurable'] = false;
127
  if ( current_user_can( 'manage_options' ) && apply_filters( 'jetpack_module_configurable_' . $module, false ) ) {
197
  }
198
  }
199
 
200
+ function fix_redirect( $module, $redirect = true ) {
201
+ if ( ! $redirect ) {
202
+ return;
203
+ }
204
  if ( wp_get_referer() ) {
205
  add_filter( 'wp_redirect', 'wp_get_referer' );
206
  }
class.jetpack-network.php CHANGED
@@ -517,6 +517,12 @@ class Jetpack_Network {
517
  $main_active = $jp->is_active();
518
  restore_current_blog();
519
 
 
 
 
 
 
 
520
  /*
521
  * Ensure the main blog is connected as all other subsite blog
522
  * connections will feed off this one
517
  $main_active = $jp->is_active();
518
  restore_current_blog();
519
 
520
+ // If we are in dev mode, just show the notice and bail
521
+ if ( Jetpack::is_development_mode() ) {
522
+ Jetpack::show_development_mode_notice();
523
+ return;
524
+ }
525
+
526
  /*
527
  * Ensure the main blog is connected as all other subsite blog
528
  * connections will feed off this one
class.jetpack-post-images.php CHANGED
@@ -313,9 +313,7 @@ class Jetpack_PostImages {
313
 
314
  $permalink = get_permalink( $post_id );
315
 
316
- if ( function_exists( 'jetpack_has_site_icon' ) && jetpack_has_site_icon() ) {
317
- $url = jetpack_site_icon_url( null, $size, $default = false );
318
- } elseif ( function_exists( 'blavatar_domain' ) && function_exists( 'blavatar_exists' ) && function_exists( 'blavatar_url' ) ) {
319
  $domain = blavatar_domain( $permalink );
320
 
321
  if ( ! blavatar_exists( $domain ) ) {
@@ -323,6 +321,10 @@ class Jetpack_PostImages {
323
  }
324
 
325
  $url = blavatar_url( $domain, 'img', $size );
 
 
 
 
326
  }
327
 
328
  return array( array(
@@ -345,8 +347,8 @@ class Jetpack_PostImages {
345
  $post = get_post( $post_id );
346
  $permalink = get_permalink( $post_id );
347
 
348
- if ( function_exists( 'get_avatar_url' ) ) {
349
- $url = get_avatar_url( $post->post_author, $size, $default, true );
350
  if ( $url && is_array( $url ) ) {
351
  $url = $url[0];
352
  }
313
 
314
  $permalink = get_permalink( $post_id );
315
 
316
+ if ( function_exists( 'blavatar_domain' ) && function_exists( 'blavatar_exists' ) && function_exists( 'blavatar_url' ) ) {
 
 
317
  $domain = blavatar_domain( $permalink );
318
 
319
  if ( ! blavatar_exists( $domain ) ) {
321
  }
322
 
323
  $url = blavatar_url( $domain, 'img', $size );
324
+ } elseif ( function_exists( 'jetpack_has_site_icon' ) && jetpack_has_site_icon() ) {
325
+ $url = jetpack_site_icon_url( null, $size, $default = false );
326
+ } else {
327
+ return array();
328
  }
329
 
330
  return array( array(
347
  $post = get_post( $post_id );
348
  $permalink = get_permalink( $post_id );
349
 
350
+ if ( function_exists( 'wpcom_get_avatar_url' ) ) {
351
+ $url = wpcom_get_avatar_url( $post->post_author, $size, $default, true );
352
  if ( $url && is_array( $url ) ) {
353
  $url = $url[0];
354
  }
class.jetpack-twitter-cards.php CHANGED
@@ -28,7 +28,9 @@ class Jetpack_Twitter_Cards {
28
  $site_tag = self::site_tag();
29
  $site_tag = apply_filters( 'jetpack_sharing_twitter_via', $site_tag, ( is_singular() ? $post->ID : null ) );
30
  $site_tag = apply_filters( 'jetpack_twitter_cards_site_tag', $site_tag, $og_tags );
31
- $og_tags['twitter:site'] = self::sanitize_twitter_user( $site_tag );
 
 
32
 
33
  if ( ! is_singular() || ! empty( $og_tags['twitter:card'] ) ) {
34
  return $og_tags;
@@ -196,7 +198,11 @@ class Jetpack_Twitter_Cards {
196
  static function site_tag() {
197
  $site_tag = get_option( 'jetpack-twitter-cards-site-tag' );
198
  if ( empty( $site_tag ) ) {
199
- $site_tag = ( defined( 'IS_WPCOM' ) && IS_WPCOM ) ? 'wordpressdotcom' : 'jetpack';
 
 
 
 
200
  }
201
  return $site_tag;
202
  }
28
  $site_tag = self::site_tag();
29
  $site_tag = apply_filters( 'jetpack_sharing_twitter_via', $site_tag, ( is_singular() ? $post->ID : null ) );
30
  $site_tag = apply_filters( 'jetpack_twitter_cards_site_tag', $site_tag, $og_tags );
31
+ if ( ! empty( $site_tag ) ) {
32
+ $og_tags['twitter:site'] = self::sanitize_twitter_user( $site_tag );
33
+ }
34
 
35
  if ( ! is_singular() || ! empty( $og_tags['twitter:card'] ) ) {
36
  return $og_tags;
198
  static function site_tag() {
199
  $site_tag = get_option( 'jetpack-twitter-cards-site-tag' );
200
  if ( empty( $site_tag ) ) {
201
+ if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
202
+ return 'wordpressdotcom';
203
+ } else {
204
+ return;
205
+ }
206
  }
207
  return $site_tag;
208
  }
class.jetpack.php CHANGED
@@ -94,58 +94,73 @@ class Jetpack {
94
  */
95
  private $conflicting_plugins = array(
96
  'comments' => array(
97
- 'Intense Debate' => 'intensedebate/intensedebate.php',
98
- 'Disqus' => 'disqus-comment-system/disqus.php',
99
- 'Livefyre' => 'livefyre-comments/livefyre.php',
100
- 'Comments Evolved for WordPress' => 'gplus-comments/comments-evolved.php',
101
- 'Google+ Comments' => 'google-plus-comments/google-plus-comments.php',
102
- 'WP-SpamShield Anti-Spam' => 'wp-spamshield/wp-spamshield.php',
103
  ),
104
  'contact-form' => array(
105
- 'Contact Form 7' => 'contact-form-7/wp-contact-form-7.php',
106
- 'Gravity Forms' => 'gravityforms/gravityforms.php',
107
- 'Contact Form Plugin' => 'contact-form-plugin/contact_form.php',
108
- 'Easy Contact Forms' => 'easy-contact-forms/easy-contact-forms.php',
109
- 'Fast Secure Contact Form' => 'si-contact-form/si-contact-form.php',
110
  ),
111
  'minileven' => array(
112
- 'WPtouch' => 'wptouch/wptouch.php',
113
  ),
114
  'latex' => array(
115
- 'LaTeX for WordPress' => 'latex/latex.php',
116
- 'Youngwhans Simple Latex' => 'youngwhans-simple-latex/yw-latex.php',
117
- 'Easy WP LaTeX' => 'easy-wp-latex-lite/easy-wp-latex-lite.php',
118
- 'MathJax-LaTeX' => 'mathjax-latex/mathjax-latex.php',
119
- 'Enable Latex' => 'enable-latex/enable-latex.php',
120
- 'WP QuickLaTeX' => 'wp-quicklatex/wp-quicklatex.php',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
  ),
122
  'random-redirect' => array(
123
- 'Random Redirect 2' => 'random-redirect-2/random-redirect.php',
124
  ),
125
  'related-posts' => array(
126
- 'YARPP' => 'yet-another-related-posts-plugin/yarpp.php',
127
- 'WordPress Related Posts' => 'wordpress-23-related-posts-plugin/wp_related_posts.php',
128
- 'nrelate Related Content' => 'nrelate-related-content/nrelate-related.php',
129
- 'Contextual Related Posts' => 'contextual-related-posts/contextual-related-posts.php',
130
- 'Related Posts for WordPress' => 'microkids-related-posts/microkids-related-posts.php',
131
- 'outbrain' => 'outbrain/outbrain.php',
132
- 'Shareaholic' => 'shareaholic/shareaholic.php',
133
- 'Sexybookmarks' => 'sexybookmarks/shareaholic.php',
134
  ),
135
  'sharedaddy' => array(
136
- 'AddThis' => 'addthis/addthis_social_widget.php',
137
- 'Add To Any' => 'add-to-any/add-to-any.php',
138
- 'ShareThis' => 'share-this/sharethis.php',
139
- 'Shareaholic' => 'shareaholic/shareaholic.php',
140
  ),
141
  'verification-tools' => array(
142
- 'WordPress SEO by Yoast' => 'wordpress-seo/wp-seo.php',
143
- 'WordPress SEO Premium by Yoast' => 'wordpress-seo-premium/wp-seo-premium.php',
144
- 'All in One SEO Pack' => 'all-in-one-seo-pack/all_in_one_seo_pack.php',
145
  ),
146
  'widget-visibility' => array(
147
- 'Widget Logic' => 'widget-logic/widget_logic.php',
148
- 'Dynamic Widgets' => 'dynamic-widgets/dynamic-widgets.php',
149
  ),
150
  );
151
 
@@ -503,7 +518,6 @@ class Jetpack {
503
 
504
  add_filter( 'xmlrpc_blog_options', array( $this, 'xmlrpc_options' ) );
505
 
506
- add_action( 'admin_menu', array( $this, 'admin_menu' ), 999 ); // run late so that other plugins hooking into this menu don't get left out
507
  add_action( 'admin_init', array( $this, 'admin_init' ) );
508
  add_action( 'admin_init', array( $this, 'dismiss_jetpack_notice' ) );
509
 
@@ -528,8 +542,6 @@ class Jetpack {
528
  add_action( 'customize_controls_enqueue_scripts', array( $this, 'devicepx' ) );
529
  add_action( 'admin_enqueue_scripts', array( $this, 'devicepx' ) );
530
 
531
- // add_action( 'jetpack_admin_menu', array( $this, 'admin_menu_modules' ) );
532
-
533
  add_action( 'jetpack_activate_module', array( $this, 'activate_module_actions' ) );
534
 
535
  add_action( 'plugins_loaded', array( $this, 'extra_oembed_providers' ), 100 );
@@ -1271,18 +1283,16 @@ class Jetpack {
1271
  * @return null
1272
  */
1273
  public static function perform_security_reporting() {
1274
- $last_run = Jetpack_Options::get_option( 'last_security_report' );
1275
 
1276
- $fifteen_minutes_ago = time() - ( 15 * MINUTE_IN_SECONDS );
1277
-
1278
- if( $last_run > $fifteen_minutes_ago ) {
1279
  return;
1280
  }
1281
 
1282
  do_action( 'jetpack_security_report' );
1283
 
1284
  Jetpack_Options::update_option( 'security_report', self::$security_report );
1285
- Jetpack_Options::update_option( 'last_security_report', time() );
1286
  }
1287
 
1288
  /**
@@ -1785,6 +1795,23 @@ class Jetpack {
1785
  $mod['feature'] = array( self::translate_module_tag( 'Other' ) );
1786
  }
1787
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1788
  return $mod;
1789
  }
1790
 
@@ -1974,7 +2001,7 @@ class Jetpack {
1974
  }
1975
 
1976
  public static function activate_module( $module, $exit = true, $redirect = true ) {
1977
- do_action( 'jetpack_pre_activate_module', $module, $exit );
1978
 
1979
  $jetpack = Jetpack::init();
1980
 
@@ -2364,11 +2391,13 @@ p {
2364
 
2365
  add_action( 'load-index.php', array( $this, 'prepare_manage_jetpack_notice' ) );
2366
  }
2367
- /* Toggle this off as it's not ready for prime time just yet.
2368
- if( current_user_can( 'manage_options' ) && self::check_identity_crisis() ) {
2369
- add_action( 'admin_notices', array( $this, 'alert_identity_crisis' ) );
 
2370
  }
2371
- /**/
 
2372
 
2373
  if ( current_user_can( 'manage_options' ) && 'ALWAYS' == JETPACK_CLIENT__HTTPS && ! self::permit_ssl() ) {
2374
  add_action( 'admin_notices', array( $this, 'alert_required_ssl_fail' ) );
@@ -2466,54 +2495,6 @@ p {
2466
  }
2467
  }
2468
 
2469
- function admin_menu() {
2470
- list( $jetpack_version ) = explode( ':', Jetpack_Options::get_option( 'version' ) );
2471
- if (
2472
- $jetpack_version
2473
- &&
2474
- $jetpack_version != JETPACK__VERSION
2475
- &&
2476
- ( $new_modules = Jetpack::get_default_modules( $jetpack_version, JETPACK__VERSION ) )
2477
- &&
2478
- is_array( $new_modules )
2479
- &&
2480
- ( $new_modules_count = count( $new_modules ) )
2481
- &&
2482
- ( Jetpack::is_active() || Jetpack::is_development_mode() )
2483
- ) {
2484
- $new_modules_count_i18n = number_format_i18n( $new_modules_count );
2485
- $span_title = esc_attr( sprintf( _n( 'One New Jetpack Module', '%s New Jetpack Modules', $new_modules_count, 'jetpack' ), $new_modules_count_i18n ) );
2486
- $title = sprintf( 'Jetpack %s', "<span class='update-plugins count-{$new_modules_count}' title='$span_title'><span class='update-count'>$new_modules_count_i18n</span></span>" );
2487
- } else {
2488
- $title = __( 'Jetpack', 'jetpack' );
2489
- }
2490
-
2491
- $hook = add_menu_page( 'Jetpack', $title, 'read', 'jetpack', array( $this, 'admin_page' ), 'div' );
2492
-
2493
- $debugger_hook = add_submenu_page( null, __( 'Jetpack Debugging Center', 'jetpack' ), '', 'manage_options', 'jetpack-debugger', array( $this, 'debugger_page' ) );
2494
- add_action( "admin_head-$debugger_hook", array( 'Jetpack_Debugger', 'jetpack_debug_admin_head' ) );
2495
-
2496
- add_action( "load-$hook", array( $this, 'admin_page_load' ) );
2497
-
2498
- add_action( "load-$hook", array( $this, 'admin_help' ) );
2499
- add_action( "admin_head-$hook", array( $this, 'admin_head' ) );
2500
- add_filter( 'custom_menu_order', array( $this, 'admin_menu_order' ) );
2501
- add_filter( 'menu_order', array( $this, 'jetpack_menu_order' ) );
2502
-
2503
- add_action( "admin_print_styles-$hook", array( $this, 'admin_styles' ) );
2504
-
2505
- add_action( "admin_print_scripts-$hook", array( $this, 'admin_scripts' ) );
2506
-
2507
- /**
2508
- * Allows adding additional submenus items to the Jetpack menu in the Dashboard.
2509
- *
2510
- * @since 1.1.0
2511
- *
2512
- * @param string $hook The global $pagenow value specifying the filename. See Core load-* action.
2513
- */
2514
- do_action( 'jetpack_admin_menu', $hook );
2515
- }
2516
-
2517
  function add_remote_request_handlers() {
2518
  add_action( 'wp_ajax_nopriv_jetpack_upload_file', array( $this, 'remote_request_handlers' ) );
2519
  }
@@ -2699,11 +2680,13 @@ p {
2699
  $jp_menu_order = array();
2700
 
2701
  foreach ( $menu_order as $index => $item ) {
2702
- if ( $item != 'jetpack' )
2703
  $jp_menu_order[] = $item;
 
2704
 
2705
- if ( $index == 0 )
2706
  $jp_menu_order[] = 'jetpack';
 
2707
  }
2708
 
2709
  return $jp_menu_order;
@@ -2753,8 +2736,9 @@ p {
2753
  }
2754
 
2755
  function admin_connect_notice() {
2756
- // Don't show the connect notice on the jetpack settings page.
2757
- if ( empty( $_GET['page'] ) || 'jetpack' !== $_GET['page'] )
 
2758
  return;
2759
 
2760
  if ( ! current_user_can( 'jetpack_connect' ) )
@@ -2920,6 +2904,28 @@ p {
2920
  );
2921
  }
2922
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2923
  /*
2924
  * Registration flow:
2925
  * 1 - ::admin_page_load() action=register
@@ -3041,7 +3047,7 @@ p {
3041
  check_admin_referer( 'jetpack-disconnect' );
3042
  Jetpack::log( 'disconnect' );
3043
  Jetpack::disconnect();
3044
- wp_safe_redirect( Jetpack::admin_url() );
3045
  exit;
3046
  case 'reconnect' :
3047
  if ( ! current_user_can( 'jetpack_reconnect' ) ) {
@@ -4441,10 +4447,14 @@ p {
4441
  'id' => (int) $json->jetpack_id,
4442
  'blog_token' => (string) $json->jetpack_secret,
4443
  'public' => $jetpack_public,
4444
- 'jumpstart' => 'new_connection'
4445
  )
4446
  );
4447
 
 
 
 
 
 
4448
  return true;
4449
  }
4450
 
@@ -4512,7 +4522,8 @@ p {
4512
  return false;
4513
  }
4514
 
4515
- if ( 0 !== strpos( $token->secret, "$token_key." ) ) {
 
4516
  return false;
4517
  }
4518
 
@@ -4551,7 +4562,7 @@ p {
4551
  return false;
4552
  } else if ( is_wp_error( $signature ) ) {
4553
  return $signature;
4554
- } else if ( $signature !== $_GET['signature'] ) {
4555
  return false;
4556
  }
4557
 
@@ -4888,13 +4899,15 @@ p {
4888
  // Explode hostname on '.'
4889
  $exploded_host = explode( '.', $host );
4890
 
4891
- // Retreive the name and TLD
4892
- $name = $exploded_host[ count( $exploded_host ) - 2 ];
4893
- $tld = $exploded_host[ count( $exploded_host ) - 1 ];
4894
-
4895
- // Rebuild domain excluding subdomains
4896
- $domain = $name . '.' . $tld;
4897
-
 
 
4898
  // Array of Automattic domains
4899
  $domain_whitelist = array( 'wordpress.com', 'wp.com' );
4900
 
@@ -5535,7 +5548,7 @@ p {
5535
  *
5536
  * @since 3.2
5537
  **/
5538
- public function implode_frontend_css() {
5539
  $do_implode = true;
5540
  if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
5541
  $do_implode = false;
@@ -5548,9 +5561,11 @@ p {
5548
  return;
5549
  }
5550
 
5551
- // We do not want to use the imploded file in dev mode
5552
- if ( Jetpack::is_development_mode() ) {
5553
- return;
 
 
5554
  }
5555
 
5556
  // Do not use the imploded file if sharing css was dequeued via the sharing settings screen
@@ -5749,7 +5764,7 @@ p {
5749
  <div class="protect">
5750
  <?php if ( Jetpack::is_module_active( 'protect' ) ) : ?>
5751
  <h3><?php echo number_format_i18n( get_site_option( 'jetpack_protect_blocked_attempts', 0 ) ); ?></h3>
5752
- <p><?php echo esc_html_x( 'blocked malicious login attempts', '{#} blocked malicious login attempts -- number is on a prior line, text is a caption.', 'jetpack' ); ?></p>
5753
  <?php elseif ( current_user_can( 'jetpack_activate_modules' ) && ! self::is_development_mode() ) : ?>
5754
  <a href="<?php echo esc_url( wp_nonce_url( Jetpack::admin_url( array( 'action' => 'activate', 'module' => 'protect' ) ), 'jetpack_activate-protect' ) ); ?>" class="button button-jetpack" title="<?php esc_attr_e( 'Jetpack Protect helps to keep you secure from brute-force login attacks.', 'jetpack' ); ?>">
5755
  <?php esc_html_e( 'Activate Jetpack Protect', 'jetpack' ); ?>
@@ -5762,7 +5777,7 @@ p {
5762
  <div class="akismet">
5763
  <?php if ( is_plugin_active( 'akismet/akismet.php' ) ) : ?>
5764
  <h3><?php echo number_format_i18n( get_option( 'akismet_spam_count', 0 ) ); ?></h3>
5765
- <p><?php echo esc_html_x( 'spam comments blocked by Akismet.', '{#} spam comments blocked by Akismet -- number is on a prior line, text is a caption.', 'jetpack' ); ?></p>
5766
  <?php elseif ( current_user_can( 'activate_plugins' ) && ! is_wp_error( validate_plugin( 'akismet/akismet.php' ) ) ) : ?>
5767
  <a href="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'activate', 'plugin' => 'akismet/akismet.php' ), admin_url( 'plugins.php' ) ), 'activate-plugin_akismet/akismet.php' ) ); ?>" class="button button-jetpack">
5768
  <?php esc_html_e( 'Activate Akismet', 'jetpack' ); ?>
@@ -5779,15 +5794,20 @@ p {
5779
  public function dashboard_widget_connect_to_wpcom() {
5780
  ?>
5781
  <div class="wpcom-connect">
 
 
 
 
 
5782
  <h3><?php esc_html_e( 'Boost traffic, enhance security, and improve performance.', 'jetpack' ); ?></h3>
5783
  <p><?php esc_html_e( 'Jetpack connects your site to WordPress.com to give you traffic and customization tools, enhanced security, speed boosts, and more.', 'jetpack' ); ?></p>
5784
 
5785
  <div class="actions">
5786
- <a href="<?php echo $this->build_connect_url() ?>" class="button button-jetpack">
5787
  <?php esc_html_e( 'Connect to WordPress.com', 'jetpack' ); ?>
5788
  </a>
5789
  <?php if ( current_user_can( 'activate_plugins' ) ) : ?>
5790
- <small><a href="<?php echo esc_url( wp_nonce_url( Jetpack::admin_url( 'jetpack-notice=dismiss' ), 'jetpack-deactivate' ) ); ?>">
5791
  <?php esc_html_e( 'or, deactivate Jetpack', 'jetpack' ); ?>
5792
  </a></small>
5793
  <?php endif; ?>
94
  */
95
  private $conflicting_plugins = array(
96
  'comments' => array(
97
+ 'Intense Debate' => 'intensedebate/intensedebate.php',
98
+ 'Disqus' => 'disqus-comment-system/disqus.php',
99
+ 'Livefyre' => 'livefyre-comments/livefyre.php',
100
+ 'Comments Evolved for WordPress' => 'gplus-comments/comments-evolved.php',
101
+ 'Google+ Comments' => 'google-plus-comments/google-plus-comments.php',
102
+ 'WP-SpamShield Anti-Spam' => 'wp-spamshield/wp-spamshield.php',
103
  ),
104
  'contact-form' => array(
105
+ 'Contact Form 7' => 'contact-form-7/wp-contact-form-7.php',
106
+ 'Gravity Forms' => 'gravityforms/gravityforms.php',
107
+ 'Contact Form Plugin' => 'contact-form-plugin/contact_form.php',
108
+ 'Easy Contact Forms' => 'easy-contact-forms/easy-contact-forms.php',
109
+ 'Fast Secure Contact Form' => 'si-contact-form/si-contact-form.php',
110
  ),
111
  'minileven' => array(
112
+ 'WPtouch' => 'wptouch/wptouch.php',
113
  ),
114
  'latex' => array(
115
+ 'LaTeX for WordPress' => 'latex/latex.php',
116
+ 'Youngwhans Simple Latex' => 'youngwhans-simple-latex/yw-latex.php',
117
+ 'Easy WP LaTeX' => 'easy-wp-latex-lite/easy-wp-latex-lite.php',
118
+ 'MathJax-LaTeX' => 'mathjax-latex/mathjax-latex.php',
119
+ 'Enable Latex' => 'enable-latex/enable-latex.php',
120
+ 'WP QuickLaTeX' => 'wp-quicklatex/wp-quicklatex.php',
121
+ ),
122
+ 'protect' => array(
123
+ 'Limit Login Attempts' => 'limit-login-attempts/limit-login-attempts.php',
124
+ 'Captcha' => 'captcha/captcha.php',
125
+ 'Brute Force Login Protection' => 'brute-force-login-protection/brute-force-login-protection.php',
126
+ 'Login Security Solution' => 'login-security-solution/login-security-solution.php',
127
+ 'WPSecureOps Brute Force Protect' => 'wpsecureops-bruteforce-protect/wpsecureops-bruteforce-protect.php',
128
+ 'BulletProof Security' => 'bulletproof-security/bulletproof-security.php',
129
+ 'SiteGuard WP Plugin' => 'siteguard/siteguard.php',
130
+ 'Security-protection' => 'security-protection/security-protection.php',
131
+ 'Login Security' => 'login-security/login-security.php',
132
+ 'Botnet Attack Blocker' => 'botnet-attack-blocker/botnet-attack-blocker.php',
133
+ 'Wordfence Security' => 'wordfence/wordfence.php',
134
+ 'All In One WP Security & Firewall' => 'all-in-one-wp-security-and-firewall/wp-security.php',
135
+ 'iThemes Security' => 'better-wp-security/better-wp-security.php',
136
  ),
137
  'random-redirect' => array(
138
+ 'Random Redirect 2' => 'random-redirect-2/random-redirect.php',
139
  ),
140
  'related-posts' => array(
141
+ 'YARPP' => 'yet-another-related-posts-plugin/yarpp.php',
142
+ 'WordPress Related Posts' => 'wordpress-23-related-posts-plugin/wp_related_posts.php',
143
+ 'nrelate Related Content' => 'nrelate-related-content/nrelate-related.php',
144
+ 'Contextual Related Posts' => 'contextual-related-posts/contextual-related-posts.php',
145
+ 'Related Posts for WordPress' => 'microkids-related-posts/microkids-related-posts.php',
146
+ 'outbrain' => 'outbrain/outbrain.php',
147
+ 'Shareaholic' => 'shareaholic/shareaholic.php',
148
+ 'Sexybookmarks' => 'sexybookmarks/shareaholic.php',
149
  ),
150
  'sharedaddy' => array(
151
+ 'AddThis' => 'addthis/addthis_social_widget.php',
152
+ 'Add To Any' => 'add-to-any/add-to-any.php',
153
+ 'ShareThis' => 'share-this/sharethis.php',
154
+ 'Shareaholic' => 'shareaholic/shareaholic.php',
155
  ),
156
  'verification-tools' => array(
157
+ 'WordPress SEO by Yoast' => 'wordpress-seo/wp-seo.php',
158
+ 'WordPress SEO Premium by Yoast' => 'wordpress-seo-premium/wp-seo-premium.php',
159
+ 'All in One SEO Pack' => 'all-in-one-seo-pack/all_in_one_seo_pack.php',
160
  ),
161
  'widget-visibility' => array(
162
+ 'Widget Logic' => 'widget-logic/widget_logic.php',
163
+ 'Dynamic Widgets' => 'dynamic-widgets/dynamic-widgets.php',
164
  ),
165
  );
166
 
518
 
519
  add_filter( 'xmlrpc_blog_options', array( $this, 'xmlrpc_options' ) );
520
 
 
521
  add_action( 'admin_init', array( $this, 'admin_init' ) );
522
  add_action( 'admin_init', array( $this, 'dismiss_jetpack_notice' ) );
523
 
542
  add_action( 'customize_controls_enqueue_scripts', array( $this, 'devicepx' ) );
543
  add_action( 'admin_enqueue_scripts', array( $this, 'devicepx' ) );
544
 
 
 
545
  add_action( 'jetpack_activate_module', array( $this, 'activate_module_actions' ) );
546
 
547
  add_action( 'plugins_loaded', array( $this, 'extra_oembed_providers' ), 100 );
1283
  * @return null
1284
  */
1285
  public static function perform_security_reporting() {
1286
+ $no_check_needed = get_site_transient( 'security_report_performed_recently' );
1287
 
1288
+ if ( $no_check_needed ) {
 
 
1289
  return;
1290
  }
1291
 
1292
  do_action( 'jetpack_security_report' );
1293
 
1294
  Jetpack_Options::update_option( 'security_report', self::$security_report );
1295
+ set_site_transient( 'security_report_performed_recently', 1, 15 * MINUTE_IN_SECONDS );
1296
  }
1297
 
1298
  /**
1795
  $mod['feature'] = array( self::translate_module_tag( 'Other' ) );
1796
  }
1797
 
1798
+ /**
1799
+ * Filter the feature array on a module
1800
+ *
1801
+ * This filter allows you to control where each module is filtered: Recommended,
1802
+ * Jumpstart, and the default "Other" listing.
1803
+ *
1804
+ * @since 3.5
1805
+ *
1806
+ * @param array $mod['feature'] The areas to feature this module:
1807
+ * 'Jumpstart' adds to the "Jumpstart" option to activate many modules at once
1808
+ * 'Recommended' shows on the main Jetpack admin screen
1809
+ * 'Other' should be the default if no other value is in the array
1810
+ * @param string $module The slug of the module, e.g. sharedaddy
1811
+ * @param array $mod All the currently assembled module data
1812
+ */
1813
+ $mod['feature'] = apply_filters( 'jetpack_module_feature', $mod['feature'], $module, $mod );
1814
+
1815
  return $mod;
1816
  }
1817
 
2001
  }
2002
 
2003
  public static function activate_module( $module, $exit = true, $redirect = true ) {
2004
+ do_action( 'jetpack_pre_activate_module', $module, $exit, $redirect );
2005
 
2006
  $jetpack = Jetpack::init();
2007
 
2391
 
2392
  add_action( 'load-index.php', array( $this, 'prepare_manage_jetpack_notice' ) );
2393
  }
2394
+
2395
+ // If the plugin has just been disconnected from WP.com, show the survey notice
2396
+ if ( isset( $_GET['disconnected'] ) && 'true' === $_GET['disconnected'] ) {
2397
+ add_action( 'jetpack_notices', array( $this, 'disconnect_survey_notice' ) );
2398
  }
2399
+
2400
+ // add_action( 'admin_notices', array( $this, 'alert_identity_crisis' ) );
2401
 
2402
  if ( current_user_can( 'manage_options' ) && 'ALWAYS' == JETPACK_CLIENT__HTTPS && ! self::permit_ssl() ) {
2403
  add_action( 'admin_notices', array( $this, 'alert_required_ssl_fail' ) );
2495
  }
2496
  }
2497
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2498
  function add_remote_request_handlers() {
2499
  add_action( 'wp_ajax_nopriv_jetpack_upload_file', array( $this, 'remote_request_handlers' ) );
2500
  }
2680
  $jp_menu_order = array();
2681
 
2682
  foreach ( $menu_order as $index => $item ) {
2683
+ if ( $item != 'jetpack' ) {
2684
  $jp_menu_order[] = $item;
2685
+ }
2686
 
2687
+ if ( $index == 0 ) {
2688
  $jp_menu_order[] = 'jetpack';
2689
+ }
2690
  }
2691
 
2692
  return $jp_menu_order;
2736
  }
2737
 
2738
  function admin_connect_notice() {
2739
+ // Don't show the connect notice anywhere but the plugins.php after activating
2740
+ $current = get_current_screen();
2741
+ if ( 'plugins' !== $current->parent_base )
2742
  return;
2743
 
2744
  if ( ! current_user_can( 'jetpack_connect' ) )
2904
  );
2905
  }
2906
 
2907
+ /**
2908
+ * Show the survey link when the user has just disconnected Jetpack.
2909
+ */
2910
+ function disconnect_survey_notice() {
2911
+ ?>
2912
+ <div class="wrap">
2913
+ <div id="message" class="jetpack-message stay-visible">
2914
+ <div class="squeezer">
2915
+ <h4>
2916
+ <?php _e( 'You have successfully disconnected Jetpack.', 'jetpack' ); ?>
2917
+ <br />
2918
+ <?php echo sprintf(
2919
+ __( 'Would you tell us why? Just <a href="%s">answering two simple questions</a> would help us improve Jetpack.', 'jetpack' ),
2920
+ 'https://jetpack.me/survey-disconnected/" target="_blank'
2921
+ ); ?>
2922
+ </h4>
2923
+ </div>
2924
+ </div>
2925
+ </div>
2926
+ <?php
2927
+ }
2928
+
2929
  /*
2930
  * Registration flow:
2931
  * 1 - ::admin_page_load() action=register
3047
  check_admin_referer( 'jetpack-disconnect' );
3048
  Jetpack::log( 'disconnect' );
3049
  Jetpack::disconnect();
3050
+ wp_safe_redirect( Jetpack::admin_url( 'disconnected=true' ) );
3051
  exit;
3052
  case 'reconnect' :
3053
  if ( ! current_user_can( 'jetpack_reconnect' ) ) {
4447
  'id' => (int) $json->jetpack_id,
4448
  'blog_token' => (string) $json->jetpack_secret,
4449
  'public' => $jetpack_public,
 
4450
  )
4451
  );
4452
 
4453
+ // Initialize Jump Start for the first and only time.
4454
+ if ( ! Jetpack_Options::get_option( 'jumpstart' ) ) {
4455
+ Jetpack_Options::update_option( 'jumpstart', 'new_connection' );
4456
+ };
4457
+
4458
  return true;
4459
  }
4460
 
4522
  return false;
4523
  }
4524
 
4525
+ $token_check = "$token_key.";
4526
+ if ( ! hash_equals( substr( $token->secret, 0, strlen( $token_check ) ), $token_check ) ) {
4527
  return false;
4528
  }
4529
 
4562
  return false;
4563
  } else if ( is_wp_error( $signature ) ) {
4564
  return $signature;
4565
+ } else if ( ! hash_equals( $signature, $_GET['signature'] ) ) {
4566
  return false;
4567
  }
4568
 
4899
  // Explode hostname on '.'
4900
  $exploded_host = explode( '.', $host );
4901
 
4902
+ // Retrieve the name and TLD
4903
+ if ( count( $exploded_host ) > 1 ) {
4904
+ $name = $exploded_host[ count( $exploded_host ) - 2 ];
4905
+ $tld = $exploded_host[ count( $exploded_host ) - 1 ];
4906
+ // Rebuild domain excluding subdomains
4907
+ $domain = $name . '.' . $tld;
4908
+ } else {
4909
+ $domain = $host;
4910
+ }
4911
  // Array of Automattic domains
4912
  $domain_whitelist = array( 'wordpress.com', 'wp.com' );
4913
 
5548
  *
5549
  * @since 3.2
5550
  **/
5551
+ public function implode_frontend_css( $travis_test = false ) {
5552
  $do_implode = true;
5553
  if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
5554
  $do_implode = false;
5561
  return;
5562
  }
5563
 
5564
+ // We do not want to use the imploded file in dev mode, or if not connected
5565
+ if ( Jetpack::is_development_mode() || ! self::is_active() ) {
5566
+ if ( ! $travis_test ) {
5567
+ return;
5568
+ }
5569
  }
5570
 
5571
  // Do not use the imploded file if sharing css was dequeued via the sharing settings screen
5764
  <div class="protect">
5765
  <?php if ( Jetpack::is_module_active( 'protect' ) ) : ?>
5766
  <h3><?php echo number_format_i18n( get_site_option( 'jetpack_protect_blocked_attempts', 0 ) ); ?></h3>
5767
+ <p><?php echo esc_html_x( 'Blocked malicious login attempts', '{#} Blocked malicious login attempts -- number is on a prior line, text is a caption.', 'jetpack' ); ?></p>
5768
  <?php elseif ( current_user_can( 'jetpack_activate_modules' ) && ! self::is_development_mode() ) : ?>
5769
  <a href="<?php echo esc_url( wp_nonce_url( Jetpack::admin_url( array( 'action' => 'activate', 'module' => 'protect' ) ), 'jetpack_activate-protect' ) ); ?>" class="button button-jetpack" title="<?php esc_attr_e( 'Jetpack Protect helps to keep you secure from brute-force login attacks.', 'jetpack' ); ?>">
5770
  <?php esc_html_e( 'Activate Jetpack Protect', 'jetpack' ); ?>
5777
  <div class="akismet">
5778
  <?php if ( is_plugin_active( 'akismet/akismet.php' ) ) : ?>
5779
  <h3><?php echo number_format_i18n( get_option( 'akismet_spam_count', 0 ) ); ?></h3>
5780
+ <p><?php echo esc_html_x( 'Spam comments blocked by Akismet.', '{#} Spam comments blocked by Akismet -- number is on a prior line, text is a caption.', 'jetpack' ); ?></p>
5781
  <?php elseif ( current_user_can( 'activate_plugins' ) && ! is_wp_error( validate_plugin( 'akismet/akismet.php' ) ) ) : ?>
5782
  <a href="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'activate', 'plugin' => 'akismet/akismet.php' ), admin_url( 'plugins.php' ) ), 'activate-plugin_akismet/akismet.php' ) ); ?>" class="button button-jetpack">
5783
  <?php esc_html_e( 'Activate Akismet', 'jetpack' ); ?>
5794
  public function dashboard_widget_connect_to_wpcom() {
5795
  ?>
5796
  <div class="wpcom-connect">
5797
+ <div class="jp-emblem">
5798
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0" y="0" viewBox="0 0 172.9 172.9" enable-background="new 0 0 172.9 172.9" xml:space="preserve">
5799
+ <path d="M86.4 0C38.7 0 0 38.7 0 86.4c0 47.7 38.7 86.4 86.4 86.4s86.4-38.7 86.4-86.4C172.9 38.7 134.2 0 86.4 0zM83.1 106.6l-27.1-6.9C49 98 45.7 90.1 49.3 84l33.8-58.5V106.6zM124.9 88.9l-33.8 58.5V66.3l27.1 6.9C125.1 74.9 128.4 82.8 124.9 88.9z"/>
5800
+ </svg>
5801
+ </div>
5802
  <h3><?php esc_html_e( 'Boost traffic, enhance security, and improve performance.', 'jetpack' ); ?></h3>
5803
  <p><?php esc_html_e( 'Jetpack connects your site to WordPress.com to give you traffic and customization tools, enhanced security, speed boosts, and more.', 'jetpack' ); ?></p>
5804
 
5805
  <div class="actions">
5806
+ <a href="<?php echo $this->build_connect_url() ?>" class="button button-primary">
5807
  <?php esc_html_e( 'Connect to WordPress.com', 'jetpack' ); ?>
5808
  </a>
5809
  <?php if ( current_user_can( 'activate_plugins' ) ) : ?>
5810
+ <small><a href="<?php echo esc_url( wp_nonce_url( Jetpack::admin_url( 'jetpack-notice=dismiss' ), 'jetpack-deactivate' ) ); ?>" title="Deactivate Jetpack">
5811
  <?php esc_html_e( 'or, deactivate Jetpack', 'jetpack' ); ?>
5812
  </a></small>
5813
  <?php endif; ?>
class.json-api-endpoints.php CHANGED
@@ -95,13 +95,15 @@ abstract class WPCOM_JSON_API_Endpoint {
95
  var $custom_fields_filtering = false;
96
 
97
  /**
98
- * @var bool Set to true if the endpoint accepts all cross origin requests
99
- * You probably should not set this flag. If you are thinking of setting it,
100
- * then discuss it with someone:
101
- * http://operationapi.wordpress.com/2014/06/25/patch-allowing-endpoints-to-do-cross-origin-requests/
102
  */
103
  var $allow_cross_origin_request = false;
104
 
 
 
 
 
 
105
  function __construct( $args ) {
106
  $defaults = array(
107
  'in_testing' => false,
@@ -129,6 +131,7 @@ abstract class WPCOM_JSON_API_Endpoint {
129
  'can_use_user_details_instead_of_blog_membership' => false,
130
  'custom_fields_filtering' => false,
131
  'allow_cross_origin_request' => false,
 
132
  );
133
 
134
  $args = wp_parse_args( $args, $defaults );
@@ -157,6 +160,8 @@ abstract class WPCOM_JSON_API_Endpoint {
157
 
158
  $this->allow_cross_origin_request = (bool) $args['allow_cross_origin_request'];
159
 
 
 
160
  $this->version = $args['version'];
161
 
162
  $this->required_scope = $args['required_scope'];
@@ -564,6 +569,17 @@ abstract class WPCOM_JSON_API_Endpoint {
564
  );
565
  $return[$key] = (array) $this->cast_and_filter( $value, $docs, false, $for_output );
566
  break;
 
 
 
 
 
 
 
 
 
 
 
567
 
568
  default :
569
  $method_name = $type['type'] . '_docs';
@@ -601,8 +617,8 @@ abstract class WPCOM_JSON_API_Endpoint {
601
  }
602
 
603
  /**
604
- * Checks if the endpoint is publicly displayable
605
- */
606
  function is_publicly_documentable() {
607
  return '__do_not_document' !== $this->group && true !== $this->in_testing;
608
  }
@@ -1045,7 +1061,7 @@ EOPHP;
1045
  return null;
1046
  $is_jetpack = true === apply_filters( 'is_jetpack_site', false, get_current_blog_id() );
1047
  $post_id = $author->ID;
1048
- if ( $is_jetpack && ( defined( 'IS_WPCOM' ) && IS_WPCOM ) ) {
1049
  $ID = get_post_meta( $post_id, '_jetpack_post_author_external_id', true );
1050
  $email = get_post_meta( $post_id, '_jetpack_author_email', true );
1051
  $login = '';
@@ -1163,13 +1179,17 @@ EOPHP;
1163
  'title' => $media_item->post_title,
1164
  'caption' => $media_item->post_excerpt,
1165
  'description' => $media_item->post_content,
1166
- 'alt' => get_post_meta( $media_item->ID, '_wp_attachment_image_alt', true )
 
1167
  );
1168
 
1169
  if ( in_array( $ext, array( 'jpg', 'jpeg', 'png', 'gif' ) ) ) {
1170
  $metadata = wp_get_attachment_metadata( $media_item->ID );
1171
  $response['height'] = $metadata['height'];
1172
  $response['width'] = $metadata['width'];
 
 
 
1173
  $response['exif'] = $metadata['image_meta'];
1174
  }
1175
 
@@ -1187,6 +1207,18 @@ EOPHP;
1187
  if ( function_exists( 'video_get_info_by_blogpostid' ) ) {
1188
  $info = video_get_info_by_blogpostid( $this->api->get_blog_id_for_output(), $media_id );
1189
 
 
 
 
 
 
 
 
 
 
 
 
 
1190
  $response['videopress_guid'] = $info->guid;
1191
  $response['videopress_processing_done'] = true;
1192
  if ( '0000-00-00 00:00:00' == $info->finish_date_gmt ) {
@@ -1195,6 +1227,8 @@ EOPHP;