Skip to content

Commit

Permalink
Improve path resolving when using as a composer library
Browse files Browse the repository at this point in the history
  • Loading branch information
gdarko committed Oct 23, 2021
1 parent ced1d94 commit 6fb3782
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions includes/class-batch-processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ public static function boot() {
*/
private static function load_paths() {
if ( ! defined( 'WP_BP_PATH' ) || ! defined( 'WP_BP_URL' ) ) {
$path = trailingslashit( dirname( __FILE__ ) );
$path = trailingslashit( dirname( dirname( __FILE__ ) ) );
$content_dir = basename( untrailingslashit( WP_CONTENT_DIR ) );
$library_uri = substr( strstr( trailingslashit( dirname( $path ) ), $content_dir ), strlen( $content_dir ) );
$library_uri = substr( strstr( trailingslashit( $path ), $content_dir ), strlen( $content_dir ) );
$url = untrailingslashit( WP_CONTENT_URL ) . $library_uri;
if ( ! defined( 'WP_BP_PATH' ) ) {
define( 'WP_BP_PATH', $path );
Expand Down
2 changes: 1 addition & 1 deletion wp-batch-processing.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: WP Batch Processing
Plugin URI: https://github.com/gdarko/wp-batch-processing
Description: Batch Processing for WordPress. Imagine you have to send custom emails to a lots of users based on some kind of logic. This plugin makes batch tasks easy.
Version: 1.1.2
Version: 1.1.3
Author: Darko Gjorgjijoski
Author URI: https://darkog.com
License: GPL-2+
Expand Down

0 comments on commit 6fb3782

Please sign in to comment.