gde_warn_on_plugin_page

Display beta status.

Description

gde_warn_on_plugin_page( $plugin_file ); 

Parameters (1)

0. $plugin_file
The plugin file.

Usage

  1. if ( !function_exists( 'gde_warn_on_plugin_page' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-doc-embedder/functions-admin.php'; 
  3.  
  4. // The plugin file. 
  5. $plugin_file = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = gde_warn_on_plugin_page($plugin_file); 
  9.  

Defined (1)

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

/functions-admin.php  
  1. function gde_warn_on_plugin_page( $plugin_file ) { 
  2. global $pdata; 
  3.  
  4. if ( strstr( $plugin_file, $pdata['mainfile'] ) ) { 
  5.  
  6. // see if there's a release waiting first (prevent double messages) 
  7. $updates = (array) get_site_option( '_site_transient_update_plugins' ); 
  8. if ( isset( $updates['response'] ) && array_key_exists( $pdata['basename'], $updates['response'] ) ) { 
  9. return; 
  10.  
  11. if ( gde_is_beta() ) { 
  12. $message[] = __('You are running a pre-release version of Google Doc Embedder. Please watch this space for important updates.', 'google-document-embedder'); 
  13. } else { 
  14. $message = array(); 
  15.  
  16. // print message if any 
  17. $message = rtrim( implode( " ", $message ) ); 
  18. if ( ! empty( $message ) ) { 
  19. // style improvements?? 
  20. //add_action( 'admin_enqueue_scripts', 'gde_admin_beta_js' ); 
  21.  
  22. print(' 
  23. <tr class="plugin-update-tr"> 
  24. <td colspan="3" class="plugin-update colspanchange"> 
  25. <div class="update-message" style="background:#e3e3e3;"> 
  26. '.$message.' 
  27. </div> 
  28. </td> 
  29. </tr> 
  30. ');