diff --git a/lib/codestar-framework/classes/setup.class.php b/lib/codestar-framework/classes/setup.class.php index 3d2934e..d52b33f 100644 --- a/lib/codestar-framework/classes/setup.class.php +++ b/lib/codestar-framework/classes/setup.class.php @@ -283,7 +283,8 @@ public static function constants() { // We need this path-finder code for set URL of framework $dirname = wp_normalize_path( dirname( dirname( __FILE__ ) ) ); $theme_dir = wp_normalize_path( get_parent_theme_file_path() ); - $plugin_dir = wp_normalize_path( WP_PLUGIN_DIR ); + $plugin_dir = str_replace( '//', '/', wp_normalize_path( WP_PLUGIN_DIR ) ); + $plugin_dir = str_replace( '/opt/bitnami', '/bitnami', $plugin_dir ); $located_plugin = ( preg_match( '#'. self::sanitize_dirname( $plugin_dir ) .'#', self::sanitize_dirname( $dirname ) ) ) ? true : false; $directory = ( $located_plugin ) ? $plugin_dir : $theme_dir; $directory_uri = ( $located_plugin ) ? WP_PLUGIN_URL : get_parent_theme_file_uri();