mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Revert to stable version
This commit is contained in:
@@ -1329,7 +1329,7 @@
|
||||
|
||||
add_submenu_page( $this->slug, __('User Roles', $this->slug), __('User Roles', $this->slug), 'manage_options', 'edit.php?post_type=um_role', '', '' );
|
||||
|
||||
if ( um_get_option('members_page' ) ){
|
||||
if ( um_get_option('members_page' ) || !get_option('um_options') ){
|
||||
add_submenu_page( $this->slug, __('Member Directories', $this->slug), __('Member Directories', $this->slug), 'manage_options', 'edit.php?post_type=um_directory', '', '' );
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
class UM_Cache {
|
||||
|
||||
function __construct() {
|
||||
|
||||
add_action( 'init', array(&$this, 'do_not_cache' ) );
|
||||
|
||||
}
|
||||
|
||||
function do_not_cache() {
|
||||
|
||||
if ( um_is_core_uri() )
|
||||
define( "DONOTCACHEPAGE", true );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -120,6 +120,24 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
/***
|
||||
*** @Is core URL
|
||||
***/
|
||||
function um_is_core_uri() {
|
||||
global $ultimatemember;
|
||||
$array = $ultimatemember->permalinks->core;
|
||||
$current_url = trailingslashit( $ultimatemember->permalinks->get_current_url(true) );
|
||||
|
||||
if ( !isset( $array ) || !is_array( $array ) ) return false;
|
||||
|
||||
foreach( $array as $k => $id ) {
|
||||
$page_url = trailingslashit( get_permalink( $id ) );
|
||||
if ( strstr( $current_url, $page_url ) )
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/***
|
||||
*** @Check value of queried search in text input
|
||||
***/
|
||||
|
||||
@@ -49,7 +49,7 @@ class UM_Taxonomies {
|
||||
)
|
||||
);
|
||||
|
||||
if ( um_get_option('members_page') ){
|
||||
if ( um_get_option('members_page') || !get_option('um_options') ){
|
||||
|
||||
register_post_type( 'um_directory', array(
|
||||
'labels' => array(
|
||||
|
||||
@@ -53,6 +53,7 @@ class UM_API {
|
||||
require_once um_path . 'core/um-logout.php';
|
||||
require_once um_path . 'core/um-modal.php';
|
||||
require_once um_path . 'core/um-cron.php';
|
||||
require_once um_path . 'core/um-cache.php';
|
||||
|
||||
require_once um_path . 'core/lib/mobiledetect/Mobile_Detect.php';
|
||||
|
||||
@@ -116,6 +117,7 @@ class UM_API {
|
||||
$this->logout = new UM_Logout();
|
||||
$this->modal = new UM_Modal();
|
||||
$this->cron = new UM_Cron();
|
||||
$this->cache = new UM_Cache();
|
||||
|
||||
$this->mobile = new Mobile_Detect;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user