mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- fixed template function;
This commit is contained in:
@@ -210,7 +210,7 @@ if ( ! class_exists( 'UM_Functions' ) ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$located = $this->locate_template( $template_name, $path );
|
$located = $this->locate_template( $template_name, $path );
|
||||||
|
var_dump($located);
|
||||||
if ( ! file_exists( $located ) ) {
|
if ( ! file_exists( $located ) ) {
|
||||||
_doing_it_wrong( __FUNCTION__, sprintf( '<code>%s</code> does not exist.', $located ), '2.1' );
|
_doing_it_wrong( __FUNCTION__, sprintf( '<code>%s</code> does not exist.', $located ), '2.1' );
|
||||||
return;
|
return;
|
||||||
@@ -248,10 +248,11 @@ if ( ! class_exists( 'UM_Functions' ) ) {
|
|||||||
|
|
||||||
if( !$template ) {
|
if( !$template ) {
|
||||||
if( $path ) {
|
if( $path ) {
|
||||||
$template = trailingslashit( trailingslashit( WP_PLUGIN_DIR ) . $path ) . $template_name;
|
$template = trailingslashit( trailingslashit( WP_PLUGIN_DIR ) . $path );
|
||||||
} else {
|
} else {
|
||||||
$template = trailingslashit( um_path . 'templates' ) . $template_name;
|
$template = trailingslashit( um_path );
|
||||||
}
|
}
|
||||||
|
$template .= 'templates/' . $template_name;
|
||||||
}
|
}
|
||||||
// Return what we found.
|
// Return what we found.
|
||||||
return apply_filters( 'um_locate_template', $template, $template_name, $path );
|
return apply_filters( 'um_locate_template', $template, $template_name, $path );
|
||||||
|
|||||||
Reference in New Issue
Block a user