Title: get urls with php?
Last modified: June 18, 2020

---

# get urls with php?

 *  Resolved [Raul P.](https://wordpress.org/support/users/alignak/)
 * (@alignak)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/get-urls-with-php/)
 * Hi,
 * Is it possible to detect if wp hide is active and obtain a list of before and
   after urls, according to the user settings in php?
 * I specifically need to determine what is the wp hide url for the `wp-content,
   wp-content/plugins, wp-content/themes, wp-content/uploads, wp-includes` directories,
   so I can rewrite some paths and other stuff accordingly.
 * Any info or php snippet would be appreciated.
 * Thanks
    -  This topic was modified 5 years, 10 months ago by [Raul P.](https://wordpress.org/support/users/alignak/).

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

 *  Plugin Author [nsp-code](https://wordpress.org/support/users/nsp-code/)
 * (@nsp-code)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/get-urls-with-php/#post-13013396)
 * Hey Raul,
    Thanks for your message, i wanted to get in touch too, i think related
   to the same problem. From time to time we receive support request regarding incompatibility
   between **WP Hide & Security Enhancer** and **Fast Velocity Minify** plugins.
   This occurs, when using minify (CSS/JavaScript) option on your plugin. If the
   user has customized the default URLs through our plugin, the minified files will
   still use the old URLs format, since our code does not trigger ( through a filter)
   to do the replacements. The best approach for this would be to add a filter on
   your plugin code, right before it create the static files ( during my tests, 
   i created a filter at /inc/functions.php, function fvm_download_and_minify(),
   right before the encoded JSON. This worked great ). Then we can use the filter
   on our plugin, to create a compatibility file with your code. We did that with
   most of cache plugins which use similar minify/optimisation functionality and
   working fine.
 * If your support question is related to something else, i’ll just send the code
   to retrive a list of before/after urls
 * Thanks
 *  Thread Starter [Raul P.](https://wordpress.org/support/users/alignak/)
 * (@alignak)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/get-urls-with-php/#post-13013556)
 * Hi
 * I was thinking of detecting wp hide configuration and rewrite the paths on my
   own (because paths also need to be adjusted inside merged css files).. but if
   you already tested some code and got it working, please let me know the php snippet
   you used and I’ll add it to FVM on the next version.
 * Thank you
 *  Plugin Author [nsp-code](https://wordpress.org/support/users/nsp-code/)
 * (@nsp-code)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/get-urls-with-php/#post-13020741)
 * Hi,
    The easiest way would be to add a filter on your code ( on 4 spots, before
   returns ), at file /inc/functions.php within `function fvm_download_and_minify()`
   add the following: `$code = apply_filters( 'fvm/download_and_minify/code', $code,
   $type);`
 * Here’s a compare diff to identify the location where the filter should be placed
   [http://www.mergely.com/Bl0rZzym/](http://www.mergely.com/Bl0rZzym/)
 * The filter will be used on our code to apply the replacements, before the code
   is being saved on server as cache file. Let me know if i can help further with
   this.
 * Thanks
    -  This reply was modified 5 years, 10 months ago by [nsp-code](https://wordpress.org/support/users/nsp-code/).
 *  Thread Starter [Raul P.](https://wordpress.org/support/users/alignak/)
 * (@alignak)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/get-urls-with-php/#post-13021269)
 * If you will hook into FVM filter, then perfect.
    Thank you very much, just pushed
   it live on version 2.8.9
 * Please use the `fvm_after_download_and_minify_code` filter and if anything else
   let me know.
 * Thanks again
 *  Plugin Author [nsp-code](https://wordpress.org/support/users/nsp-code/)
 * (@nsp-code)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/get-urls-with-php/#post-13096247)
 * This works great, thanks for the filter, both plugins are now compatible.
 * Thanks

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

The topic ‘get urls with php?’ is closed to new replies.

 * ![](https://ps.w.org/wp-hide-security-enhancer/assets/icon-256x256.png?rev=2937681)
 * [WP Hide & Security Enhancer](https://wordpress.org/plugins/wp-hide-security-enhancer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-hide-security-enhancer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-hide-security-enhancer/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-hide-security-enhancer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-hide-security-enhancer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-hide-security-enhancer/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [nsp-code](https://wordpress.org/support/users/nsp-code/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/get-urls-with-php/#post-13096247)
 * Status: resolved