gtm4wp_show_upgrade_notification

The WordPress Core gtm4wp show upgrade notification function.

Description

gtm4wp_show_upgrade_notification( $current_plugin_metadata, $new_plugin_metadata ); 

Parameters (2)

0. $current_plugin_metadata
The current plugin metadata.
1. $new_plugin_metadata
The new plugin metadata.

Usage

  1. if ( !function_exists( 'gtm4wp_show_upgrade_notification' ) ) { 
  2. require_once '/admin/admin.php'; 
  3.  
  4. // The current plugin metadata. 
  5. $current_plugin_metadata = null; 
  6.  
  7. // The new plugin metadata. 
  8. $new_plugin_metadata = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = gtm4wp_show_upgrade_notification($current_plugin_metadata, $new_plugin_metadata); 
  12.  

Defined (1)

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

/admin/admin.php  
  1. function gtm4wp_show_upgrade_notification( $current_plugin_metadata, $new_plugin_metadata ) { 
  2. if ( isset( $new_plugin_metadata->upgrade_notice ) && strlen( trim( $new_plugin_metadata->upgrade_notice ) ) > 0 ) { 
  3. echo '<p style="background-color: #d54e21; padding: 10px; color: #f9f9f9; margin-top: 10px"><strong>Important Upgrade Notice:</strong> '; 
  4. echo esc_html($new_plugin_metadata->upgrade_notice), '</p>';