diff --git a/includes/admin/assets/css/um-admin-global.css b/includes/admin/assets/css/um-admin-global.css index 8ebd33c1..a87874fe 100644 --- a/includes/admin/assets/css/um-admin-global.css +++ b/includes/admin/assets/css/um-admin-global.css @@ -166,6 +166,10 @@ a.um-delete{ color: #a00; } text-shadow: none !important; } +.ui-tooltip.um_tooltip a { + color: #eeeeee !important; +} + .um_tooltip.dashicons, .um_tooltip.dashicons:before { height:22px; diff --git a/includes/class-functions.php b/includes/class-functions.php index 57bb8797..ab35bac0 100644 --- a/includes/class-functions.php +++ b/includes/class-functions.php @@ -178,7 +178,7 @@ if ( ! class_exists( 'UM_Functions' ) ) { $path = ''; if ( $basename ) { - $array = explode( '/', trim( $basename, '/' ) ); + $array = explode( DIRECTORY_SEPARATOR, trim( $basename, DIRECTORY_SEPARATOR ) ); $path = $array[0]; } @@ -286,7 +286,7 @@ if ( ! class_exists( 'UM_Functions' ) ) { function locate_template( $template_name, $path = '' ) { // check if there is template at theme folder $template = locate_template( array( - trailingslashit( 'ultimate-member/' . $path ) . $template_name + trailingslashit( 'ultimate-member' . DIRECTORY_SEPARATOR . $path ) . $template_name ) ); if ( ! $template ) { @@ -295,7 +295,7 @@ if ( ! class_exists( 'UM_Functions' ) ) { } else { $template = trailingslashit( um_path ); } - $template .= 'templates/' . $template_name; + $template .= 'templates' . DIRECTORY_SEPARATOR . $template_name; } diff --git a/includes/core/class-user-posts.php b/includes/core/class-user-posts.php index 27284f9d..5aaa3a8f 100644 --- a/includes/core/class-user-posts.php +++ b/includes/core/class-user-posts.php @@ -63,8 +63,7 @@ if ( ! class_exists( 'um\core\User_posts' ) ) { $count_posts = (int) count_user_posts( um_get_requested_user(), 'post', true ); - UM()->shortcodes()->set_args = array( 'posts' => $posts, 'count_posts' => $count_posts ); - UM()->shortcodes()->load_template( 'profile/posts' ); + UM()->get_template( 'profile/posts', '', array( 'posts' => $posts, 'count_posts' => $count_posts ), true ); } @@ -118,8 +117,7 @@ if ( ! class_exists( 'um\core\User_posts' ) ) { $args = apply_filters( 'um_profile_query_make_posts', $args ); $posts = get_posts( $args ); - UM()->shortcodes()->set_args = array( 'posts' => $posts ); - UM()->shortcodes()->load_template( 'profile/posts' ); + UM()->get_template( 'profile/posts', '', array( 'posts' => $posts ), true ); wp_die(); } diff --git a/languages/ultimate-member-en_US.po b/languages/ultimate-member-en_US.po index f37b6dfc..aa13f93a 100644 --- a/languages/ultimate-member-en_US.po +++ b/languages/ultimate-member-en_US.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: Ultimate Member\n" -"POT-Creation-Date: 2019-10-17 11:23+0300\n" -"PO-Revision-Date: 2019-10-17 11:23+0300\n" +"POT-Creation-Date: 2019-10-17 16:12+0300\n" +"PO-Revision-Date: 2019-10-17 16:12+0300\n" "Last-Translator: \n" "Language-Team: \n" "Language: en_US\n" @@ -7822,15 +7822,15 @@ msgstr "" msgid "1 comment" msgstr "" -#: templates/profile/posts.php:25 +#: templates/profile/posts.php:23 msgid "load more posts" msgstr "" -#: templates/profile/posts.php:37 +#: templates/profile/posts.php:35 msgid "You have not created any posts." msgstr "" -#: templates/profile/posts.php:39 +#: templates/profile/posts.php:37 msgid "This user has not created any posts." msgstr "" diff --git a/templates/profile/posts.php b/templates/profile/posts.php index e5f26bf1..90be348c 100644 --- a/templates/profile/posts.php +++ b/templates/profile/posts.php @@ -4,8 +4,7 @@ if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) { //Only for AJAX loading posts if ( ! empty( $posts ) ) { foreach ( $posts as $post ) { - UM()->shortcodes()->set_args = array( 'post' => $post ); - UM()->shortcodes()->load_template( 'profile/posts-single' ); + UM()->get_template( 'profile/posts-single.php', '', array( 'post' => $post ), true ); } } } else { @@ -13,8 +12,7 @@ if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
shortcodes()->set_args = array( 'post' => $post ); - UM()->shortcodes()->load_template( 'profile/posts-single' ); + UM()->get_template( 'profile/posts-single.php', '', array( 'post' => $post ), true ); } if ( $count_posts > 10 ) { ?>