- fix override templates

This commit is contained in:
ashubawork
2023-06-20 09:53:04 +03:00
parent 2d698c3864
commit b7aa168e62
11 changed files with 27 additions and 10 deletions
@@ -3106,8 +3106,25 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
*/
$located = apply_filters( "um_override_templates_get_template_path__{$key}", $located, $file );
$exceptions = array(
'members-grid.php',
'members-header.php',
'members-list.php',
'members-pagination.php',
'searchform.php',
'login-to-view.php',
'profile/comments.php',
'profile/comments-single.php',
'profile/posts.php',
'profile/posts-single.php',
'modal/um_upload_single.php',
'modal/um_view_photo.php',
);
if ( ! empty( $located ) ) {
$theme_file = $located['theme'];
} elseif ( in_array( $file, $exceptions, true ) && file_exists( get_stylesheet_directory() . '/ultimate-member/' . $file ) ) {
$theme_file = get_stylesheet_directory() . '/ultimate-member/' . $file;
} elseif ( file_exists( get_stylesheet_directory() . '/ultimate-member/templates/' . $file ) ) {
$theme_file = get_stylesheet_directory() . '/ultimate-member/templates/' . $file;
} else {
+1 -1
View File
@@ -2,7 +2,7 @@
/**
* Template for the account page
*
* This template can be overridden by copying it to yourtheme/ultimate-member/account.php
* This template can be overridden by copying it to yourtheme/ultimate-member/templates/account.php
*
* Page: "Account"
*
+1 -1
View File
@@ -2,7 +2,7 @@
/**
* Template for the GDPR checkbox in register form
*
* This template can be overridden by copying it to yourtheme/ultimate-member/gdpr-register.php
* This template can be overridden by copying it to yourtheme/ultimate-member/templates/gdpr-register.php
*
* Page: "Register"
* Call: function display_option()
+1 -1
View File
@@ -2,7 +2,7 @@
/**
* Template for the login form
*
* This template can be overridden by copying it to yourtheme/ultimate-member/login.php
* This template can be overridden by copying it to yourtheme/ultimate-member/templates/login.php
*
* Page: "Login"
*
+1 -1
View File
@@ -2,7 +2,7 @@
/**
* Template for the logout
*
* This template can be overridden by copying it to yourtheme/ultimate-member/logout.php
* This template can be overridden by copying it to yourtheme/ultimate-member/templates/logout.php
*
* Page: "Logout"
*
+1 -1
View File
@@ -2,7 +2,7 @@
/**
* Template for the members directory
*
* This template can be overridden by copying it to yourtheme/ultimate-member/members.php
* This template can be overridden by copying it to yourtheme/ultimate-member/templates/members.php
*
* Page: "Members"
*
+1 -1
View File
@@ -2,7 +2,7 @@
/**
* Template for the message after registration process
*
* This template can be overridden by copying it to yourtheme/ultimate-member/message.php
* This template can be overridden by copying it to yourtheme/ultimate-member/templates/message.php
*
* Call: function parse_shortcode_args()
*
+1 -1
View File
@@ -2,7 +2,7 @@
/**
* Template for the password change
*
* This template can be overridden by copying it to yourtheme/ultimate-member/password-change.php
* This template can be overridden by copying it to yourtheme/ultimate-member/templates/password-change.php
*
* Call: function ultimatemember_password()
*
+1 -1
View File
@@ -2,7 +2,7 @@
/**
* Template for the password reset
*
* This template can be overridden by copying it to yourtheme/ultimate-member/password-reset.php
* This template can be overridden by copying it to yourtheme/ultimate-member/templates/password-reset.php
*
* Call: function ultimatemember_password()
*
+1 -1
View File
@@ -2,7 +2,7 @@
/**
* Template for the profile page
*
* This template can be overridden by copying it to yourtheme/ultimate-member/profile.php
* This template can be overridden by copying it to yourtheme/ultimate-member/templates/profile.php
*
* Page: "Profile"
*
+1 -1
View File
@@ -2,7 +2,7 @@
/**
* Template for the register page
*
* This template can be overridden by copying it to yourtheme/ultimate-member/register.php
* This template can be overridden by copying it to yourtheme/ultimate-member/templates/register.php
*
* Page: "Register"
*