Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WP Easy Updates - required notification
<?php // <- You probably don't need this line
/**
* Show WP Easy Updates required admin notification.
*/
if(is_admin()){
if (!function_exists('ayecode_show_update_plugin_requirement')) {//only load the update file if needed
function ayecode_show_update_plugin_requirement() {
if ( !defined( 'WP_EASY_UPDATES_ACTIVE' ) ) {
?>
<div class="notice notice-warning is-dismissible">
<p>
<strong>
<?php
echo sprintf( __( 'The plugin %sWP Easy Updates%s is required to check for and update some installed plugins/themes, please install it now.', 'geodirectory' ), '<a href="https://wpeasyupdates.com/" target="_blank" title="WP Easy Updates">', '</a>' );
?>
</strong>
</p>
</div>
<?php
}
}
add_action( 'admin_notices', 'ayecode_show_update_plugin_requirement' );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment