Skip to content

Commit 4841c11

Browse files
committed
Pinking shears, round 1.
1 parent 0024784 commit 4841c11

8 files changed

+58
-58
lines changed

class.jetpack-ixr-client.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function query() {
4949
$this->error = new IXR_Error( -32300, 'transport error - HTTP status code was not 200' );
5050
return false;
5151
}
52-
52+
5353
$content = wp_remote_retrieve_body( $response );
5454

5555
// Now parse what we've got back

class.jetpack-signature.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function sign_current_request( $override = array() ) {
5656
}
5757
}
5858

59-
$method = isset( $override['method'] ) ? $override['method'] : $_SERVER['REQUEST_METHOD'];
59+
$method = isset( $override['method'] ) ? $override['method'] : $_SERVER['REQUEST_METHOD'];
6060
return $this->sign_request( $a['token'], $a['timestamp'], $a['nonce'], $a['body-hash'], $method, $url, $body, true );
6161
}
6262

class.jetpack-user-agent.php

+25-25
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ function is_tablet() {
387387
|| self::is_TouchPad()
388388
);
389389
}
390-
390+
391391
/*
392392
* Detects if the current UA is the default iPhone or iPod Touch Browser.
393393
*
@@ -438,7 +438,7 @@ function is_iphone_or_ipod( $type = 'iphone-any' ) {
438438
return $is_iphone;
439439
}
440440

441-
441+
442442
/*
443443
* Detects if the current UA is Chrome for iOS
444444
*
@@ -448,51 +448,51 @@ function is_iphone_or_ipod( $type = 'iphone-any' ) {
448448
function is_chrome_for_iOS( ) {
449449
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) )
450450
return false;
451-
451+
452452
if ( self::is_iphone_or_ipod( 'iphone-safari' ) === false ) return false;
453-
453+
454454
$ua = strtolower( $_SERVER['HTTP_USER_AGENT'] );
455-
455+
456456
if ( strpos( $ua, 'crios/' ) !== false )
457457
return true;
458458
else
459459
return false;
460460
}
461-
462-
461+
462+
463463
/*
464464
* Detects if the current UA is Twitter for iPhone
465-
*
465+
*
466466
* Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_5 like Mac OS X; nb-no) AppleWebKit/533.17.9 (KHTML, like Gecko) Mobile/8L1 Twitter for iPhone
467467
* Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B206 Twitter for iPhone
468-
*
468+
*
469469
*/
470470
function is_twitter_for_iphone( ) {
471471
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) )
472472
return false;
473-
473+
474474
$ua = strtolower( $_SERVER['HTTP_USER_AGENT'] );
475475

476476
if ( strpos( $ua, 'ipad' ) !== false )
477477
return false;
478-
478+
479479
if ( strpos( $ua, 'twitter for iphone' ) !== false )
480480
return true;
481481
else
482482
return false;
483483
}
484-
484+
485485
/*
486486
* Detects if the current UA is Twitter for iPad
487-
*
487+
*
488488
* Old version 4.X - Mozilla/5.0 (iPad; U; CPU OS 4_3_5 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Mobile/8L1 Twitter for iPad
489489
* Ver 5.0 or Higher - Mozilla/5.0 (iPad; CPU OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B206 Twitter for iPhone
490-
*
490+
*
491491
*/
492492
function is_twitter_for_ipad( ) {
493493
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) )
494494
return false;
495-
495+
496496
$ua = strtolower( $_SERVER['HTTP_USER_AGENT'] );
497497

498498
if ( strpos( $ua, 'twitter for ipad' ) !== false )
@@ -502,7 +502,7 @@ function is_twitter_for_ipad( ) {
502502
else
503503
return false;
504504
}
505-
505+
506506

507507
/*
508508
* Detects if the current UA is Facebook for iPhone
@@ -735,16 +735,16 @@ function is_WindowsPhone7() {
735735
function is_windows_phone_8() {
736736
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) )
737737
return false;
738-
738+
739739
$ua = strtolower( $_SERVER['HTTP_USER_AGENT'] );
740740
if ( strpos( $ua, 'windows phone 8' ) === false ) {
741741
return false;
742742
} else {
743743
return true;
744744
}
745745
}
746-
747-
746+
747+
748748
/*
749749
* Detects if the current browser is on a Palm device running the new WebOS. This EXCLUDES TouchPad.
750750
*
@@ -1062,16 +1062,16 @@ function is_windows8_auth( ) {
10621062
function is_wordpress_for_win8( ) {
10631063
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) )
10641064
return false;
1065-
1065+
10661066
$agent = strtolower( $_SERVER['HTTP_USER_AGENT'] );
10671067
$pos = strpos( $agent, 'wp-windows8' );
10681068
if ( $pos !== false )
10691069
return true;
10701070
else
10711071
return false;
10721072
}
1073-
1074-
1073+
1074+
10751075
/*
10761076
* is_blackberry_tablet() can be used to check the User Agent for a RIM blackberry tablet
10771077
* The user agent of the BlackBerry® Tablet OS follows a format similar to the following:
@@ -1105,7 +1105,7 @@ function is_blackbeberry() {
11051105
return false;
11061106

11071107
$agent = strtolower( $_SERVER['HTTP_USER_AGENT'] );
1108-
1108+
11091109
$pos_blackberry = strpos( $agent, 'blackberry' );
11101110
if ( $pos_blackberry !== false ) {
11111111
if ( self::is_opera_mini() || self::is_opera_mobile() || self::is_firefox_mobile() )
@@ -1148,7 +1148,7 @@ function get_blackbeberry_OS_version() {
11481148

11491149
if ( self::is_blackberry_10() )
11501150
return 'blackberry-10';
1151-
1151+
11521152
$agent = strtolower( $_SERVER['HTTP_USER_AGENT'] );
11531153

11541154
$pos_blackberry = stripos( $agent, 'blackberry' );
@@ -1232,7 +1232,7 @@ function detect_blackberry_browser_version() {
12321232

12331233
if ( self::is_blackberry_10() )
12341234
return 'blackberry-10';
1235-
1235+
12361236
$pos_blackberry = strpos( $agent, 'blackberry' );
12371237
if ( $pos_blackberry === false ) {
12381238
//not a blackberry device

class.jetpack-xmlrpc-server.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function xmlrpc_methods( $core_methods ) {
3030
'jetpack.featuresEnabled' => array( $this, 'features_enabled' ),
3131
'jetpack.getPost' => array( $this, 'get_post' ),
3232
'jetpack.getPosts' => array( $this, 'get_posts' ),
33-
'jetpack.getComment' => array( $this, 'get_comment' ),
33+
'jetpack.getComment' => array( $this, 'get_comment' ),
3434
'jetpack.getComments' => array( $this, 'get_comments' ),
3535
) );
3636

@@ -158,7 +158,7 @@ function error( $error = null ) {
158158
function test_connection() {
159159
return JETPACK__VERSION;
160160
}
161-
161+
162162
function test_api_user_code( $args ) {
163163
$client_id = (int) $args[0];
164164
$user_id = (int) $args[1];
@@ -279,7 +279,7 @@ function get_comments( $args ) {
279279

280280
return $sync_data;
281281
}
282-
282+
283283
function update_attachment_parent( $args ) {
284284
$attachment_id = (int) $args[0];
285285
$parent_id = (int) $args[1];

class.json-api-endpoints.php

+23-23
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ abstract class WPCOM_JSON_API_Endpoint {
5555

5656
// Is this endpoint still in testing phase? If so, not available to the public.
5757
var $in_testing = false;
58-
58+
5959
/**
6060
* @var string Version of the API
6161
*/
@@ -560,7 +560,7 @@ function document( $show_description = true ) {
560560

561561
<?php
562562
// If no example was hardcoded in the doc, try to get some
563-
if ( empty( $this->example_response ) ) {
563+
if ( empty( $this->example_response ) ) {
564564

565565
// Examples for endpoint documentation response
566566
$response_key = 'dev_response_' . $this->version . '_' . $this->method . '_' . sanitize_title( $this->path );
@@ -1009,11 +1009,11 @@ function parse_date( $date_string ) {
10091009

10101010
$gmt_offset = get_option( 'gmt_offset' );
10111011
$local_time = $time + $gmt_offset * 3600;
1012-
1012+
10131013
$date = getdate( ( int ) $local_time );
10141014
$datetime->setDate( $date['year'], $date['mon'], $date['mday'] );
10151015
$datetime->setTime( $date['hours'], $date['minutes'], $date['seconds'] );
1016-
1016+
10171017
$local = $datetime->format( 'Y-m-d H:i:s' );
10181018
return array( (string) $local, (string) $gmt );
10191019
}
@@ -1802,9 +1802,9 @@ function write_post( $path, $blog_id, $post_id ) {
18021802
}
18031803

18041804
unset( $input['tags'], $input['categories'] );
1805-
1805+
18061806
$insert = array();
1807-
1807+
18081808
if ( !empty( $input['slug'] ) ) {
18091809
$insert['post_name'] = $input['slug'];
18101810
unset( $input['slug'] );
@@ -1814,22 +1814,22 @@ function write_post( $path, $blog_id, $post_id ) {
18141814
$insert['comment_status'] = 'open';
18151815
else if ( false === $input['comments_open'] )
18161816
$insert['comment_status'] = 'closed';
1817-
1817+
18181818
if ( true === $input['pings_open'] )
18191819
$insert['ping_status'] = 'open';
18201820
else if ( false === $input['pings_open'] )
18211821
$insert['ping_status'] = 'closed';
1822-
1822+
18231823
unset( $input['comments_open'], $input['pings_open'] );
1824-
1824+
18251825
$publicize = $input['publicize'];
18261826
$publicize_custom_message = $input['publicize_message'];
18271827
unset( $input['publicize'], $input['publicize_message'] );
1828-
1828+
18291829
foreach ( $input as $key => $value ) {
18301830
$insert["post_$key"] = $value;
18311831
}
1832-
1832+
18331833
$has_media = isset( $input['media'] ) && $input['media'] ? count( $input['media'] ) : false;
18341834

18351835
if ( $new ) {
@@ -1870,7 +1870,7 @@ function write_post( $path, $blog_id, $post_id ) {
18701870
if ( !$post_id || is_wp_error( $post_id ) ) {
18711871
return $post_id;
18721872
}
1873-
1873+
18741874
if ( $publicize === false ) {
18751875
foreach ( $GLOBALS['publicize_ui']->publicize->get_services( 'all' ) as $name => $service ) {
18761876
update_post_meta( $post_id, $GLOBALS['publicize_ui']->publicize->POST_SKIP . $name, 1 );
@@ -1882,10 +1882,10 @@ function write_post( $path, $blog_id, $post_id ) {
18821882
}
18831883
}
18841884
}
1885-
1885+
18861886
if ( !empty( $publicize_custom_message ) )
1887-
update_post_meta( $post_id, $GLOBALS['publicize_ui']->publicize->POST_MESS, trim( $publicize_custom_message ) );
1888-
1887+
update_post_meta( $post_id, $GLOBALS['publicize_ui']->publicize->POST_MESS, trim( $publicize_custom_message ) );
1888+
18891889
if ( is_array( $categories ) )
18901890
wp_set_object_terms( $post_id, $categories, 'category' );
18911891
if ( is_array( $tags ) )
@@ -2048,7 +2048,7 @@ function new_taxonomy( $path, $blog_id, $taxonomy_type ) {
20482048
'parent' => $input['parent']
20492049
)
20502050
);
2051-
2051+
20522052
$taxonomy = get_term_by( 'id', $data['term_id'], $taxonomy_type );
20532053
$return = $this->get_taxonomy( $taxonomy->slug, $taxonomy_type, $args['context'] );
20542054
if ( !$return || is_wp_error( $return ) ) {
@@ -2093,7 +2093,7 @@ function update_taxonomy( $path, $blog_id, $object_id, $taxonomy_type ) {
20932093

20942094
$data = wp_update_term( $taxonomy->term_id, $taxonomy_type, $update );
20952095
$taxonomy = get_term_by( 'id', $data['term_id'], $taxonomy_type );
2096-
2096+
20972097
$return = $this->get_taxonomy( $taxonomy->slug, $taxonomy_type, $args['context'] );
20982098
if ( !$return || is_wp_error( $return ) ) {
20992099
return $return;
@@ -2713,7 +2713,7 @@ function update_comment( $path, $blog_id, $comment_id ) {
27132713
return new WP_Error( 'trash_disabled', 'Cannot trash comment', 403 );
27142714
}
27152715

2716-
if ( 'trash' !== $comment_status ) {
2716+
if ( 'trash' !== $comment_status ) {
27172717
wp_trash_comment( $comment_id );
27182718
}
27192719
break;
@@ -3026,7 +3026,7 @@ function callback( $path = '', $blog_id = 0 ) {
30263026
'title' => 'Hello World',
30273027
'content' => 'Hello. I am a test post. I was created by the API',
30283028
'tags' => 'tests',
3029-
'categories' => 'API'
3029+
'categories' => 'API'
30303030
)
30313031
),
30323032

@@ -3060,7 +3060,7 @@ function callback( $path = '', $blog_id = 0 ) {
30603060
"format": "standard",
30613061
"geo": false,
30623062
"publicize_URLs": [
3063-
3063+
30643064
],
30653065
"tags": {
30663066
"tests": {
@@ -3151,7 +3151,7 @@ function callback( $path = '', $blog_id = 0 ) {
31513151
'title' => 'Hello World (Again)',
31523152
'content' => 'Hello. I am an edited post. I was edited by the API',
31533153
'tags' => 'tests',
3154-
'categories' => 'API'
3154+
'categories' => 'API'
31553155
)
31563156
),
31573157

@@ -3185,7 +3185,7 @@ function callback( $path = '', $blog_id = 0 ) {
31853185
"format": "standard",
31863186
"geo": false,
31873187
"publicize_URLs": [
3188-
3188+
31893189
],
31903190
"tags": {
31913191
"tests": {
@@ -3281,7 +3281,7 @@ function callback( $path = '', $blog_id = 0 ) {
32813281
"format": "standard",
32823282
"geo": false,
32833283
"publicize_URLs": [
3284-
3284+
32853285
],
32863286
"tags": {
32873287
"tests": {

class.json-api.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ function serve( $exit = true ) {
156156
$methods = $allowed_methods;
157157
$find_all_matching_endpoints = true;
158158
$four_oh_five = true;
159-
}
159+
}
160160
}
161161

162162
// Find which endpoint to serve

locales.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1551,7 +1551,7 @@ function GP_Locales() {
15511551
$tg->google_code = 'tg';
15521552
$tg->nplurals = 2;
15531553
$tg->plural_expression = 'n != 1;';
1554-
1554+
15551555
$th = new GP_Locale();
15561556
$th->english_name = 'Thai';
15571557
$th->native_name = 'ไทย';
@@ -1701,7 +1701,7 @@ function GP_Locales() {
17011701
$yi->slug = 'yi';
17021702
$yi->google_code = 'yi';
17031703
$yi->rtl = true;
1704-
1704+
17051705
$yo = new GP_Locale();
17061706
$yo->english_name = 'Yorùbá';
17071707
$yo->native_name = 'èdè Yorùbá';

0 commit comments

Comments
 (0)