Skip to content

Commit

Permalink
* FIX: Fix the 'Files and Folders Ignore Strings - Do Not Process' fu…
Browse files Browse the repository at this point in the history
…nctionality.
  • Loading branch information
aaron13100 committed Aug 7, 2024
1 parent d5c2602 commit 32b915f
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion 404-solution.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Author: Aaron J
Author URI: https://www.ajexperience.com/404-solution/
Version: 2.35.12
Version: 2.35.13
License: GPL2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog #

## Version 2.35.13 (August 7, 2024) ##
* FIX: Fix the 'Files and Folders Ignore Strings - Do Not Process' functionality.

## Version 2.35.12 (August 3, 2024) ##
* FIX: Fix an undefined array key due to the new template redirect priority option.

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ Please try this website for studying Japanese flashcards.

## Changelog ##

## Version 2.35.13 (August 7, 2024) ##
* FIX: Fix the 'Files and Folders Ignore Strings - Do Not Process' functionality.

## Version 2.35.12 (August 3, 2024) ##
* FIX: Fix an undefined array key due to the new template redirect priority option.

Expand Down
2 changes: 1 addition & 1 deletion includes/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
define('ABJ404_SOLUTION_BASENAME', function_exists('plugin_basename') ? plugin_basename(ABJ404_FILE) :
basename(dirname(ABJ404_FILE)) . '/' . basename(ABJ404_FILE));

define( 'ABJ404_VERSION', '2.35.12' );
define( 'ABJ404_VERSION', '2.35.13' );
define( 'URL_TRACKING_SUFFIX', '?utm_source=404SolutionPlugin&utm_medium=WordPress');
define( 'ABJ404_HOME_URL', 'https://www.ajexperience.com/404-solution/' . URL_TRACKING_SUFFIX);
define( 'ABJ404_FC_URL', 'https://www.ajexperience.com/' . URL_TRACKING_SUFFIX);
Expand Down
10 changes: 6 additions & 4 deletions includes/PluginLogic.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,15 @@ function initializeIgnoreValues($urlRequest, $urlSlugOnly) {
$patternsToIgnore = $options['folders_files_ignore_usable'];
if (!empty($patternsToIgnore)) {
foreach ($patternsToIgnore as $patternToIgnore) {
$patternToIgnoreNoSlashes = stripslashes($patternToIgnore);
$_REQUEST[ABJ404_PP]['debug_info'] = 'Applying regex pattern to ignore\"' .
$patternToIgnore . '" to URL slug: ' . $urlSlugOnly;
$patternToIgnoreNoSlashes . '" to URL slug: ' . $urlSlugOnly;
$matches = array();
if ($f->regexMatch($patternToIgnore, $urlSlugOnly, $matches)) {
if ($f->regexMatch($patternToIgnoreNoSlashes, $urlSlugOnly, $matches)) {
$abj404logging->debugMessage("Ignoring file/folder (do not redirect) for URL: " .
esc_html($urlSlugOnly) . ", pattern used: " . $patternToIgnore);
$ignoreReasonDoNotProcess = 'Files and folders (do not redirect) pattern: ' . esc_html($patternToIgnore);
esc_html($urlSlugOnly) . ", pattern used: " . $patternToIgnoreNoSlashes);
$ignoreReasonDoNotProcess = 'Files and folders (do not redirect) pattern: ' .
esc_html($patternToIgnoreNoSlashes);
}
$_REQUEST[ABJ404_PP]['debug_info'] = 'Cleared after regex pattern to ignore.';
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "404-solution",
"version": "2.35.12",
"version": "2.35.13",
"description": "The 404 Solution Plugin.",
"main": "Gulpfile.js",
"dependencies": {
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Website: https://www.ajexperience.com/404-solution/
Tags: 404, redirect, 301, 302
Requires at least: 3.9
Tested up to: 6.6
Stable tag: 2.35.12
Stable tag: 2.35.13

Smart 404 handling: redirect to matching slug, similar name, or default page.

Expand Down Expand Up @@ -88,6 +88,9 @@ Please try this website for studying flashcards.

== Changelog ==

= Version 2.35.13 (August 7, 2024) =
* FIX: Fix the 'Files and Folders Ignore Strings - Do Not Process' functionality.

= Version 2.35.12 (August 3, 2024) =
* FIX: Fix an undefined array key due to the new template redirect priority option.

Expand Down

0 comments on commit 32b915f

Please sign in to comment.