Skip to content

Commit

Permalink
Merge branch 'release-2.9.2' into releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Archetyped committed Sep 20, 2022
2 parents 9cb6b66 + 65e4ef8 commit 238e75a
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 6 deletions.
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
= 2.9.2 =

* Optimize: Symbolic link handing for file/directory paths.

= 2.9.1 =

* Fix: Validate hook priority values (Let's Getz Prioritized)
Expand Down
12 changes: 10 additions & 2 deletions includes/class.utilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -1251,10 +1251,18 @@ function get_path_base( $relative = null ) {
}
// Extract base path
$base = $this->normalize_path( $base );
if ( 0 === strpos( $base, $this->normalize_path( WP_PLUGIN_DIR ) ) ) {
$end = strpos( $base, '/', strlen( WP_PLUGIN_DIR ) + 1 );
$wp_plugin_dir = $this->normalize_path( realpath( WP_PLUGIN_DIR ) );
if ( 0 === strpos( $base, $wp_plugin_dir ) ) {
$end = strpos( $base, '/', strlen( $wp_plugin_dir ) + 1 );
$base = substr( $base, 0, $end );
}
// Validate path.
if ( !is_dir( $base ) || !is_readable( $base ) ) {
// Fallback: Merge `WP_PLUGIN_DIR` and top-level directory from `plugin_basename()`.
$base = plugin_basename( __FILE__ );
$base = substr( $base, 0, strpos( $base, '/') );
$base = $this->normalize_path( WP_PLUGIN_DIR, $base, false );
}
// Save base path.
$this->_path_base = $base;
}
Expand Down
2 changes: 1 addition & 1 deletion main.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Plugin Name: Simple Lightbox
* Plugin URI: http://archetyped.com/tools/simple-lightbox/
* Description: The highly customizable lightbox for WordPress
* Version: 2.9.1
* Version: 2.9.2
* Requires at least: 5.3
* Requires PHP: 5.6.20
* Text Domain: simple-lightbox
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simple-lightbox",
"version": "2.9.1",
"version": "2.9.2",
"title": "Simple Lightbox",
"description": "The highly-customizable lightbox for WordPress",
"author": "Archetyped <[email protected]>",
Expand Down
4 changes: 4 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ Get more information on [Simple Lightbox's official page](http://archetyped.com/

== Changelog ==

= 2.9.2 =

* Optimize: Symbolic link handing for file/directory paths.

= 2.9.1 =

* Fix: Validate hook priority values (Let's Getz Prioritized)
Expand Down

0 comments on commit 238e75a

Please sign in to comment.