Version Description
Download this release
Release Info
Developer | flixos90 |
Plugin | Site Kit by Google |
Version | 1.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.0 to 1.0.1
- google-site-kit.php +2 -2
- includes/Core/Authentication/Authentication.php +6 -1
- includes/Core/Authentication/Clients/OAuth_Client.php +2 -0
- includes/Core/Util/Migration_1_0_0.php +21 -3
- includes/Core/Util/Reset.php +20 -3
- readme.txt +1 -1
- third-party/psr/log/Psr/Log/Test/LoggerInterfaceTest.php +1 -0
google-site-kit.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
* Plugin Name: Site Kit by Google
|
12 |
* Plugin URI: https://sitekit.withgoogle.com
|
13 |
* Description: Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.
|
14 |
-
* Version: 1.0.
|
15 |
* Author: Google
|
16 |
* Author URI: https://opensource.google.com
|
17 |
* License: Apache License 2.0
|
@@ -24,7 +24,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
24 |
}
|
25 |
|
26 |
// Define most essential constants.
|
27 |
-
define( 'GOOGLESITEKIT_VERSION', '1.0.
|
28 |
define( 'GOOGLESITEKIT_PLUGIN_MAIN_FILE', __FILE__ );
|
29 |
|
30 |
/**
|
11 |
* Plugin Name: Site Kit by Google
|
12 |
* Plugin URI: https://sitekit.withgoogle.com
|
13 |
* Description: Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.
|
14 |
+
* Version: 1.0.1
|
15 |
* Author: Google
|
16 |
* Author URI: https://opensource.google.com
|
17 |
* License: Apache License 2.0
|
24 |
}
|
25 |
|
26 |
// Define most essential constants.
|
27 |
+
define( 'GOOGLESITEKIT_VERSION', '1.0.1' );
|
28 |
define( 'GOOGLESITEKIT_PLUGIN_MAIN_FILE', __FILE__ );
|
29 |
|
30 |
/**
|
includes/Core/Authentication/Authentication.php
CHANGED
@@ -567,7 +567,12 @@ final class Authentication {
|
|
567 |
);
|
568 |
|
569 |
foreach ( $verification_tags as $verification_tag ) {
|
570 |
-
|
|
|
|
|
|
|
|
|
|
|
571 |
}
|
572 |
}
|
573 |
|
567 |
);
|
568 |
|
569 |
foreach ( $verification_tags as $verification_tag ) {
|
570 |
+
$verification_tag = html_entity_decode( $verification_tag );
|
571 |
+
if ( 0 !== strpos( $verification_tag, '<meta ' ) ) {
|
572 |
+
$verification_tag = '<meta name="google-site-verification" content="' . esc_attr( $verification_tag ) . '">';
|
573 |
+
}
|
574 |
+
|
575 |
+
echo wp_kses( $verification_tag, $allowed_html );
|
576 |
}
|
577 |
}
|
578 |
|
includes/Core/Authentication/Clients/OAuth_Client.php
CHANGED
@@ -632,6 +632,7 @@ final class OAuth_Client {
|
|
632 |
'nonce' => $nonce,
|
633 |
'name' => rawurlencode( wp_specialchars_decode( get_bloginfo( 'name' ) ) ),
|
634 |
'url' => rawurlencode( $home_url ),
|
|
|
635 |
'rest_root' => rawurlencode( $rest_root ),
|
636 |
'admin_root' => rawurlencode( $admin_root ),
|
637 |
'scope' => rawurlencode( $scope ),
|
@@ -643,6 +644,7 @@ final class OAuth_Client {
|
|
643 |
$query_args = array(
|
644 |
'site_id' => $credentials->web->client_id,
|
645 |
'code' => $access_code,
|
|
|
646 |
'scope' => rawurlencode( $scope ),
|
647 |
);
|
648 |
if ( 'missing_verification' === $error_code ) {
|
632 |
'nonce' => $nonce,
|
633 |
'name' => rawurlencode( wp_specialchars_decode( get_bloginfo( 'name' ) ) ),
|
634 |
'url' => rawurlencode( $home_url ),
|
635 |
+
'version' => GOOGLESITEKIT_VERSION,
|
636 |
'rest_root' => rawurlencode( $rest_root ),
|
637 |
'admin_root' => rawurlencode( $admin_root ),
|
638 |
'scope' => rawurlencode( $scope ),
|
644 |
$query_args = array(
|
645 |
'site_id' => $credentials->web->client_id,
|
646 |
'code' => $access_code,
|
647 |
+
'version' => GOOGLESITEKIT_VERSION,
|
648 |
'scope' => rawurlencode( $scope ),
|
649 |
);
|
650 |
if ( 'missing_verification' === $error_code ) {
|
includes/Core/Util/Migration_1_0_0.php
CHANGED
@@ -13,6 +13,7 @@ namespace Google\Site_Kit\Core\Util;
|
|
13 |
use Google\Site_Kit\Context;
|
14 |
use Google\Site_Kit\Core\Authentication\Authentication;
|
15 |
use Google\Site_Kit\Core\Authentication\Clients\OAuth_Client;
|
|
|
16 |
use Google\Site_Kit\Core\Authentication\Credentials;
|
17 |
use Google\Site_Kit\Core\Storage\Encrypted_Options;
|
18 |
use Google\Site_Kit\Core\Storage\Options;
|
@@ -116,9 +117,26 @@ class Migration_1_0_0 {
|
|
116 |
$key_prefix = $this->context->is_network_mode() ? '' : $wpdb->get_blog_prefix();
|
117 |
$user_ids = ( new \WP_User_Query(
|
118 |
array(
|
119 |
-
'fields'
|
120 |
-
'
|
121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
)
|
123 |
) )->get_results();
|
124 |
|
13 |
use Google\Site_Kit\Context;
|
14 |
use Google\Site_Kit\Core\Authentication\Authentication;
|
15 |
use Google\Site_Kit\Core\Authentication\Clients\OAuth_Client;
|
16 |
+
use Google\Site_Kit\Core\Authentication\Verification_Tag;
|
17 |
use Google\Site_Kit\Core\Authentication\Credentials;
|
18 |
use Google\Site_Kit\Core\Storage\Encrypted_Options;
|
19 |
use Google\Site_Kit\Core\Storage\Options;
|
117 |
$key_prefix = $this->context->is_network_mode() ? '' : $wpdb->get_blog_prefix();
|
118 |
$user_ids = ( new \WP_User_Query(
|
119 |
array(
|
120 |
+
'fields' => 'id',
|
121 |
+
'meta_query' => array(
|
122 |
+
'relation' => 'OR',
|
123 |
+
array(
|
124 |
+
'key' => $key_prefix . Verification_Tag::OPTION,
|
125 |
+
'compare' => 'EXISTS',
|
126 |
+
),
|
127 |
+
array(
|
128 |
+
'key' => $key_prefix . OAuth_Client::OPTION_ACCESS_TOKEN,
|
129 |
+
'compare' => 'EXISTS',
|
130 |
+
),
|
131 |
+
array(
|
132 |
+
'key' => $key_prefix . OAuth_Client::OPTION_PROXY_ACCESS_CODE,
|
133 |
+
'compare' => 'EXISTS',
|
134 |
+
),
|
135 |
+
array(
|
136 |
+
'key' => $key_prefix . OAuth_Client::OPTION_ERROR_CODE,
|
137 |
+
'compare' => 'EXISTS',
|
138 |
+
),
|
139 |
+
),
|
140 |
)
|
141 |
) )->get_results();
|
142 |
|
includes/Core/Util/Reset.php
CHANGED
@@ -143,9 +143,26 @@ final class Reset {
|
|
143 |
$key_prefix = $this->context->is_network_mode() ? '' : $wpdb->get_blog_prefix();
|
144 |
$user_query = new \WP_User_Query(
|
145 |
array(
|
146 |
-
'fields'
|
147 |
-
'
|
148 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
)
|
150 |
);
|
151 |
|
143 |
$key_prefix = $this->context->is_network_mode() ? '' : $wpdb->get_blog_prefix();
|
144 |
$user_query = new \WP_User_Query(
|
145 |
array(
|
146 |
+
'fields' => 'id',
|
147 |
+
'meta_query' => array(
|
148 |
+
'relation' => 'OR',
|
149 |
+
array(
|
150 |
+
'key' => $key_prefix . Verification_Tag::OPTION,
|
151 |
+
'compare' => 'EXISTS',
|
152 |
+
),
|
153 |
+
array(
|
154 |
+
'key' => $key_prefix . OAuth_Client::OPTION_ACCESS_TOKEN,
|
155 |
+
'compare' => 'EXISTS',
|
156 |
+
),
|
157 |
+
array(
|
158 |
+
'key' => $key_prefix . OAuth_Client::OPTION_PROXY_ACCESS_CODE,
|
159 |
+
'compare' => 'EXISTS',
|
160 |
+
),
|
161 |
+
array(
|
162 |
+
'key' => $key_prefix . OAuth_Client::OPTION_ERROR_CODE,
|
163 |
+
'compare' => 'EXISTS',
|
164 |
+
),
|
165 |
+
),
|
166 |
)
|
167 |
);
|
168 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Contributors: google
|
|
4 |
Requires at least: 4.7
|
5 |
Tested up to: 5.3
|
6 |
Requires PHP: 5.4
|
7 |
-
Stable tag: 1.0.
|
8 |
License: Apache License 2.0
|
9 |
License URI: https://www.apache.org/licenses/LICENSE-2.0
|
10 |
Tags: google, search-console, analytics, adsense, pagespeed-insights, optimize, tag-manager, site-kit
|
4 |
Requires at least: 4.7
|
5 |
Tested up to: 5.3
|
6 |
Requires PHP: 5.4
|
7 |
+
Stable tag: 1.0.1
|
8 |
License: Apache License 2.0
|
9 |
License URI: https://www.apache.org/licenses/LICENSE-2.0
|
10 |
Tags: google, search-console, analytics, adsense, pagespeed-insights, optimize, tag-manager, site-kit
|
third-party/psr/log/Psr/Log/Test/LoggerInterfaceTest.php
CHANGED
@@ -95,5 +95,6 @@ class DummyTest
|
|
95 |
{
|
96 |
public function __toString()
|
97 |
{
|
|
|
98 |
}
|
99 |
}
|
95 |
{
|
96 |
public function __toString()
|
97 |
{
|
98 |
+
return 'DummyTest';
|
99 |
}
|
100 |
}
|