Title: version 2.3.4 patch &#8211; correct plugin path construction
Last modified: August 30, 2016

---

# version 2.3.4 patch – correct plugin path construction

 *  [petrch](https://wordpress.org/support/users/petrch/)
 * (@petrch)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/version-234-patch-correct-plugin-path-construction/)
 * Hello,
 * we had some issues with wrong paths in plugins and we tracked it down to usage
   of the WP_PLUGIN_URL. The usage of this constant is discouraged by WordPress 
   and plugins_url() call should be used instead.
 * I made a simple patch, which fixes this in the advanced-post-slider. I reused
   the existing advps_url constant, so the patch should not be less effective than
   the original implementation.
 * — advanced-post-slider.php.orig 2015-08-20 16:41:30.383336763 +0200
    +++ advanced-
   post-slider.php 2015-08-20 16:57:30.735836107 +0200 @@ -19,7 +19,7 @@ require‘
   advps-admin.php’; }
 * – define(‘advps_url’,WP_PLUGIN_URL.”/advanced-post-slider/”);
    + define(‘advps_url’,
   plugins_url(‘/’,__FILE__));
 *  require ‘advps-db.php’;
 * @@ -61,8 +61,8 @@
 *  /* —————————————————————————————*/
 * – register_activation_hook(WP_PLUGIN_DIR.’/advanced-post-slider/advanced-post-
   slider.php’,’set_advps_options’);
    – register_deactivation_hook(WP_PLUGIN_DIR.’/
   advanced-post-slider/advanced-post-slider.php’,’unset_advps_options’); + register_activation_hook(
   advps_url.’advanced-post-slider.php’,’set_advps_options’); + register_deactivation_hook(
   advps_url.’advanced-post-slider.php’,’unset_advps_options’);
 *  function unset_advps_options(){
 * [https://wordpress.org/plugins/advanced-post-slider/](https://wordpress.org/plugins/advanced-post-slider/)

The topic ‘version 2.3.4 patch – correct plugin path construction’ is closed to 
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/advanced-post-slider_b6b7a3.svg)
 * [Advanced post slider](https://wordpress.org/plugins/advanced-post-slider/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-post-slider/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-post-slider/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-post-slider/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-post-slider/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-post-slider/reviews/)

## Tags

 * [HTTPS](https://wordpress.org/support/topic-tag/https/)

 * 0 replies
 * 1 participant
 * Last reply from: [petrch](https://wordpress.org/support/users/petrch/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/version-234-patch-correct-plugin-path-construction/)
 * Status: not resolved