ddw_gftb_plugin_get_data

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

Description

(string) ddw_gftb_plugin_get_data( $gftb_plugin_value ); 

Returns (string)

String of plugin data.

Parameters (1)

0. $gftb_plugin_value
The gftb plugin value.

Usage

  1. if ( !function_exists( 'ddw_gftb_plugin_get_data' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'gravity-forms-toolbar/gravity-forms-toolbar.php'; 
  3.  
  4. // The gftb plugin value. 
  5. $gftb_plugin_value = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = ddw_gftb_plugin_get_data($gftb_plugin_value); 
  9.  

Defined (1)

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

/gravity-forms-toolbar.php  
  1. function ddw_gftb_plugin_get_data( $gftb_plugin_value ) { 
  2.  
  3. /** Bail early if we are not in wp-admin */ 
  4. if ( ! is_admin() ) { 
  5.  
  6. return; 
  7.  
  8. } // end if 
  9.  
  10. /** Include WordPress plugin data */ 
  11. if ( ! function_exists( 'get_plugins' ) ) { 
  12.  
  13. require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); 
  14.  
  15. } // end if 
  16.  
  17. $gftb_plugin_folder = get_plugins( '/' . plugin_basename( dirname( __FILE__ ) ) ); 
  18. $gftb_plugin_file = basename( ( __FILE__ ) ); 
  19.  
  20. return $gftb_plugin_folder[ $gftb_plugin_file ][ $gftb_plugin_value ]; 
  21.  
  22. } // end of function ddw_gftb_plugin_get_data