[wp-trac] [WordPress Trac] #26090: plugins_url() breaks on non-default WP_CONTENT_DIR

WordPress Trac noreply at wordpress.org
Sun Nov 17 19:50:14 UTC 2013


#26090: plugins_url() breaks on non-default WP_CONTENT_DIR
--------------------------+-----------------------------
 Reporter:  kanuck54      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Plugins       |    Version:  trunk
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 I noticed that both the VaultPress and Regenerate Thumbnails plugins were
 suddenly failing to load their stylesheets upon updating from WordPress
 3.5.x to WordPress 3.7.2.

 A quick look at the stylesheet URLs revealed a problem:

 {{{
 <link rel='stylesheet' id='vaultpress-nav-css'  href='http://server.com
 /wp-content/plugins/srv/www/application/dist/www/wp-
 content/plugins/vaultpress/nav-styles.css?ver=20131117' type='text/css'
 media='all' />
 }}}

 The full absolute file path to the stylesheet is being inserted into the
 URL (it should just be
 `http://server.com/wp-content/plugins/vaultpress/nav-
 styles.css?ver=20131117` without the superfluous
 `/srv/www/application/dist/www/wp-content/plugins`).

 Both plugins enqueue stylesheets the same way:

 {{{
 wp_enqueue_style( 'vaultpress-nav', plugins_url( '/nav-styles.css',
 __FILE__ ), false, date( 'Ymd' ) );
 }}}

 It seems that somewhere between 3.5.x and 3.7.2, that `plugins_url()`
 function call stopped working as intended.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/26090>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list