- check versions, add transient

This commit is contained in:
ashubawork
2023-04-10 17:46:25 +03:00
parent 00dd3d6b9f
commit 42337c440a
4 changed files with 96 additions and 6 deletions
@@ -52,6 +52,8 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
$this->extensions_page();
$this->template_version();
// removed for now to avoid the bad reviews
//$this->reviews_notice();
@@ -714,6 +716,31 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
}
public function template_version() {
if ( true === (bool) get_option( 'um_template_version' ) ) {
$link = get_admin_url( null, 'admin.php?page=um_options&tab=override_templates' );
ob_start();
?>
<p>
<?php printf( __( 'Your templates are out of date. Please visit <a href="%s">override templates status page</a> and update templates', 'ultimate-member' ), $link ); ?>
</p>
<?php
$message = ob_get_clean();
UM()->admin()->notices()->add_notice(
'um_private_content_notice',
array(
'class' => 'error',
'message' => $message,
'dismissible' => false,
),
10
);
}
}
function dismiss_notice() {
UM()->admin()->check_ajax_nonce();