• Resolved dosser

    (@dosser)


    Hello,

    First of all, thanks for the superb plugin. Apologies if this has already been answered (did try searching/reviewing old threads here, but couldn’t find the answer).

    I have successfully created a chart (that renders fine in the frontend of our site). However, I wish to render this on the backend/wp-admin section of our site (in another plugin). When I try to include it, I can see that the Visualizer scripts are not being loaded (e.g. there is no ‘visualizer/js/render.js’ – which is normally present in the frontend). I assume it is possible to render the charts on the admin section (these scripts are loaded in the media section i.e. ‘upload.php?page=visualizer’).

    Here is the code I have tried –

    First in the main page of my custom plugin (admin.php)

    add_action(‘plugins_loaded’,’testLoadPlugin’);

    function testLoadPlugin(){
    
    if (class_exists('Visualizer_Plugin')) {
         
    spl_autoload_register( 'visualizer_autoloader' );
    
    visualizer_launch();
    
     }
    }
    

    In the plugin template page:

    echo do_shortcode('[visualizer id="6659"]');

    Any advice on how to get the charts working within wp-admin? Is it a namespace issue?

    Thanks in advance

Viewing 1 replies (of 1 total)
  • Plugin Author WPShout

    (@codeinwp)

    Hey @dosser,

    For the moment yes, this is not really working, but we will try to fix it in the future.

    Thank you for reporting this.

Viewing 1 replies (of 1 total)

The topic ‘Including in wp-admin’ is closed to new replies.