| Server IP : 34.67.85.211 / Your IP : 216.73.217.52 Web Server : Apache System : Linux wordpress-1-vm 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64 User : root ( 0) PHP Version : 7.4.9 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /var/www/html/wp-content/plugins/kirki/ |
Upload File : |
<?php
/**
* Adds upgrade notifications.
*
* @package Kirki
* @category Core
* @author Ari Stathopoulos (@aristath)
* @copyright Copyright (c) 2020, David Vongries
* @license https://opensource.org/licenses/MIT
* @since 3.0.0
*/
if ( ! function_exists( 'kirki_show_upgrade_notification' ) ) :
/**
* Fires at the end of the update message container in each
* row of the plugins list table.
* Allows us to add important notices about updates should they be needed.
* Notices should be added using "== Upgrade Notice ==" in readme.txt.
*
* @since 2.3.8
* @param array $plugin_data An array of plugin metadata.
* @param array $response An array of metadata about the available plugin update.
*/
function kirki_show_upgrade_notification( $plugin_data, $response ) {
// Check "upgrade_notice".
if ( isset( $response->upgrade_notice ) && strlen( trim( $response->upgrade_notice ) ) > 0 ) : ?>
<style>.kirki-upgrade-notification {background-color:#d54e21;padding:10px;color:#f9f9f9;margin-top:10px;margin-bottom:10px;}.kirki-upgrade-notification + p {display:none;}</style>
<div class="kirki-upgrade-notification">
<strong><?php esc_html_e( 'Important Upgrade Notice:', 'kirki' ); ?></strong>
<?php $upgrade_notice = wp_strip_all_tags( $response->upgrade_notice ); ?>
<?php echo esc_html( $upgrade_notice ); ?>
</div>
<?php
endif;
}
endif;
add_action( 'in_plugin_update_message-' . plugin_basename( __FILE__ ), 'kirki_show_upgrade_notification', 10, 2 );