Title: $style/$script_path check fails when using Bedrock
Last modified: March 12, 2017

---

# $style/$script_path check fails when using Bedrock

 *  Resolved [plankguy](https://wordpress.org/support/users/plankguy/)
 * (@plankguy)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/stylescript_path-check-fails-when-using-bedrock/)
 * I’m using [Bedrock](https://roots.io/bedrock/) which has a different folder structure
   than typical WP installs. There are conditions that reassign `$style_path` & `
   $script_path` in a check for the substring of those variables (line 584):
 *     ```
       if($this->wordpressdir != '' && substr($script_path, 0, strlen($this->wordpressdir)) != $this->wordpressdir)
       ```
   
 * The problem is that Bedrock’s folder structure has core WP files at `/wp/wp-*/`
   so that substring condition returns `/wp` so that variable is never reassigned–
   I need it to be. If the length of the substring check was longer, it’d return`/
   wp-` which would reassign the variable.
 * **Example:**
    `$script_path` for the WP admin bar is set to: `'/wp-includes/js/
   admin-bar.js'` it should be set to: `'/wp/wp-includes/js/admin-bar.js'` Which
   is does, if I remove the conditions around reassignment.
 * Can you help me out? Do you have a Github repo where I can make a PR?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [plankguy](https://wordpress.org/support/users/plankguy/)
 * (@plankguy)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/stylescript_path-check-fails-when-using-bedrock/#post-8906079)
 * I should note that the problem only arises for WP core assets…
 *  Plugin Author [launchinteractive](https://wordpress.org/support/users/launchinteractive/)
 * (@launchinteractive)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/stylescript_path-check-fails-when-using-bedrock/#post-8914797)
 * Hey plankguy,
 * We’ve done some testing and made some changes. Please try the new version of 
   MMR (1.7.5) which should resolve your issue.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘$style/$script_path check fails when using Bedrock’ is closed to new 
replies.

 * ![](https://ps.w.org/merge-minify-refresh/assets/icon.svg?rev=3414776)
 * [Merge + Minify + Refresh](https://wordpress.org/plugins/merge-minify-refresh/)
 * [Support Threads](https://wordpress.org/support/plugin/merge-minify-refresh/)
 * [Active Topics](https://wordpress.org/support/plugin/merge-minify-refresh/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/merge-minify-refresh/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/merge-minify-refresh/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [launchinteractive](https://wordpress.org/support/users/launchinteractive/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/stylescript_path-check-fails-when-using-bedrock/#post-8914797)
 * Status: resolved