The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Royal PrettyPhoto
Fix Suggestion (1 post)

  1. lenasterg
    Posted 3 years ago #

    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


Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic