Viewing 1 replies (of 1 total)
  • Thread Starter OllieJones

    (@olliejones)

    This change to tcpmem.php fixes the information warning.

    // Add script-registration action
    add_action( 'init', 'tcpmem_enqueue_scripts' );
    
    function tcpmem_enqueue_scripts () {
        // Register scripts and styles
        wp_register_script('tpcmem', plugins_url('tpc-memory-usage/js/tpcmem.js'), array('jquery'), TPCMEM_VERSION, true);
        wp_register_script('tpcmem-overview', plugins_url('tpc-memory-usage/js/overview.js'), array('jquery-ui-tabs'), TPCMEM_VERSION, true);
        wp_register_script('tpcmem-tablesorter', plugins_url('tpc-memory-usage/js/jquery.tablesorter.min.js'), array('jquery'), '2.0.3', true);
        wp_register_script('tpcmem-reports', plugins_url('tpc-memory-usage/js/reports.js'), array('tpcmem-tablesorter'), TPCMEM_VERSION, true);
        wp_register_style('tpcmem', plugins_url('tpc-memory-usage/css/tpcmem.css'), array(), TPCMEM_VERSION);
    }

    Note that the dashboard doesn’t work correctly if you use

    add_action( 'wp_enqueue_scripts', 'tcpmem_enqueue_scripts' );

    instead of

    add_action( 'init', 'tcpmem_enqueue_scripts' );

Viewing 1 replies (of 1 total)
  • The topic ‘Getting an info message’ is closed to new replies.