Version Description
Download this release
Release Info
Developer | rankmath |
Plugin | Instant Indexing for Google |
Version | 1.1.9 |
Comparing to | |
See all releases |
Code changes from version 1.1.8 to 1.1.9
- assets/css/admin.css +1 -1
- assets/css/history.css +1 -0
- assets/css/settings.css +1 -1
- assets/js/console.js +21 -0
- assets/js/console.min.js +1 -1
- includes/class-instant-indexing.php +11 -6
- instant-indexing.php +1 -1
- readme.txt +7 -1
- views/bing-settings.php +32 -1
assets/css/admin.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.rank-math-wrap{max-width:1080px}.instant-indexing-nav-tabs a .dashicons{line-height:1.2}#giapi-response-wrapper{display:none}#giapi-response-userfriendly{display:none}#giapi-response-userfriendly.ready{display:block}#instant-indexing textarea{width:600px;max-width:49%}.giapi-limits{width:420px;max-width:49%;float:right;padding:14px 20px 16px;border:1px solid #ccc;background:#fafafa}.giapi-limits p{margin:0}.response-box{background:#fff;padding:18px 20px;margin:20px 0;text-align:center}.response-box .response-status{font-size:24px;line-height:1.5;margin:0 0 10px}.response-box .response-message{margin:0}.response-box .response-status:before{font-family:dashicons;font-size:28px;position:relative;top:5px;margin-right:2px}#giapi-submit{margin-top:10px}.success .response-status:before{content:"\f147"}.fail .response-status:before{content:"\f158"}.success .response-status{color:#156115}.fail .response-status{color:#bb2b2b}@media screen and (max-width: 1110px){.giapi-limits{width:100%;max-width:100%;float:none;-webkit-box-sizing:border-box;box-sizing:border-box}#instant-indexing #giapi-url{width:100%;max-width:100%}}.form-table .description{font-weight:normal}.setup-guide-link-wrapper{display:inline-block;border:1px solid #ccc;background:#fafafa;padding:10px 10px 10px 6px;margin-top:8px}.setup-guide-link-wrapper a{text-decoration:none}.notice:not(.rank-math-notice){display:none}#indexnow_show_response_codes .dashicons{text-decoration:none}#indexnow_show_response_codes.active .dashicons:before{content:"\f142"}#indexnow_show_response_codes{margin:20px 0;display:inline-block}
|
1 |
+
.rank-math-wrap{max-width:1080px}.instant-indexing-nav-tabs a .dashicons{line-height:1.2}#giapi-response-wrapper{display:none}#giapi-response-userfriendly{display:none}#giapi-response-userfriendly.ready{display:block}#instant-indexing textarea{width:600px;max-width:49%}.giapi-limits{width:420px;max-width:49%;float:right;padding:14px 20px 16px;border:1px solid #ccc;background:#fafafa}.giapi-limits p{margin:0}.response-box{background:#fff;padding:18px 20px;margin:20px 0;text-align:center}.response-box .response-status{font-size:24px;line-height:1.5;margin:0 0 10px}.response-box .response-message{margin:0}.response-box .response-status:before{font-family:dashicons;font-size:28px;position:relative;top:5px;margin-right:2px}#giapi-submit{margin-top:10px}.success .response-status:before{content:"\f147"}.fail .response-status:before{content:"\f158"}.success .response-status{color:#156115}.fail .response-status{color:#bb2b2b}@media screen and (max-width: 1110px){.giapi-limits{width:100%;max-width:100%;float:none;-webkit-box-sizing:border-box;box-sizing:border-box}#instant-indexing #giapi-url{width:100%;max-width:100%}}.form-table .description{font-weight:normal}.setup-guide-link-wrapper{display:inline-block;border:1px solid #ccc;background:#fafafa;padding:10px 10px 10px 6px;margin-top:8px}.setup-guide-link-wrapper a{text-decoration:none}.notice:not(.rank-math-notice){display:none}#indexnow_reset_key,#indexnow_check_key{margin-top:10px}#indexnow_reset_key .dashicons,#indexnow_check_key .dashicons{line-height:1.4}#indexnow_show_response_codes .dashicons{text-decoration:none}#indexnow_show_response_codes.active .dashicons:before{content:"\f142"}#indexnow_show_response_codes{margin:20px 0;display:inline-block}
|
assets/css/history.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
#indexnow_show_response_codes .dashicons{text-decoration:none}#indexnow_show_response_codes.active .dashicons:before{content:"\f142"}#indexnow_show_response_codes{margin:20px 0;display:inline-block}
|
assets/css/settings.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.form-table .description{font-weight:normal}.setup-guide-link-wrapper{display:inline-block;border:1px solid #ccc;background:#fafafa;padding:10px 10px 10px 6px;margin-top:8px}.setup-guide-link-wrapper a{text-decoration:none}.notice:not(.rank-math-notice){display:none}
|
1 |
+
.form-table .description{font-weight:normal}.setup-guide-link-wrapper{display:inline-block;border:1px solid #ccc;background:#fafafa;padding:10px 10px 10px 6px;margin-top:8px}.setup-guide-link-wrapper a{text-decoration:none}.notice:not(.rank-math-notice){display:none}#indexnow_reset_key,#indexnow_check_key{margin-top:10px}#indexnow_reset_key .dashicons,#indexnow_check_key .dashicons{line-height:1.4}
|
assets/js/console.js
CHANGED
@@ -114,6 +114,27 @@ jQuery(document).ready(function($) {
|
|
114 |
$( this ).toggleClass( 'active' );
|
115 |
$( '#indexnow_response_codes' ).toggleClass( 'hidden' );
|
116 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
|
118 |
});
|
119 |
|
114 |
$( this ).toggleClass( 'active' );
|
115 |
$( '#indexnow_response_codes' ).toggleClass( 'hidden' );
|
116 |
});
|
117 |
+
|
118 |
+
$('#indexnow_reset_key').on( 'click', function( e ) {
|
119 |
+
e.preventDefault()
|
120 |
+
var originalValue = $( '#giapi_indexnow_api_key' ).val()
|
121 |
+
$( '#giapi_indexnow_api_key' ).val( '...' )
|
122 |
+
$.ajax( {
|
123 |
+
url: rm_giapi.rest_url + '/resetKey',
|
124 |
+
type: 'POST',
|
125 |
+
beforeSend( xhr ) {
|
126 |
+
xhr.setRequestHeader( 'X-WP-Nonce', rankMath.api.nonce );
|
127 |
+
},
|
128 |
+
success: function( response ) {
|
129 |
+
$( '#giapi_indexnow_api_key' ).val( response.key );
|
130 |
+
$( '#indexnow_api_key_location').text( response.location );
|
131 |
+
$( '#indexnow_check_key' ).attr( 'href', response.location );
|
132 |
+
},
|
133 |
+
error: function( response ) {
|
134 |
+
$( '#giapi_indexnow_api_key' ).val( originalValue );
|
135 |
+
},
|
136 |
+
} );
|
137 |
+
} );
|
138 |
|
139 |
});
|
140 |
|
assets/js/console.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(e){var s=e("#giapi-response"),i=e("#giapi-submit"),a=e("#giapi-url"),
|
1 |
+
jQuery(document).ready(function(e){var s=e("#giapi-response"),i=e("#giapi-submit"),a=e("#giapi-url"),n=e(".giapi-action"),r=e("#giapi-response-userfriendly");e("#giapi-response-trigger").click(function(s){s.preventDefault(),e(this).find(".dashicons").toggleClass("dashicons-arrow-down-alt2 dashicons-arrow-up-alt2"),e("#giapi-response-wrapper").toggle()}),e("#instant-indexing").submit(function(t){t.preventDefault(),i.attr("disabled","disabled");var o=a.val(),l=n.filter(":checked").val(),d=e("#_wpnonce").val();e.ajax({url:ajaxurl,type:"POST",dataType:"json",data:{action:"rm_giapi",url:o,api_action:l,_wpnonce:d}}).always(function(t){!function(i,t,o){var l=(f=new Date).toLocaleTimeString(),d=a.val().split("\n").filter(Boolean),p=d[0],c=!1,g=n.filter(":checked").val();d.length>1&&(p="(batch)",c=!0);var _=g;if("bing_submit"===g&&(_="indexnow_submit"),r.removeClass("not-ready fail success").addClass("ready").find(".response-id").html("<strong>"+_+"</strong> "+p),"bing_submit"!==o)if(c)r.addClass("success").find(".response-status").text(rm_giapi.l10n_success+" ").siblings(".response-message").text(rm_giapi.l10n_see_response),void 0!==i.error?r.addClass("fail").find(".response-status").text(rm_giapi.l10n_error+" "+i.error.code).siblings(".response-message").text(i.error.message):e.each(i,function(e,s){if(void 0!==s.error){var i="";void 0!==s.error.code&&(i=s.error.code),void 0!==s.error.message&&s.error.message,r.addClass("fail").find(".response-status").text(rm_giapi.l10n_error+" "+i).siblings(".response-message").text(s.error.message)}});else if(void 0!==i.error)r.addClass("fail").find(".response-status").text(rm_giapi.l10n_error+" "+i.error.code).siblings(".response-message").text(i.error.message);else{var u=i;void 0!==i.urlNotificationMetadata&&(u=i.urlNotificationMetadata);var f=new Date(u.latestUpdate.notifyTime);r.addClass("success").find(".response-status").text(rm_giapi.l10n_success+" ").siblings(".response-message").text(rm_giapi.l10n_last_updated+" "+f.toString())}else void 0!==i.error?r.addClass("fail").find(".response-status").text(rm_giapi.l10n_error+" "+i.error.code).siblings(".response-message").text(i.error.message):r.addClass("success").find(".response-status").text(rm_giapi.l10n_success+" ").siblings(".response-message").text(rm_giapi.l10n_see_response),g="indexnow_submit";var m=l+" "+g+": "+p+"\n"+JSON.stringify(i,null,2)+"\n"+"-".repeat(56),v=s.val();s.val(m+"\n"+v)}(t,0,l),i.removeAttr("disabled"),e.ajax({url:ajaxurl,type:"POST",dataType:"json",data:{action:"rm_giapi_limits",_wpnonce:d}}).done(function(s){e.each(s,function(s,i){e("#giapi-limit-"+s).text(i)})})})}),rm_giapi.submit_onload&&e("#instant-indexing").submit(),e("#indexnow_show_response_codes").on("click",function(s){s.preventDefault(),e(this).toggleClass("active"),e("#indexnow_response_codes").toggleClass("hidden")}),e("#indexnow_reset_key").on("click",function(s){s.preventDefault();var i=e("#giapi_indexnow_api_key").val();e("#giapi_indexnow_api_key").val("..."),e.ajax({url:rm_giapi.rest_url+"/resetKey",type:"POST",beforeSend(e){e.setRequestHeader("X-WP-Nonce",rankMath.api.nonce)},success:function(s){e("#giapi_indexnow_api_key").val(s.key),e("#indexnow_api_key_location").text(s.location),e("#indexnow_check_key").attr("href",s.location)},error:function(s){e("#giapi_indexnow_api_key").val(i)}})})}),jQuery(window).on("load",function(){jQuery("#giapi-submit").prop("disabled",!1)});
|
includes/class-instant-indexing.php
CHANGED
@@ -15,7 +15,7 @@ class RM_GIAPI {
|
|
15 |
*
|
16 |
* @var string
|
17 |
*/
|
18 |
-
public $version = '1.1.
|
19 |
|
20 |
/**
|
21 |
* Holds the admin menu hook suffix for the "dummy" dashboard.
|
@@ -116,6 +116,7 @@ class RM_GIAPI {
|
|
116 |
'post' => 'post',
|
117 |
'page' => 'page',
|
118 |
],
|
|
|
119 |
];
|
120 |
|
121 |
$this->nav_tabs = [
|
@@ -125,7 +126,8 @@ class RM_GIAPI {
|
|
125 |
];
|
126 |
|
127 |
if ( $this->is_rm_active && class_exists( 'RankMath\\Instant_Indexing\\Api' ) ) {
|
128 |
-
$this->
|
|
|
129 |
add_action( 'admin_init', [ $this, 'remove_rm_admin_page' ] );
|
130 |
} else {
|
131 |
unset( $this->nav_tabs['bing_settings'] );
|
@@ -358,7 +360,7 @@ class RM_GIAPI {
|
|
358 |
* @return array $data Result of the API call.
|
359 |
*/
|
360 |
public function send_to_api( $url_input, $action, $is_manual = true ) {
|
361 |
-
$url_input
|
362 |
$urls_count = count( $url_input );
|
363 |
|
364 |
if ( strpos( $action, 'bing' ) === false ) {
|
@@ -681,6 +683,7 @@ class RM_GIAPI {
|
|
681 |
'l10n_error' => __( 'Error', 'fast-indexing-api' ),
|
682 |
'l10n_last_updated' => __( 'Last updated ', 'fast-indexing-api' ),
|
683 |
'l10n_see_response' => __( 'See response for details.', 'fast-indexing-api' ),
|
|
|
684 |
]
|
685 |
);
|
686 |
}
|
@@ -734,7 +737,7 @@ class RM_GIAPI {
|
|
734 |
$settings = [];
|
735 |
if ( isset( $_POST['giapi_settings']['json_key'] ) ) {
|
736 |
$settings = $this->save_google_settings();
|
737 |
-
} elseif ( isset( $_POST['giapi_settings']['
|
738 |
$settings = $this->save_bing_settings();
|
739 |
}
|
740 |
|
@@ -799,10 +802,12 @@ class RM_GIAPI {
|
|
799 |
$settings = $this->get_settings();
|
800 |
|
801 |
$new_settings = [
|
802 |
-
'bing_post_types'
|
|
|
803 |
];
|
|
|
804 |
|
805 |
-
return
|
806 |
}
|
807 |
|
808 |
/**
|
15 |
*
|
16 |
* @var string
|
17 |
*/
|
18 |
+
public $version = '1.1.9';
|
19 |
|
20 |
/**
|
21 |
* Holds the admin menu hook suffix for the "dummy" dashboard.
|
116 |
'post' => 'post',
|
117 |
'page' => 'page',
|
118 |
],
|
119 |
+
'indexnow_api_key' => '',
|
120 |
];
|
121 |
|
122 |
$this->nav_tabs = [
|
126 |
];
|
127 |
|
128 |
if ( $this->is_rm_active && class_exists( 'RankMath\\Instant_Indexing\\Api' ) ) {
|
129 |
+
$this->rm_module = new RankMath\Instant_Indexing\Instant_Indexing();
|
130 |
+
$this->rmapi = RankMath\Instant_Indexing\Api::get();
|
131 |
add_action( 'admin_init', [ $this, 'remove_rm_admin_page' ] );
|
132 |
} else {
|
133 |
unset( $this->nav_tabs['bing_settings'] );
|
360 |
* @return array $data Result of the API call.
|
361 |
*/
|
362 |
public function send_to_api( $url_input, $action, $is_manual = true ) {
|
363 |
+
$url_input = (array) $url_input;
|
364 |
$urls_count = count( $url_input );
|
365 |
|
366 |
if ( strpos( $action, 'bing' ) === false ) {
|
683 |
'l10n_error' => __( 'Error', 'fast-indexing-api' ),
|
684 |
'l10n_last_updated' => __( 'Last updated ', 'fast-indexing-api' ),
|
685 |
'l10n_see_response' => __( 'See response for details.', 'fast-indexing-api' ),
|
686 |
+
'rest_url' => $this->is_rm_active ? rest_url( \RankMath\Rest\Rest_Helper::BASE . '/in' ) : '',
|
687 |
]
|
688 |
);
|
689 |
}
|
737 |
$settings = [];
|
738 |
if ( isset( $_POST['giapi_settings']['json_key'] ) ) {
|
739 |
$settings = $this->save_google_settings();
|
740 |
+
} elseif ( isset( $_POST['giapi_settings']['indexnow_api_key'] ) ) {
|
741 |
$settings = $this->save_bing_settings();
|
742 |
}
|
743 |
|
802 |
$settings = $this->get_settings();
|
803 |
|
804 |
$new_settings = [
|
805 |
+
'bing_post_types' => array_values( $bing_post_types ),
|
806 |
+
'indexnow_api_key' => sanitize_text_field( wp_unslash( $_POST['giapi_settings']['indexnow_api_key'] ) ), // phpcs:ignore WordPress.Security.NonceVerification.Missing
|
807 |
];
|
808 |
+
$new_settings = array_merge( $settings, $new_settings );
|
809 |
|
810 |
+
return $new_settings;
|
811 |
}
|
812 |
|
813 |
/**
|
instant-indexing.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Instant Indexing
|
4 |
* Plugin URI: https://rankmath.com/wordpress/plugin/instant-indexing/
|
5 |
* Description: Get your website crawled immediately by Google using their NEW Indexing APIs.
|
6 |
-
* Version: 1.1.
|
7 |
* Author: Rank Math
|
8 |
* Author URI: https://s.rankmath.com/home
|
9 |
* License: GPL v3
|
3 |
* Plugin Name: Instant Indexing
|
4 |
* Plugin URI: https://rankmath.com/wordpress/plugin/instant-indexing/
|
5 |
* Description: Get your website crawled immediately by Google using their NEW Indexing APIs.
|
6 |
+
* Version: 1.1.9
|
7 |
* Author: Rank Math
|
8 |
* Author URI: https://s.rankmath.com/home
|
9 |
* License: GPL v3
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: indexing api, crawling, live streaming, fast indexing, job posting
|
|
5 |
Tested up to: 5.9
|
6 |
Requires at least: 5.6
|
7 |
Requires PHP: 7.2
|
8 |
-
Stable tag: 1.1.
|
9 |
License: GPL-2.0+
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.txt
|
11 |
|
@@ -106,6 +106,12 @@ Technically, yes. That's what the plugin is made to do. But, please note that we
|
|
106 |
|
107 |
== Changelog ==
|
108 |
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
= v1.1.8 [Feb 02, 2022] =
|
110 |
* Improved: Added response code help to the IndexNow History tab
|
111 |
* Improved: Added new column in IndexNow History table for submission type (manual/auto)
|
5 |
Tested up to: 5.9
|
6 |
Requires at least: 5.6
|
7 |
Requires PHP: 7.2
|
8 |
+
Stable tag: 1.1.9
|
9 |
License: GPL-2.0+
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.txt
|
11 |
|
106 |
|
107 |
== Changelog ==
|
108 |
|
109 |
+
= v1.1.9 [Feb 03, 2022] =
|
110 |
+
* Improved: New field to reset API key
|
111 |
+
* Improved: New field to check API key
|
112 |
+
* Improved: New filter to change key location
|
113 |
+
* Fixed: Could not deselect all post types in the "Submit Posts IndexNow" option
|
114 |
+
|
115 |
= v1.1.8 [Feb 02, 2022] =
|
116 |
* Improved: Added response code help to the IndexNow History tab
|
117 |
* Improved: Added new column in IndexNow History table for submission type (manual/auto)
|
views/bing-settings.php
CHANGED
@@ -1,10 +1,18 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
* @package Instant Indexing
|
6 |
*/
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
?>
|
9 |
<div class="wrap rank-math-wrap">
|
10 |
<h1><?php esc_attr_e( 'IndexNow API Settings', 'fast-indexing-api' ); ?></h1>
|
@@ -19,6 +27,29 @@
|
|
19 |
</th>
|
20 |
<td><?php $this->post_types_checkboxes( 'bing' ); ?></td>
|
21 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
</table>
|
23 |
|
24 |
<?php submit_button(); ?>
|
1 |
<?php
|
2 |
/**
|
3 |
+
* IndexNow API Settings page contents.
|
4 |
*
|
5 |
* @package Instant Indexing
|
6 |
*/
|
7 |
|
8 |
+
$check_key_label = __( 'Check Key', 'fast-indexing-api' );
|
9 |
+
|
10 |
+
// Translators: %s is the words "Check Key".
|
11 |
+
$field_desc = sprintf( __( 'Use the %1$s button to verify that the key is accessible for search engines. Clicking on it should open the key file in your browser and show the API key.', 'fast-indexing-api' ), '<strong>' . $check_key_label . '</strong>' );
|
12 |
+
|
13 |
+
$key_location = $this->rmapi->get_key_location();
|
14 |
+
$reset_button = '<a href="#" id="indexnow_reset_key" class="button button-secondary large-button"><span class="dashicons dashicons-update"></span> ' . esc_html__( 'Change Key', 'fast-indexing-api' ) . '</a>';
|
15 |
+
$check_button = '<a href="' . esc_url( $key_location ) . '" id="indexnow_check_key" class="button button-secondary large-button" target="_blank"><span class="dashicons dashicons-search"></span> ' . $check_key_label . '</a>';
|
16 |
?>
|
17 |
<div class="wrap rank-math-wrap">
|
18 |
<h1><?php esc_attr_e( 'IndexNow API Settings', 'fast-indexing-api' ); ?></h1>
|
27 |
</th>
|
28 |
<td><?php $this->post_types_checkboxes( 'bing' ); ?></td>
|
29 |
</tr>
|
30 |
+
<tr valign="top">
|
31 |
+
<th scope="row">
|
32 |
+
<?php esc_html_e( 'API Key:', 'fast-indexing-api' ); ?>
|
33 |
+
<p class="description"><?php esc_html_e( 'The IndexNow API key proves the ownership of the site. It is generated automatically. You can change the key if it becomes known to third parties.', 'fast-indexing-api' ); ?></p>
|
34 |
+
</th>
|
35 |
+
<td>
|
36 |
+
<input type="text" class="large-text" id="giapi_indexnow_api_key" disabled="disabled" name="giapi_settings[indexnow_api_key]" value="<?php echo esc_attr( $this->rmapi->get_key() ); ?>">
|
37 |
+
<br />
|
38 |
+
<?php echo wp_kses_post( $reset_button ); ?>
|
39 |
+
</td>
|
40 |
+
</tr>
|
41 |
+
</tr>
|
42 |
+
<tr valign="top">
|
43 |
+
<th scope="row">
|
44 |
+
<?php esc_html_e( 'API Key Location:', 'fast-indexing-api' ); ?>
|
45 |
+
<p class="description"><?php echo wp_kses_post( $field_desc ); ?></p>
|
46 |
+
</th>
|
47 |
+
<td>
|
48 |
+
<code id="indexnow_api_key_location"><?php echo esc_url( $this->rmapi->get_key_location() ); ?></code>
|
49 |
+
<br />
|
50 |
+
<?php echo wp_kses_post( $check_button ); ?>
|
51 |
+
</td>
|
52 |
+
</tr>
|
53 |
</table>
|
54 |
|
55 |
<?php submit_button(); ?>
|