Skip to content

Instantly share code, notes, and snippets.

@Stiofan
Last active April 28, 2017 15:02
Show Gist options
  • Save Stiofan/d8f5b5aa3922cfb46928966e75424c11 to your computer and use it in GitHub Desktop.
Save Stiofan/d8f5b5aa3922cfb46928966e75424c11 to your computer and use it in GitHub Desktop.
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