Skip to content

Commit cf4e2aa

Browse files
committed
Fixed missing opening slash on plugin path
1 parent d3728d9 commit cf4e2aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/ToolKit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ protected function get_current_plugin_meta( $type = ConfigRegistry ) {
8383
if( !self::$config->get( 'base_dir' ) ) return [];
8484

8585
$plugin_data['slug'] = current( explode( DIRECTORY_SEPARATOR, plugin_basename( self::$config->get( 'base_dir' ) ) ) );
86-
$plugin_data['path'] = trailingslashit( str_replace( plugin_basename( self::$config->get( 'base_dir' ) ), '', trim( self::$config->get( 'base_dir' ), '/' ) ) . $plugin_data['slug'] );
86+
$plugin_data['path'] = trailingslashit( str_replace( plugin_basename( self::$config->get( 'base_dir' ) ), '', rtrim( self::$config->get( 'base_dir' ), '/' ) ) . $plugin_data['slug'] );
8787
$plugin_data['url'] = current( explode( $plugin_data['slug'] . '/', plugin_dir_url( self::$config->get( 'base_dir' ) ) ) ) . $plugin_data['slug'] . '/';
8888

8989
// Get plugin path/file identifier

0 commit comments

Comments
 (0)