Support » Plugin: UnPointZero Slider » wp-content url hardcoded

  • Resolved Matija P.

    (@korvus-sangril)


    Hi there,

    My problem was that your plugin’s javascript didn’t worked but content was nevertheless displayed – all of it at once, which looked ugly. Figured out it was because of hardcoded “/wp-content/plugins/” path into upzSlider.php all over the place, and I don’t have wp-content as my default content folder (for security reasons). Resolved it by rewritting your code parts:
    wp_enqueue_script(‘example’, get_bloginfo(‘wpurl’) . ‘/wp-content/plugins/unpointzero-slider/example/blabla.js’);
    to look like this:
    wp_enqueue_script(‘example’, plugins_url() . ‘/unpointzero-slider/example/blabla.js’);

    Hope you will recode it in next update so it doesn’t broke 🙂

    Matija

    http://wordpress.org/extend/plugins/unpointzero-slider/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author UnPointZero

    (@unpointzero)

    Thank you man ! Will fix it on the next update :).

    C ya !

    while we are at it, can we add something that lets me customize the css without it being overwritten on the next update ?

    i.e something like:

    if (file_exists( get_template_directory() . '/upz-style.css')){
    	wp_register_style($this->pluginSlug, get_template_directory_uri().'/upz-style.css', array(), $this->pluginVersion);
    }else{
    	wp_register_style($this->pluginSlug, plugins_url( 'css/slider.css', __FILE__ ), array(), $this->pluginVersion);
    }
    wp_enqueue_style($this->pluginSlug);

    or similar ?

    thanks

    never mind the fact that the stylesheet should be enqueued to start off with….!!!

    and another thing 🙂

    if you must output css directly on a page as opposed to in a css file,
    you might want to consider changing

    $vnumber = get_option('slider-view-number');
    for($s=0;$s<$vnumber;$s++) {
    echo ".upzslider #fragment-$s { height:$featured_height !important; width:$featured_width !important; }";
    }

    to just

    echo ".upzslider>div { height:$featured_height !important; width:$featured_width !important; }";

    does the same job without generating loads of identical code for every slide there might be

    or better still give it a class…and get rid of the empty style attribute (what’s that doing there anyway ?)

    Plugin Author UnPointZero

    (@unpointzero)

    ollybach,

    Thanks for all your suggestions I currently added them to the new “minor” version :).

    Next one will be Responsive slider and parallax options =).

    C ya !

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘wp-content url hardcoded’ is closed to new replies.