ddw_wcde_plugin_get_data

Returns current plugin's header data in a flexible way.

Description

(string) ddw_wcde_plugin_get_data( $wcde_plugin_value ); 

Only used and loaded within /wp-admin/..

Returns (string)

String of plugin data.

Parameters (1)

0. $wcde_plugin_value
The wcde plugin value.

Usage

  1. if ( !function_exists( 'ddw_wcde_plugin_get_data' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-german-de_de/woocommerce-de.php'; 
  3.  
  4. // The wcde plugin value. 
  5. $wcde_plugin_value = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = ddw_wcde_plugin_get_data($wcde_plugin_value); 
  9.  

Defined (1)

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

/woocommerce-de.php  
  1. function ddw_wcde_plugin_get_data( $wcde_plugin_value ) { 
  2.  
  3. /** Bail early if we are not it wp-admin */ 
  4. if ( ! is_admin() ) { 
  5. return; 
  6.  
  7. /** Include WordPress plugin data */ 
  8. if ( ! function_exists( 'get_plugins' ) ) { 
  9.  
  10. require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); 
  11.  
  12. } // end if 
  13.  
  14. /** Get plugin folder/ file */ 
  15. $wcde_plugin_folder = get_plugins( '/' . plugin_basename( dirname( __FILE__ ) ) ); 
  16. $wcde_plugin_file = basename( ( __FILE__ ) ); 
  17.  
  18. /** Return the value */ 
  19. return $wcde_plugin_folder[ $wcde_plugin_file ][ $wcde_plugin_value ]; 
  20.  
  21. } // end of function ddw_wcde_plugin_get_data