diff --git a/includes/admin/class-admin.php b/includes/admin/class-admin.php index 626d35d4..5db21566 100644 --- a/includes/admin/class-admin.php +++ b/includes/admin/class-admin.php @@ -1870,6 +1870,11 @@ if ( ! class_exists( 'um\admin\Admin' ) ) { } + /** + * Manual check templates versions + * + * @param $action + */ public function check_version( $action ) { $templates = UM()->admin_settings()->get_override_templates( true ); $out_date = false; diff --git a/includes/admin/core/class-admin-notices.php b/includes/admin/core/class-admin-notices.php index 34745cd8..dd4277d3 100644 --- a/includes/admin/core/class-admin-notices.php +++ b/includes/admin/core/class-admin-notices.php @@ -716,6 +716,9 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) { } + /** + * Check Templates Versions notice + */ 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' ); @@ -723,7 +726,10 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) { ?>
- override templates status page and update templates', 'ultimate-member' ), $link ); ?> + override templates status page and update templates', 'ultimate-member' ), $link ), UM()->get_allowed_html( 'admin_notice' ) ); + ?>
@@ -3055,11 +3061,16 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) { } + /** + * @param $get_list boolean + * + * @return array + */ public function get_override_templates( $get_list = false ) { $outdated_files = array(); $scan_files = $this->scan_template_files( um_path . '/templates/' ); $out_date = false; - set_transient( 'um_check_template_versions', current_time('d/m/Y H:i' ), 12 * HOUR_IN_SECONDS ); + set_transient( 'um_check_template_versions', current_time( 'd/m/Y H:i' ), 12 * HOUR_IN_SECONDS ); foreach ( $scan_files as $key => $file ) { if ( ! str_contains( $file, 'email/' ) ) { if ( file_exists( get_stylesheet_directory() . '/ultimate-member/templates/' . $file ) ) { @@ -3139,6 +3150,11 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) { } + /** + * @param $file string + * + * @return string + */ public static function get_file_version( $file ) { // Avoid notices if file does not exist. diff --git a/templates/account.php b/templates/account.php index f252d580..48e77697 100644 --- a/templates/account.php +++ b/templates/account.php @@ -1,8 +1,20 @@ +if ( ! defined( 'ABSPATH' ) ) { + exit; +} ?>