We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3728d9 commit cf4e2aaCopy full SHA for cf4e2aa
core/ToolKit.php
@@ -83,7 +83,7 @@ protected function get_current_plugin_meta( $type = ConfigRegistry ) {
83
if( !self::$config->get( 'base_dir' ) ) return [];
84
85
$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'] );
+ $plugin_data['path'] = trailingslashit( str_replace( plugin_basename( self::$config->get( 'base_dir' ) ), '', rtrim( self::$config->get( 'base_dir' ), '/' ) ) . $plugin_data['slug'] );
87
$plugin_data['url'] = current( explode( $plugin_data['slug'] . '/', plugin_dir_url( self::$config->get( 'base_dir' ) ) ) ) . $plugin_data['slug'] . '/';
88
89
// Get plugin path/file identifier
0 commit comments