WordPress.org

Support

Support » Plugins and Hacks » simple iframe into admin panel google charts

simple iframe into admin panel google charts

  • Hi i want to put a iframe with: http://imagecharteditor.appspot.com (google chart generator). There are some options…

    Either put it in “dashboard”, linked as a menu item in the admin menu(bottom) or as a menu item in “tools” menu.

    How do i do this?
    Do i have to create a plugin?

    Cheers

Viewing 1 replies (of 1 total)
  • Solved this. Instead of putting it in a plugin i just put it in the Dashboard. Put this in custom-functions.php or functions.php in your theme:

    // Create the function to output the contents of our Dashboard Widget
    function iframe_dashboard_widget_function() {
        // Display whatever it is you want to show
        echo '<iframe src="http://imagecharteditor.appspot.com/" width="100%" height="1000px" frameBorder="0">Browser not compatible.</iframe>';
    }
    
    // Create the function use in the action hook
    function example_add_dashboard_widgets() {
        wp_add_dashboard_widget('iframe_dashboard_widget', 'Google Charts', 'iframe_dashboard_widget_function');
    }
    
    // Hook into the 'wp_dashboard_setup' action to register our other functions
    add_action('wp_dashboard_setup', 'example_add_dashboard_widgets' );

Viewing 1 replies (of 1 total)
  • The topic ‘simple iframe into admin panel google charts’ is closed to new replies.