WordPress.org

Ready to get started?Download WordPress

Forums

Explanatory Dictionary
A Few Bug Fixes for the Next Release (2 posts)

  1. Baden
    Member
    Posted 2 years ago #

    Hey-hey.

    Just installed your plugin on one of our dev servers with debug mode on and there where a number of errors. This is how we fixed them:

    explanatory-dictionary.php line 476: wp_enqueue_script should be called on init like so:

    function expdicInit() {
    	global $explanatory_dictionary_plugin_url;
    	wp_enqueue_script('jquery');
    	wp_register_script('explanatory_dictionary_scripts', $explanatory_dictionary_plugin_url.'javascript/scripts.js',array('jquery'));
    	wp_enqueue_script('explanatory_dictionary_scripts');
    }
    add_action('init', 'expdicInit');

    explanatory-dictionary-options.php lines 10 and 70: should always check to see a variable is set before checking it's value:
    line 10

    if(isset($_POST["action"]) && $_POST["action"]=="save"){

    line 70

    }elseif(isset($_POST["action"]) && $_POST["action"]=="reset"){

    Of course the plugin works fine as long as debug mode is not turned on... just a few helpful tips.

    Cheers!

    http://wordpress.org/extend/plugins/explanatory-dictionary/

  2. EXED internet
    Member
    Plugin Author

    Posted 1 year ago #

    Hello Baden,

    I've recently taken over the development of this plugin and one thing I am doing is rewriting the code.

    So in the next version all of this will be cleaned up and won't spout any warnings/errors when WP_DEBUG is set to true

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic