ngg_ajax_dashboard

The NextCellent Gallery ngg ajax dashboard function.

Description

ngg_ajax_dashboard(); 

Usage

  1. if ( !function_exists( 'ngg_ajax_dashboard' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'nextcellent-gallery/admin/ajax.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = ngg_ajax_dashboard(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/admin/ajax.php  
  1. function ngg_ajax_dashboard() { 
  2.  
  3. require_once( dirname( dirname(__FILE__) ) . '/admin/class-ngg-admin-launcher.php'); 
  4. require_once( dirname( dirname(__FILE__) ) . '/admin/class-ngg-overview.php'); 
  5.  
  6. if ( !current_user_can('NextGEN Gallery overview') ) 
  7. die('-1'); 
  8.  
  9. @header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) ); 
  10. @header( 'X-Content-Type-Options: nosniff' ); 
  11.  
  12. switch ( $_GET['jax'] ) { 
  13.  
  14. case 'dashboard_primary' : 
  15. NGG_Overview::ngg_overview_news(); 
  16. break; 
  17.  
  18. case 'dashboard_plugins' : 
  19. NGG_Overview::ngg_related_plugins(); 
  20. break; 
  21.  
  22. die();