Version Description
Download this release
Release Info
Developer | rankmath |
Plugin | Instant Indexing for Google |
Version | 1.1.8 |
Comparing to | |
See all releases |
Code changes from version 1.1.7 to 1.1.8
- assets/css/admin.css +1 -1
- assets/js/console.js +5 -0
- assets/js/console.min.js +1 -1
- includes/class-instant-indexing.php +1 -1
- instant-indexing.php +1 -1
- readme.txt +6 -1
- views/indexnow-history.php +29 -15
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}
|
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}
|
assets/js/console.js
CHANGED
@@ -109,6 +109,11 @@ jQuery(document).ready(function($) {
|
|
109 |
$('#instant-indexing').submit();
|
110 |
}
|
111 |
|
|
|
|
|
|
|
|
|
|
|
112 |
|
113 |
});
|
114 |
|
109 |
$('#instant-indexing').submit();
|
110 |
}
|
111 |
|
112 |
+
$( '#indexnow_show_response_codes' ).on( 'click', function( e ) {
|
113 |
+
e.preventDefault();
|
114 |
+
$( this ).toggleClass( 'active' );
|
115 |
+
$( '#indexnow_response_codes' ).toggleClass( 'hidden' );
|
116 |
+
});
|
117 |
|
118 |
});
|
119 |
|
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"),r=e(".giapi-action"),
|
1 |
+
jQuery(document).ready(function(e){var s=e("#giapi-response"),i=e("#giapi-submit"),a=e("#giapi-url"),r=e(".giapi-action"),n=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=r.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=(_=new Date).toLocaleTimeString(),d=a.val().split("\n").filter(Boolean),p=d[0],g=!1,c=r.filter(":checked").val();d.length>1&&(p="(batch)",g=!0);var u=c;if("bing_submit"===c&&(u="indexnow_submit"),n.removeClass("not-ready fail success").addClass("ready").find(".response-id").html("<strong>"+u+"</strong> "+p),"bing_submit"!==o)if(g)n.addClass("success").find(".response-status").text(rm_giapi.l10n_success+" ").siblings(".response-message").text(rm_giapi.l10n_see_response),void 0!==i.error?n.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,n.addClass("fail").find(".response-status").text(rm_giapi.l10n_error+" "+i).siblings(".response-message").text(s.error.message)}});else if(void 0!==i.error)n.addClass("fail").find(".response-status").text(rm_giapi.l10n_error+" "+i.error.code).siblings(".response-message").text(i.error.message);else{var m=i;void 0!==i.urlNotificationMetadata&&(m=i.urlNotificationMetadata);var _=new Date(m.latestUpdate.notifyTime);n.addClass("success").find(".response-status").text(rm_giapi.l10n_success+" ").siblings(".response-message").text(rm_giapi.l10n_last_updated+" "+_.toString())}else void 0!==i.error?n.addClass("fail").find(".response-status").text(rm_giapi.l10n_error+" "+i.error.code).siblings(".response-message").text(i.error.message):n.addClass("success").find(".response-status").text(rm_giapi.l10n_success+" ").siblings(".response-message").text(rm_giapi.l10n_see_response),c="indexnow_submit";var f=l+" "+c+": "+p+"\n"+JSON.stringify(i,null,2)+"\n"+"-".repeat(56),v=s.val();s.val(f+"\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")})}),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.
|
15 |
*
|
16 |
* @var string
|
17 |
*/
|
18 |
+
public $version = '1.1.8';
|
19 |
|
20 |
/**
|
21 |
* Holds the admin menu hook suffix for the "dummy" dashboard.
|
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.8
|
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,11 @@ Technically, yes. That's what the plugin is made to do. But, please note that we
|
|
106 |
|
107 |
== Changelog ==
|
108 |
|
|
|
|
|
|
|
|
|
|
|
109 |
= v1.1.7 [Feb 01, 2022] =
|
110 |
* Improved: Styling of some elements
|
111 |
* Improved: Don't submit a post automatically if it's set to noindex
|
5 |
Tested up to: 5.9
|
6 |
Requires at least: 5.6
|
7 |
Requires PHP: 7.2
|
8 |
+
Stable tag: 1.1.8
|
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.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)
|
112 |
+
* Fixed: PHP notice when visiting the IndexNow History tab
|
113 |
+
|
114 |
= v1.1.7 [Feb 01, 2022] =
|
115 |
* Improved: Styling of some elements
|
116 |
* Improved: Don't submit a post automatically if it's set to noindex
|
views/indexnow-history.php
CHANGED
@@ -8,35 +8,31 @@
|
|
8 |
?>
|
9 |
<div class="wrap rank-math-wrap">
|
10 |
<h1><?php esc_attr_e( 'IndexNow History', 'fast-indexing-api' ); ?></h1>
|
11 |
-
<p class="description"><?php esc_attr_e( 'Here you can see a list of the most recent IndexNow URL submissions, and their status.', 'fast-indexing-api' ); ?></p>
|
12 |
|
13 |
<?php
|
14 |
|
15 |
$history_content = '';
|
16 |
-
$history_content .= '<a href="#" id="indexnow_clear_history" class="button alignright hidden">' . esc_html__( 'Clear History', 'fast-indexing-api' ) . '</a>';
|
17 |
-
$history_content .= '<div class="history-filter-links hidden" id="indexnow_history_filters"><a href="#" data-filter="all" class="current">' . esc_html__( 'All', 'fast-indexing-api' ) . '</a> | <a href="#" data-filter="manual">' . esc_html__( 'Manual', 'fast-indexing-api' ) . '</a> | <a href="#" data-filter="auto">' . esc_html__( 'Auto', 'fast-indexing-api' ) . '</a></div>';
|
18 |
$history_content .= '<div class="clear"></div>';
|
19 |
-
$history_content .= '<table class="wp-list-table widefat striped" id="indexnow_history"><thead><tr><th class="col-date">' . esc_html__( 'Time', 'fast-indexing-api' ) . '</th><th class="col-url">' . esc_html__( 'URL', 'fast-indexing-api' ) . '</th><th class="col-status">' . esc_html__( 'Response', 'fast-indexing-api' ) . '</th></tr></thead><tbody>';
|
20 |
|
21 |
-
$result = get_option( 'rank_math_indexnow_log',
|
22 |
foreach ( $result as $key => $value ) {
|
23 |
$result[ $key ]['timeFormatted'] = wp_date( 'Y-m-d H:i:s', $value['time'] );
|
24 |
// Translators: placeholder is human-readable time, e.g. "1 hour".
|
25 |
$result[ $key ]['timeHumanReadable'] = sprintf( __( '%s ago', 'fast-indexing-api' ), human_time_diff( $value['time'] ) );
|
26 |
-
|
27 |
-
if ( 'manual' === $filter && empty( $result[ $key ]['manual_submission'] ) ) {
|
28 |
-
unset( $result[ $key ] );
|
29 |
-
} elseif ( 'auto' === $filter && ! empty( $result[ $key ]['manual_submission'] ) ) {
|
30 |
-
unset( $result[ $key ] );
|
31 |
-
}
|
32 |
}
|
33 |
$result = array_values( array_reverse( $result ) );
|
34 |
if ( ! empty( $result ) ) {
|
|
|
|
|
|
|
|
|
35 |
foreach ( $result as $value ) {
|
36 |
-
$history_content .= '<tr class="' . ( ! empty( $value['manual_submission'] ) ? 'manual' : 'auto' ) . '"><td class="col-date">' . $value['timeFormatted'] . '<br /><span class="time-human-readable">' . $value['timeHumanReadable'] . '</span></td><td class="col-url">' . $value['url'] . '</td><td class="col-status">' . $value['status'] . '</td></tr>';
|
37 |
}
|
38 |
} else {
|
39 |
-
$history_content .= '<tr><td colspan="
|
40 |
}
|
41 |
|
42 |
$history_content .= '</tbody></table>';
|
@@ -44,8 +40,26 @@
|
|
44 |
echo wp_kses_post( $history_content );
|
45 |
|
46 |
// Print a clear history button.
|
47 |
-
$
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
?>
|
51 |
|
8 |
?>
|
9 |
<div class="wrap rank-math-wrap">
|
10 |
<h1><?php esc_attr_e( 'IndexNow History', 'fast-indexing-api' ); ?></h1>
|
11 |
+
<p class="description"><?php esc_attr_e( 'Here you can see a list of the most recent IndexNow URL submissions, and their status. To clear all items, scroll down to the bottom of the page and click on the "Clear History" button.', 'fast-indexing-api' ); ?></p>
|
12 |
|
13 |
<?php
|
14 |
|
15 |
$history_content = '';
|
|
|
|
|
16 |
$history_content .= '<div class="clear"></div>';
|
17 |
+
$history_content .= '<table class="wp-list-table widefat striped" id="indexnow_history"><thead><tr><th class="col-date">' . esc_html__( 'Time', 'fast-indexing-api' ) . '</th><th class="col-url">' . esc_html__( 'URL', 'fast-indexing-api' ) . '</th><th class="col-status">' . esc_html__( 'Submission', 'fast-indexing-api' ) . '</th><th class="col-status">' . esc_html__( 'Response', 'fast-indexing-api' ) . '</th></tr></thead><tbody>';
|
18 |
|
19 |
+
$result = get_option( 'rank_math_indexnow_log', [] );
|
20 |
foreach ( $result as $key => $value ) {
|
21 |
$result[ $key ]['timeFormatted'] = wp_date( 'Y-m-d H:i:s', $value['time'] );
|
22 |
// Translators: placeholder is human-readable time, e.g. "1 hour".
|
23 |
$result[ $key ]['timeHumanReadable'] = sprintf( __( '%s ago', 'fast-indexing-api' ), human_time_diff( $value['time'] ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
}
|
25 |
$result = array_values( array_reverse( $result ) );
|
26 |
if ( ! empty( $result ) ) {
|
27 |
+
$type = [
|
28 |
+
esc_html__( 'Automatic', 'fast-indexing-api' ),
|
29 |
+
esc_html__( 'Manual', 'fast-indexing-api' ),
|
30 |
+
];
|
31 |
foreach ( $result as $value ) {
|
32 |
+
$history_content .= '<tr class="' . ( ! empty( $value['manual_submission'] ) ? 'manual' : 'auto' ) . '"><td class="col-date">' . $value['timeFormatted'] . '<br /><span class="time-human-readable">' . $value['timeHumanReadable'] . '</span></td><td class="col-url">' . $value['url'] . '</td><td class="col-status">' . $type[ (int) $value['manual_submission'] ] . '</td><td class="col-status">' . $value['status'] . '</td></tr>';
|
33 |
}
|
34 |
} else {
|
35 |
+
$history_content .= '<tr><td colspan="4">' . esc_html__( 'No submissions yet.', 'fast-indexing-api' ) . '</td></tr>';
|
36 |
}
|
37 |
|
38 |
$history_content .= '</tbody></table>';
|
40 |
echo wp_kses_post( $history_content );
|
41 |
|
42 |
// Print a clear history button.
|
43 |
+
$clear_history_args = [
|
44 |
+
'clear_indexnow_history' => '1',
|
45 |
+
'_wpnonce' => wp_create_nonce( 'giapi_clear_history' )
|
46 |
+
];
|
47 |
+
echo '<p><a href="' . esc_url( add_query_arg( $clear_history_args ) ) . '" id="indexnow_clear_history" class="button alignright">' . esc_html__( 'Clear History', 'fast-indexing-api' ) . '</a></p>';
|
48 |
+
|
49 |
+
$help_contents = '';
|
50 |
+
|
51 |
+
$help_contents .= '<a href="#" id="indexnow_show_response_codes">' . esc_html__( 'IndexNow Response Code Help', 'fast-indexing-api' ) . '<span class="dashicons dashicons-arrow-down"></span></a>';
|
52 |
+
|
53 |
+
$help_contents .= '<table class="wp-list-table widefat striped hidden" id="indexnow_response_codes"><thead><tr><th class="col-response-code">' . esc_html__( 'Response Code', 'fast-indexing-api' ) . '</th><th class="col-response-message">' . esc_html__( 'Response Message', 'fast-indexing-api' ) . '</th><th class="col-reasons">' . esc_html__( 'Reasons', 'fast-indexing-api' ) . '</th></tr></thead><tbody>';
|
54 |
+
$help_contents .= '<tr><td class="col-response-code">200</td><td class="col-response-message">' . esc_html__( 'OK', 'fast-indexing-api' ) . '</td><td class="col-reasons">' . esc_html__( 'The URL was successfully submitted to the IndexNow API.', 'fast-indexing-api' ) . '</td></tr>';
|
55 |
+
$help_contents .= '<tr><td class="col-response-code">202</td><td class="col-response-message">' . esc_html__( 'Accepted', 'fast-indexing-api' ) . '</td><td class="col-reasons">' . esc_html__( 'The URL was successfully submitted to the IndexNow API, but the API key will be checked later.', 'fast-indexing-api' ) . '</td></tr>';
|
56 |
+
$help_contents .= '<tr><td class="col-response-code">400</td><td class="col-response-message">' . esc_html__( 'Bad Request', 'fast-indexing-api' ) . '</td><td class="col-reasons">' . esc_html__( 'The request was invalid.', 'fast-indexing-api' ) . '</td></tr>';
|
57 |
+
$help_contents .= '<tr><td class="col-response-code">403</td><td class="col-response-message">' . esc_html__( 'Forbidden', 'fast-indexing-api' ) . '</td><td class="col-reasons">' . esc_html__( 'The key was invalid (e.g. key not found, file found but key not in the file).', 'fast-indexing-api' ) . '</td></tr>';
|
58 |
+
$help_contents .= '<tr><td class="col-response-code">422</td><td class="col-response-message">' . esc_html__( 'Unprocessable Entity', 'fast-indexing-api' ) . '</td><td class="col-reasons">' . esc_html__( 'The URLs don\'t belong to the host or the key is not matching the schema in the protocol.', 'fast-indexing-api' ) . '</td></tr>';
|
59 |
+
$help_contents .= '<tr><td class="col-response-code">429</td><td class="col-response-message">' . esc_html__( 'Too Many Requests', 'fast-indexing-api' ) . '</td><td class="col-reasons">' . esc_html__( 'Too Many Requests (potential Spam).', 'fast-indexing-api' ) . '</td></tr>';
|
60 |
+
$help_contents .= '</tbody></table>';
|
61 |
+
|
62 |
+
echo wp_kses_post( $help_contents );
|
63 |
|
64 |
?>
|
65 |
|