- add comments to templates

This commit is contained in:
ashubawork
2023-04-11 16:25:25 +03:00
parent 879290aa90
commit 871c0412b4
28 changed files with 307 additions and 23 deletions
+5
View File
@@ -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;
+7 -1
View File
@@ -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' ) ) {
?>
<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 ); ?>
<?php
// translators: %s override templates page link.
echo wp_kses( sprintf( __( 'Your templates are out of date. Please visit <a href="%s">override templates status page</a> and update templates', 'ultimate-member' ), $link ), UM()->get_allowed_html( 'admin_notice' ) );
?>
</p>
<?php
@@ -3028,6 +3028,12 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
}
/**
* @param $html
* @param $section_fields
*
* @return string
*/
public function settings_override_templates_tab( $html, $section_fields ) {
$um_check_version = get_transient( 'um_check_template_versions' );
?>
@@ -3055,6 +3061,11 @@ 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/' );
@@ -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.
+13 -1
View File
@@ -1,8 +1,20 @@
<?php
/**
* Template for the account page
*
* This template can be overridden by copying it to yourtheme/ultimate-member/account.php
*
* Page: "Account"
*
* @version 1.0.0
*
* @var string $mode
* @var int $form_id
* @var array $args
*/
if ( ! defined( 'ABSPATH' ) ) exit; ?>
if ( ! defined( 'ABSPATH' ) ) {
exit;
} ?>
<div class="um <?php echo esc_attr( $this->get_class( $mode ) ); ?> um-<?php echo esc_attr( $form_id ); ?>">
+10
View File
@@ -1,6 +1,16 @@
<?php
/**
* Template for the GDPR checkbox in register form
*
* This template can be overridden by copying it to yourtheme/ultimate-member/gdpr-register.php
*
* Page: "Register"
* Call: function display_option()
*
* @version 1.0.0
*
* @var object $um_content_query
* @var array $args
*/
if ( ! defined( 'ABSPATH' ) ) exit; ?>
+11 -1
View File
@@ -1,8 +1,18 @@
<?php
/**
* Template for the login only content, locked message
*
* This template can be overridden by copying it to yourtheme/ultimate-member/login-to-view.php
*
* Call: function um_loggedin()
*
* @version 1.0.0
*
* @var string $lock_text
*/
if ( ! defined( 'ABSPATH' ) ) exit; ?>
if ( ! defined( 'ABSPATH' ) ) {
exit;
} ?>
<div class="um-locked-content">
+13 -1
View File
@@ -1,8 +1,20 @@
<?php
/**
* Template for the login form
*
* This template can be overridden by copying it to yourtheme/ultimate-member/login.php
*
* Page: "Login"
*
* @version 1.0.0
*
* @var string $mode
* @var int $form_id
* @var array $args
*/
if ( ! defined( 'ABSPATH' ) ) exit; ?>
if ( ! defined( 'ABSPATH' ) ) {
exit;
} ?>
<div class="um <?php echo esc_attr( $this->get_class( $mode ) ); ?> um-<?php echo esc_attr( $form_id ); ?>">
+13 -1
View File
@@ -1,8 +1,20 @@
<?php
/**
* Template for the logout
*
* This template can be overridden by copying it to yourtheme/ultimate-member/logout.php
*
* Page: "Logout"
*
* @version 1.0.0
*
* @var string $mode
* @var int $form_id
* @var array $args
*/
if ( ! defined( 'ABSPATH' ) ) exit; ?>
if ( ! defined( 'ABSPATH' ) ) {
exit;
} ?>
<div class="um <?php echo esc_attr( $this->get_class( $mode, $args ) ); ?> um-<?php echo esc_attr( $form_id ); ?>">
+20 -1
View File
@@ -1,8 +1,27 @@
<?php
/**
* Template for the members directory grid
*
* This template can be overridden by copying it to yourtheme/ultimate-member/members-grid.php
*
* Page: "Members"
*
* @version 1.0.0
*
* @var array $args
* @var bool $cover_photos
* @var bool $profile_photo
* @var bool $show_name
* @var bool $show_tagline
* @var bool $show_userinfo
* @var bool $userinfo_animate
* @var bool $show_social
* @var array $reveal_fields
* @var string $no_users
*/
if ( ! defined( 'ABSPATH' ) ) exit;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$unique_hash = substr( md5( $args['form_id'] ), 10, 5 ); ?>
+9 -1
View File
@@ -1,8 +1,16 @@
<?php
/**
* Template for the members directory header JS-template
*
* This template can be overridden by copying it to yourtheme/ultimate-member/members-header.php
*
* Page: "Members"
*
* @version 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) exit; ?>
if ( ! defined( 'ABSPATH' ) ) {
exit;
} ?>
<script type="text/template" id="tmpl-um-members-header">
+17
View File
@@ -1,6 +1,23 @@
<?php
/**
* Template for the members directory list
*
* This template can be overridden by copying it to yourtheme/ultimate-member/members-list.php
*
* Page: "Members"
*
* @version 1.0.0
*
* @var array $args
* @var bool $cover_photos
* @var bool $profile_photo
* @var bool $show_name
* @var bool $show_tagline
* @var bool $show_userinfo
* @var bool $userinfo_animate
* @var bool $show_social
* @var array $reveal_fields
* @var string $no_users
*/
if ( ! defined( 'ABSPATH' ) ) exit;
+9 -1
View File
@@ -1,8 +1,16 @@
<?php
/**
* Template for the members directory pagination JS template
*
* This template can be overridden by copying it to yourtheme/ultimate-member/members-pagination.php
*
* Page: "Members"
*
* @version 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) exit; ?>
if ( ! defined( 'ABSPATH' ) ) {
exit;
} ?>
<script type="text/template" id="tmpl-um-members-pagination">
+11 -1
View File
@@ -1,8 +1,18 @@
<?php
/**
* Template for the members directory
*
* This template can be overridden by copying it to yourtheme/ultimate-member/members.php
*
* Page: "Members"
*
* @version 1.0.0
*
* @var array $args
*/
if ( ! defined( 'ABSPATH' ) ) exit;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
global $post;
+12 -1
View File
@@ -1,8 +1,19 @@
<?php
/**
* Template for the message after registration process
*
* This template can be overridden by copying it to yourtheme/ultimate-member/message.php
*
* Call: function parse_shortcode_args()
*
* @version 1.0.0
*
* @var string $mode
* @var int $form_id
*/
if ( ! defined( 'ABSPATH' ) ) exit; ?>
if ( ! defined( 'ABSPATH' ) ) {
exit;
} ?>
<div class="um <?php echo esc_attr( $this->get_class( $mode ) ); ?> um-<?php echo esc_attr( $form_id ); ?>">
+7 -1
View File
@@ -1,7 +1,13 @@
<?php
/**
* Template for the modal form
*
* This template can be overridden by copying it to yourtheme/ultimate-member/modal/um_upload_single.php
*
* @version 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) exit; ?>
if ( ! defined( 'ABSPATH' ) ) {
exit;
} ?>
<div id="um_upload_single" style="display:none"></div>
+7 -1
View File
@@ -1,8 +1,14 @@
<?php
/**
* Template for the modal photo
*
* This template can be overridden by copying it to yourtheme/ultimate-member/modal/um_view_photo.php
*
* @version 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) exit; ?>
if ( ! defined( 'ABSPATH' ) ) {
exit;
} ?>
<div id="um_view_photo" style="display:none">
+14 -1
View File
@@ -1,8 +1,21 @@
<?php
/**
* Template for the password change
*
* This template can be overridden by copying it to yourtheme/ultimate-member/password-change.php
*
* Call: function ultimatemember_password()
*
* @version 1.0.0
*
* @var string $mode
* @var string $rp_key
* @var int $form_id
* @var array $args
*/
if ( ! defined( 'ABSPATH' ) ) exit; ?>
if ( ! defined( 'ABSPATH' ) ) {
exit;
} ?>
<div class="um <?php echo esc_attr( $this->get_class( $mode ) ); ?> um-<?php echo esc_attr( $form_id ); ?>">
+10
View File
@@ -1,6 +1,16 @@
<?php
/**
* Template for the password reset
*
* This template can be overridden by copying it to yourtheme/ultimate-member/password-reset.php
*
* Call: function ultimatemember_password()
*
* @version 1.0.0
*
* @var string $mode
* @var int $form_id
* @var array $args
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
+13 -1
View File
@@ -1,8 +1,20 @@
<?php
/**
* Template for the profile page
*
* This template can be overridden by copying it to yourtheme/ultimate-member/profile.php
*
* Page: "Profile"
*
* @version 1.0.0
*
* @var string $mode
* @var int $form_id
* @var array $args
*/
if ( ! defined( 'ABSPATH' ) ) exit; ?>
if ( ! defined( 'ABSPATH' ) ) {
exit;
} ?>
<div class="um <?php echo esc_attr( $this->get_class( $mode ) ); ?> um-<?php echo esc_attr( $form_id ); ?> um-role-<?php echo esc_attr( um_user( 'role' ) ); ?> ">
+11 -1
View File
@@ -1,8 +1,18 @@
<?php
/**
* Template for the profile single comments
*
* This template can be overridden by copying it to yourtheme/ultimate-member/profile/comments-single.php
*
* Page: "Profile"
*
* @version 1.0.0
*
* @var object $comment
*/
if ( ! defined( 'ABSPATH' ) ) exit;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$comment_title = apply_filters( 'um_user_profile_comment_title', get_the_title( $comment->comment_post_ID ), $comment );
$link = apply_filters( 'um_user_profile_comment_url', get_permalink( $comment->comment_post_ID ), $comment ); ?>
+13 -1
View File
@@ -1,8 +1,20 @@
<?php
/**
* Template for the profile comments
*
* This template can be overridden by copying it to yourtheme/ultimate-member/profile/comments.php
*
* Page: "Profile"
* Call: function add_comments(), function load_comments()
*
* @version 1.0.0
*
* @var int $count_comments
* @var object $comments
*/
if ( ! defined( 'ABSPATH' ) ) exit;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
+11 -1
View File
@@ -1,8 +1,18 @@
<?php
/**
* Template for the profile single post
*
* This template can be overridden by copying it to yourtheme/ultimate-member/profile/posts-single.php
*
* Page: "Profile"
*
* @version 1.0.0
*
* @var object $post
*/
if ( ! defined( 'ABSPATH' ) ) exit; ?>
if ( ! defined( 'ABSPATH' ) ) {
exit;
} ?>
<div class="um-item">
<div class="um-item-link">
+12 -1
View File
@@ -1,8 +1,19 @@
<?php
/**
* Template for the profile posts
*
* This template can be overridden by copying it to yourtheme/ultimate-member/profile/posts.php
*
* Page: "Profile"
*
* @version 1.0.0
*
* @var object $posts
* @var int $count_posts
*/
if ( ! defined( 'ABSPATH' ) ) exit;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
//Only for AJAX loading posts
+13 -1
View File
@@ -1,8 +1,20 @@
<?php
/**
* Template for the register page
*
* This template can be overridden by copying it to yourtheme/ultimate-member/register.php
*
* Page: "Register"
*
* @version 1.0.0
*
* @var string $mode
* @var int $form_id
* @var array $args
*/
if ( ! defined( 'ABSPATH' ) ) exit;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! is_user_logged_in() ) {
um_reset_user();
+6
View File
@@ -1,5 +1,11 @@
<?php
/**
* Template for the blog restricted message
*
* This template can be overridden by copying it to yourtheme/ultimate-member/restricted-blog.php
*
* Call: function blog_message()
*
* @version 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) {
+9 -1
View File
@@ -1,8 +1,16 @@
<?php
/**
* Template for the taxonomy restricted message
*
* This template can be overridden by copying it to yourtheme/ultimate-member/restricted-taxonomy.php
*
* Call: function taxonomy_message()
*
* @version 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) exit;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
get_header(); ?>
+13 -1
View File
@@ -1,8 +1,20 @@
<?php
/**
* Template for the search form
*
* This template can be overridden by copying it to yourtheme/ultimate-member/searchform.php
*
* Call: function ultimatemember_searchform()
*
* @version 1.0.0
*
* @var string $members_page
* @var string $search_value
* @var array $query
*/
if ( ! defined( 'ABSPATH' ) ) exit; ?>
if ( ! defined( 'ABSPATH' ) ) {
exit;
} ?>
<div class="search-form um-search-form" data-members_page="<?php echo esc_url( $members_page ); ?>">
<?php foreach ( array_keys( $query ) as $key ) { ?>
+1 -1
View File
@@ -3,7 +3,7 @@
Plugin Name: Ultimate Member
Plugin URI: http://ultimatemember.com/
Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress
Version: 2.6.0
Version: 2.6.1
Author: Ultimate Member
Author URI: http://ultimatemember.com/
Text Domain: ultimate-member