ddwpinfo_active_plugins_dashboard

Helper function to check for all supported plugins, that are currently active, and putting out a list of them - for the Dashboard.

Description

ddwpinfo_active_plugins_dashboard(); 

Usage

  1. if ( !function_exists( 'ddwpinfo_active_plugins_dashboard' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-german-de_de/includes/ddwpinfo/ddwpinfo-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = ddwpinfo_active_plugins_dashboard(); 
  7.  

Defined (1)

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

/includes/ddwpinfo/ddwpinfo-functions.php  
  1. function ddwpinfo_active_plugins_dashboard() { 
  2.  
  3. /** Array of supported plugins */ 
  4. $plugins_list = (array) ddwpinfo_supported_language_plugins(); 
  5.  
  6. /** List items */ 
  7. foreach ( $plugins_list as $plugin => $plugin_id ) { 
  8.  
  9. /** Only for active plugins */ 
  10. if ( defined( $plugin_id[ 'key' ] ) ) { 
  11.  
  12. $output = '<li class="ddwpinfo-global-icon"><a href="' . esc_url_raw( $plugin_id[ 'aurl' ] ) . '" title="' . esc_html__( $plugin_id[ 'label' ] ) . '">' . $plugin_id[ 'short' ] . '</a></li>'; 
  13.  
  14. echo $output; 
  15.  
  16. } // end if 
  17.  
  18. } // end foreach 
  19.  
  20. } // end of function ddwpinfo_active_plugins_dashboard