retlehs/roots — Issue #170: Root Relative URLs conflict with Plugins
Author: thelbc
Created: 2011-11-08 12:24:44+00:00
State: open

I have a problem with the plugin WP-Polls, it seems that the path to the CSS file is somehow doubled.

When I switch off Root Relative URLs, the problem disappear.

The path to the css is :

and should be :

How can I fix this problem ?

'''php

### Function: Enqueue Polls JavaScripts/CSS
add_action('wp_enqueue_scripts', 'poll_scripts');
function poll_scripts() {
global $text_direction;
if(@file_exists(TEMPLATEPATH.'/polls-css.css')) {
wp_enqueue_style('wp-polls', get_stylesheet_directory_uri().'/polls-css.css', false, '2.50', 'all');
} else {
wp_enqueue_style('wp-polls', plugins_url('wp-polls/polls-css.css'), false, '2.50', 'all');
}
if('rtl' == $text_direction) {
if(@file_exists(TEMPLATEPATH.'/polls-css-rtl.css')) {
wp_enqueue_style('wp-polls-rtl', get_stylesheet_directory_uri().'/polls-css-rtl.css', false, '2.50', 'all');
} else {
wp_enqueue_style('wp-polls-rtl', plugins_url('wp-polls/polls-css-rtl.css'), false, '2.50', 'all');
}
}
'''