Skip to content

Commit 59361d6

Browse files
authored
Merge pull request #121 from brainstormforce/wp-59-compatibility
updated the tested up to WP version 5.9
2 parents c848fc7 + 7f9484a commit 59361d6

File tree

4 files changed

+38
-32
lines changed

4 files changed

+38
-32
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ phpcs-full.log
2121
vendor/
2222

2323
# ignore PHPStorm extra directories
24-
.vscode
24+
.vscodecghooks.lock
25+

admin/index.php

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function rich_snippet_dashboard() {
9292
echo '<ul class="nav-tab-wrapper bsf-tab-wraper">
9393
<li><a href="#tab-1" class="nav-tab">' . esc_html__( 'Configuration', 'all-in-one-schemaorg-rich-snippets' ) . '</a></li>
9494
<li><a href="#tab-4" class="nav-tab">' . esc_html__( 'Customization', 'all-in-one-schemaorg-rich-snippets' ) . '</a></li>
95-
95+
9696
<li><a href="#tab-3" class="nav-tab">' . esc_html__( 'FAQs', 'all-in-one-schemaorg-rich-snippets' ) . '</a></li>
9797
<li><a href="#tab-5" class="nav-tab">' . esc_html__( 'Getting Started', 'all-in-one-schemaorg-rich-snippets' ) . '</a></li>
9898
</ul>
@@ -112,7 +112,7 @@ function rich_snippet_dashboard() {
112112
<div class="table">
113113
<p>' . wp_kses_post( __( 'Strings to be displayed on frontend for <strong>Item Review Rich Snippets &mdash;</strong>', 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
114114
<form id="bsf_review_form" method="post">
115-
' . wp_nonce_field( 'snippet_review_form_action', 'snippet_review_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
115+
' . wp_nonce_field( 'snippet_review_form_action', 'snippet_review_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
116116
. '
117117
<table class="bsf_metabox">
118118
<tbody>
@@ -154,8 +154,8 @@ function rich_snippet_dashboard() {
154154
<div class="table">
155155
<p>' . wp_kses_post( __( 'Strings to be displayed on frontend for <strong>Events Rich Snippets &mdash;</strong>', 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
156156
<form id="bsf_event_form" method="post">
157-
' . wp_nonce_field( 'snippet_event_form_action', 'snippet_event_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
158-
. '
157+
' . wp_nonce_field( 'snippet_event_form_action', 'snippet_event_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
158+
. '
159159
<table class="bsf_metabox">
160160
<tbody>
161161
<tr>
@@ -201,10 +201,10 @@ function rich_snippet_dashboard() {
201201
<button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
202202
<h3 class="hndle"><span>' . esc_html__( 'Person', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
203203
<div class="inside">
204-
<div class="table">
204+
<div class="table">
205205
<p>' . wp_kses_post( __( "Strings to be displayed on frontend for <strong>Person's Rich Snippets &mdash;</strong>", 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
206206
<form id="bsf_person_form" method="post">
207-
' . wp_nonce_field( 'snippet_person_form_action', 'snippet_person_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
207+
' . wp_nonce_field( 'snippet_person_form_action', 'snippet_person_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
208208
. '
209209
<table class="bsf_metabox">
210210
<tbody>
@@ -251,7 +251,7 @@ function rich_snippet_dashboard() {
251251
<button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
252252
<h3 class="hndle"><span>' . esc_html__( 'Product', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
253253
<div class="inside">
254-
<div class="table">
254+
<div class="table">
255255
<p>' . wp_kses_post( __( 'Strings to be displayed on frontend for <strong>Product Rich Snippets &mdash;</strong>', 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
256256
<form id="bsf_product_form" method="post">
257257
' . wp_nonce_field( 'snippet_product_form_action', 'snippet_product_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
@@ -301,10 +301,10 @@ function rich_snippet_dashboard() {
301301
<button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
302302
<h3 class="hndle"><span>' . esc_html__( 'Recipe', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
303303
<div class="inside">
304-
<div class="table">
304+
<div class="table">
305305
<p>' . wp_kses_post( __( 'Strings to be displayed on frontend for <strong>Recipe Rich Snippets &mdash;</strong>', 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
306306
<form id="bsf_recipe_form" method="post">
307-
' . wp_nonce_field( 'snippet_recipe_form_action', 'snippet_recipe_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
307+
' . wp_nonce_field( 'snippet_recipe_form_action', 'snippet_recipe_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
308308
. '
309309
<table class="bsf_metabox">
310310
<tbody>
@@ -359,10 +359,10 @@ function rich_snippet_dashboard() {
359359
<button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
360360
<h3 class="hndle"><span>' . esc_html__( 'Software Application', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
361361
<div class="inside">
362-
<div class="table">
362+
<div class="table">
363363
<p>' . wp_kses_post( __( 'Strings to be displayed on frontend for <strong>Software Application Rich Snippets &mdash;</strong>', 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
364364
<form id="bsf_software_form" method="post">
365-
' . wp_nonce_field( 'snippet_soft_app_form_action', 'snippet_soft_app_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
365+
' . wp_nonce_field( 'snippet_soft_app_form_action', 'snippet_soft_app_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
366366
. '
367367
<table class="bsf_metabox">
368368
<tbody>
@@ -405,13 +405,13 @@ function rich_snippet_dashboard() {
405405
</div>
406406
</div>
407407
</div>
408-
409-
408+
409+
410410
<div class="postbox closed">
411411
<button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
412412
<h3 class="hndle"><span>' . esc_html__( 'Video', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
413413
<div class="inside">
414-
<div class="table">
414+
<div class="table">
415415
<p>' . wp_kses_post( __( 'Strings to be displayed on frontend for <strong>Video Rich Snippets &mdash;</strong>', 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
416416
<form id="bsf_video_form" method="post">
417417
' . wp_nonce_field( 'snippet_video_form_action', 'snippet_video_nonce_field' )//phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
@@ -433,7 +433,7 @@ function rich_snippet_dashboard() {
433433
<tr>
434434
<td align="right"><strong><label>' . esc_html__( 'Video Duration :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
435435
<td><input class="bsf_text_medium" type="text" name="video_time" value="' . esc_attr( stripslashes( $args_video['video_time'] ) ) . '"/></td>
436-
</tr>
436+
</tr>
437437
<tr>
438438
<td align="right"><strong><label>' . esc_html__( 'Video Upload Date :', 'all-in-one-schemaorg-rich-snippets' ) . '</label></strong></td>
439439
<td><input class="bsf_text_medium" type="text" name="video_date" value="' . esc_attr( stripslashes( $args_video['video_date'] ) ) . '"/></td>
@@ -453,7 +453,7 @@ function rich_snippet_dashboard() {
453453
<button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
454454
<h3 class="hndle"><span>' . esc_html__( 'Article', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
455455
<div class="inside">
456-
<div class="table">
456+
<div class="table">
457457
<p>' . wp_kses_post( __( 'Strings to be displayed on frontend for <strong>Article Rich Snippets &mdash;</strong>', 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
458458
<form id="bsf_article_form" method="post">
459459
' . wp_nonce_field( 'snippet_article_form_action', 'snippet_article_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
@@ -503,10 +503,10 @@ function rich_snippet_dashboard() {
503503
<button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
504504
<h3 class="hndle"><span>' . esc_html__( 'Service', 'all-in-one-schemaorg-rich-snippets' ) . '</span></h3>
505505
<div class="inside">
506-
<div class="table">
506+
<div class="table">
507507
<p>' . wp_kses_post( __( 'Strings to be displayed on frontend for <strong>Service Rich Snippets &mdash;</strong>', 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
508508
<form id="bsf_service_form" method="post">
509-
' . wp_nonce_field( 'snippet_service_form_action', 'snippet_service_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
509+
' . wp_nonce_field( 'snippet_service_form_action', 'snippet_service_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
510510
. '
511511
<table class="bsf_metabox">
512512
<tbody>
@@ -557,17 +557,17 @@ function rich_snippet_dashboard() {
557557
</div>
558558
</div>
559559
</div>
560-
<!-- Post blox -->
561-
560+
<!-- Post blox -->
561+
562562
</div>
563563
<div class="schema-notice">
564564
<p>' . wp_kses_post( __( "Need some more schema types with automation to implement schema markup? Get the latest and premium schema markup plugin to automate the process of adding schema markup on your entire website. <br><a href='https://wpschema.com/?utm_source=allinone&utm_campaign=repo&utm_medium=configure' target='_blank'> Know more about Schema Pro.</a>", 'all-in-one-schemaorg-rich-snippets' ) ) . '</p>
565565
</div>
566566
</div>
567-
</div>
567+
</div>
568568
</div>
569-
570-
569+
570+
571571
<div id="tab-5">
572572
<div id="poststuff">
573573
<div id="postbox-container-17" class="postbox-container">
@@ -745,7 +745,7 @@ function rich_snippet_dashboard() {
745745
</div>
746746
</div>
747747
</div>
748-
748+
749749
<div id="tab-3">
750750
<div id="poststuff">
751751
<div id="postbox-container-5" class="postbox-container">
@@ -811,10 +811,11 @@ function rich_snippet_dashboard() {
811811
<div class="meta-box-sortables ui-sortable">
812812
<div class="postbox">
813813
<button type="button" class="handlediv" aria-expanded="false"><span class="screen-reader-text">Toggle panel: Frontend Options</span><span class="toggle-indicator" aria-hidden="true"></span></button>
814-
<h3 class="hndle"><span>' . wp_kses_post( __( 'Customize the look and feel of rich snippet box', 'all-in-one-schemaorg-rich-snippets' ) ) . '</span></h3>
814+
<h3 class="hndle">' . wp_kses_post( __( '<span>Customize the look and feel of rich snippet box</span>', 'all-in-one-schemaorg-rich-snippets' ) ) . //phpcs:ignore WordPress.WP.I18n.NoHtmlWrappedStrings
815+
'</h3>
815816
<div class="inside">
816817
<form id="bsf_css_editor" method="post" onsubmit="return false;" action="">
817-
' . wp_nonce_field( 'snippet_color_form_action', 'snippet_color_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
818+
' . wp_nonce_field( 'snippet_color_form_action', 'snippet_color_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
818819
. '
819820
<table class="bsf_metabox">
820821
<tr>
@@ -853,7 +854,7 @@ function rich_snippet_dashboard() {
853854
</div>
854855
</div>
855856
</div>
856-
857+
857858
</div>
858859
</div>
859860
<div class="postbox-container" id="bsf-postbox-container-1" >
@@ -863,7 +864,7 @@ function rich_snippet_dashboard() {
863864
<h3 class="get_in_touch">' . esc_html__( 'WooCommerce Configuration', 'all-in-one-schemaorg-rich-snippets' ) . '</h3>
864865
<div class="inside">
865866
<form id="bsf_css_editor" method="post" action="">
866-
' . wp_nonce_field( 'snippet_woocommerce_form_action', 'snippet_woocommerce_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
867+
' . wp_nonce_field( 'snippet_woocommerce_form_action', 'snippet_woocommerce_nonce_field' ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
867868
. '
868869
<p> ' . esc_html__( 'WooCommerce comes with Schema.org code by default and using our plugin on WooCommerce product pages does will add duplicate schema so it is not recommended. If you could still like to enable our plugin on WooCommerce products, please enable this option.', 'all-in-one-schemaorg-rich-snippets' ) . ' </p>
869870
<table class="bsf_metabox" > <input type="hidden" name="site_url" value="' . esc_url( site_url() ) . '" /> </p>
@@ -881,7 +882,7 @@ function rich_snippet_dashboard() {
881882
</table>
882883
</form>
883884
</div>
884-
</div>' . get_support( 1 ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
885+
</div>' . get_support( 1 ) //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
885886
. '
886887
</div>';
887888
echo '
@@ -1208,13 +1209,13 @@ function get_support() {
12081209
<td><input required="required" type="text" class="bsf_text_medium" name="post_url" /></td></tr>
12091210
<tr><td><label for="subject"><strong>' . esc_html__( 'Subject:', 'all-in-one-schemaorg-rich-snippets' ) . '</strong> </label></td>
12101211
<td>
1211-
<select class="select_full" name="subject">
1212+
<select class="select_full" name="subject">
12121213
<option value="question"> I have a question </option>
12131214
<option value="bug"> I found a bug </option>
12141215
<option value="help"> I need help </option>
12151216
<option value="professional"> I need professional service </option>
12161217
<option value="contribute"> I want to contribute my code</option>
1217-
<option value="other"> Other </option>
1218+
<option value="other"> Other </option>
12181219
</select>
12191220
</td><td></td></tr>
12201221
<tr><td class="bsf_label"><label for="message"><strong>' . esc_html__( 'Your Query in Brief:', 'all-in-one-schemaorg-rich-snippets' ) . '</strong> </label></td>

cghooks.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
["pre-commit"]

readme.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ Review, Event, People, Product, Recipe, Software Application, Video, Articles et
8080

8181
== Changelog ==
8282

83+
= 1.6.5 =
84+
- Fixed - Code updated according to coding standard.
85+
8386
= 1.6.4 =
8487
- Improvement - Hardened the security of the plugin.
8588
- Fixed - Reset functionality was not working in the backend settings.

0 commit comments

Comments
 (0)