gde_get_plugin_data

Get plugin data.

Description

(array) gde_get_plugin_data(); 

Returns (array)

Array of plugin data parsed from main plugin file


Usage

  1. if ( !function_exists( 'gde_get_plugin_data' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-doc-embedder/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = gde_get_plugin_data(); 
  7.  

Defined (1)

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

/functions.php  
  1. function gde_get_plugin_data() { 
  2. $mainfile = 'gviewer.php'; 
  3. $slug = 'google-document-embedder'; 
  4.  
  5. if ( ! function_exists( 'get_plugin_data' ) ) { 
  6. require_once( ABSPATH . '/wp-admin/includes/plugin.php' ); 
  7. $plugin_data = get_plugin_data( GDE_PLUGIN_DIR . $mainfile ); 
  8.  
  9. // add custom data (lowercase to avoid any future conflicts) 
  10. $plugin_data['slug'] = $slug; 
  11. $plugin_data['mainfile'] = $mainfile; 
  12. $plugin_data['basename'] = $plugin_data['slug'] . "/" . $mainfile; 
  13.  
  14. return $plugin_data;