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
if ( !function_exists( 'gde_warn_on_plugin_page' ) ) { require_once ABSPATH . PLUGINDIR . 'google-doc-embedder/functions-admin.php'; } // The plugin file. $plugin_file = null; // NOTICE! Understand what this does before running. $result = gde_warn_on_plugin_page($plugin_file);
Defined (1)
The function is defined in the following location(s).
- /functions-admin.php
- function gde_warn_on_plugin_page( $plugin_file ) {
- global $pdata;
- if ( strstr( $plugin_file, $pdata['mainfile'] ) ) {
- // see if there's a release waiting first (prevent double messages)
- $updates = (array) get_site_option( '_site_transient_update_plugins' );
- if ( isset( $updates['response'] ) && array_key_exists( $pdata['basename'], $updates['response'] ) ) {
- return;
- }
- if ( gde_is_beta() ) {
- $message[] = __('You are running a pre-release version of Google Doc Embedder. Please watch this space for important updates.', 'google-document-embedder');
- } else {
- $message = array();
- }
- // print message if any
- $message = rtrim( implode( " ", $message ) );
- if ( ! empty( $message ) ) {
- // style improvements??
- //add_action( 'admin_enqueue_scripts', 'gde_admin_beta_js' );
- print('
- <tr class="plugin-update-tr">
- <td colspan="3" class="plugin-update colspanchange">
- <div class="update-message" style="background:#e3e3e3;">
- '.$message.'
- </div>
- </td>
- </tr>
- ');
- }
- }
- }