WordPress.org

Ready to get started?Download WordPress

Forums

Royal PrettyPhoto
Fix Suggestion (1 post)

  1. lenasterg
    Member
    Posted 1 year ago #

    Hi.
    Thanks for the great plugin.
    A small annoying bug.
    When trying it with WP_DEBUG enable the plugin throws an Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or init hooks

    in order to fix this juct move the ~47-55 lines of rt-prettyphoto.php

    /* Adding plugin javascript active file */
        wp_enqueue_script('rt-wpp-plugin-active', RT_WPP_PLUGIN_PATH . 'js/jquery.prettyPhoto.js', array('jquery'));
        /* Adding plugin javascript active file */
        wp_enqueue_script('rt-wpp-plugin-script-active', RT_WPP_PLUGIN_PATH . 'js/wpp-active.js', array('jquery'));
    
        /* Adding Plugin custm CSS file */
        wp_enqueue_style('rt-wpp-plugin-style', RT_WPP_PLUGIN_PATH . 'css/prettyPhoto.css');

    inside the function rt_wpp_latest_jquery().
    Actually from this function you should delete the
    wp_enqueue_script('jquery'); , cause you don't need to do this.

    Bests Lena

    http://wordpress.org/plugins/rt-prettyphoto/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic