mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-18 22:23:37 +09:00
- 2.0.30 release;
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
namespace um\core;
|
||||
|
||||
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
if ( ! class_exists( 'Templates' ) ) {
|
||||
|
||||
|
||||
/**
|
||||
* Class Templates
|
||||
* @package um\core
|
||||
*/
|
||||
class Templates {
|
||||
|
||||
function __construct() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get template path
|
||||
*
|
||||
*
|
||||
* @param $slug
|
||||
* @return string
|
||||
*/
|
||||
function get_template( $slug ) {
|
||||
$file_list = um_path . "templates/{$slug}.php";
|
||||
$theme_file = get_stylesheet_directory() . "/ultimate-member/templates/{$slug}.php";
|
||||
|
||||
if ( file_exists( $theme_file ) ) {
|
||||
$file_list = $theme_file;
|
||||
}
|
||||
|
||||
return $file_list;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user