Skip to content

Commit

Permalink
add filter to bypass incorrect sanitization (#203)
Browse files Browse the repository at this point in the history
* add filter to bypass incorrect sanitization

* update readme and version

* remove php 5.6 from travis builds
  • Loading branch information
jamesros161 authored Jul 8, 2024
1 parent 1aaa63f commit 79deabe
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 15 deletions.
11 changes: 0 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,6 @@ notifications:

matrix:
include:
- php: 5.6
before_script:
- nvm install 10
- nvm use 10
- yarn
- composer self-update --1
# Lock file has phpunit 7. Remove it and install phpunit 5 for php 5.6.
- composer remove --dev phpunit/phpunit
- composer require --dev phpunit/phpunit ^5
- composer install -o
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
- php: 7.4
before_script:
- nvm install 10
Expand Down
2 changes: 1 addition & 1 deletion boldgrid-inspirations.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Plugin Name: BoldGrid Inspirations
* Plugin URI: https://www.boldgrid.com/boldgrid-inspirations/
* Version: 2.9.1
* Version: 2.9.2
* Author: BoldGrid <[email protected]>
* Author URI: https://www.boldgrid.com/
* Description: Find inspiration, customize, and launch! BoldGrid Inspirations includes FREE WordPress themes and is the easiest way to launch a new WordPress site complete with custom content.
Expand Down
12 changes: 12 additions & 0 deletions includes/class-boldgrid-inspirations.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,18 @@ private function queue_hooks() {
'boldgrid_inspirations_deploy_complete',
array( $this, 'create_onboarding_tasks' )
);

/*
* WP 6.6 added sanitize_text_field() to the autofocus attribute which breaks it, since
* it is an array not a string. This filter will bypass this.
*/
add_filter( 'sanitize_text_field', function( $filtered, $str ) {
if ( isset( $_REQUEST['autofocus'] ) && $_REQUEST['autofocus'] === $str ) {
return $str;
} else {
return $filtered;
}
}, 10, 2 );
}

/**
Expand Down
12 changes: 9 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
=== BoldGrid Inspirations ===
Contributors: boldgrid, imh_brad, joemoto, rramo012, timph
Contributors: boldgrid, imh_brad, joemoto, rramo012, timph, jamesros161
Tags: inspiration, customization, build, create, design
Requires at least: 4.4
Tested up to: 6.5
Tested up to: 6.6
Requires PHP: 5.4
Stable tag: 2.9.1
Stable tag: 2.9.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -35,6 +35,12 @@ The second phase is Customization; tools to transform your website into your vis

== Changelog ==

= 2.9.2 =

Release Date: July 3rd, 2024

* Bug Fix: WP 6.6 - Inspirations onboarding links to Customizer don’t go to correct panel [#202](https://github.com/BoldGrid/boldgrid-inspirations/issues/202)

= 2.9.1 =

Release Date: March 25th, 2024
Expand Down

0 comments on commit 79deabe

Please sign in to comment.