mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- add comments to templates
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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,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.
|
||||
|
||||
+13
-1
@@ -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 ); ?>">
|
||||
|
||||
|
||||
@@ -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; ?>
|
||||
|
||||
|
||||
@@ -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
@@ -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
@@ -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 ); ?>">
|
||||
|
||||
|
||||
@@ -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 ); ?>
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
@@ -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
@@ -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 ); ?>">
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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">
|
||||
|
||||
|
||||
@@ -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 ); ?>">
|
||||
|
||||
|
||||
@@ -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
@@ -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' ) ); ?> ">
|
||||
|
||||
|
||||
@@ -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 ); ?>
|
||||
|
||||
@@ -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 ) {
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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
@@ -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();
|
||||
|
||||
@@ -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' ) ) {
|
||||
|
||||
@@ -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(); ?>
|
||||
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user