ddwpinfo_detect_active_plugins

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

Description

ddwpinfo_detect_active_plugins(); 

Usage

  1. if ( !function_exists( 'ddwpinfo_detect_active_plugins' ) ) { 
  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_detect_active_plugins(); 
  7.  

Defined (1)

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

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