mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Version 1.0.47
This commit is contained in:
@@ -1,110 +1,11 @@
|
||||
/*
|
||||
- General
|
||||
*/
|
||||
|
||||
.um-admin.toplevel_page_ultimatemember div.error,
|
||||
.um-admin.toplevel_page_ultimatemember div.updated
|
||||
{
|
||||
margin: 18px 20px 0 2px !important;
|
||||
.wrap h2 sup {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.um-admin-dash-container {
|
||||
box-sizing: border-box;
|
||||
margin: 18px 20px 20px 2px !important;
|
||||
background: none !important;
|
||||
overflow: hidden;
|
||||
}
|
||||
.wrap a.red,
|
||||
.wrap span.red {color:#A00}
|
||||
|
||||
.um-admin-dash-container * {
|
||||
-webkit-font-smoothing: antialiased !important;
|
||||
-moz-osx-font-smoothing: grayscale !important;
|
||||
}
|
||||
|
||||
.um-admin-dash-container a.ok {color: #7ACF58}
|
||||
.um-admin-dash-container a.red {color: #C74A4A}
|
||||
|
||||
.um-admin-dash-count {
|
||||
background: #7ACF58;
|
||||
color: #fff;
|
||||
padding: 2px 6px;
|
||||
border-radius: 3px;
|
||||
font-family: Open Sans;
|
||||
font-weight: 700;
|
||||
font-size: 12px;
|
||||
margin-left: 10px;
|
||||
display: none;
|
||||
}
|
||||
.um-admin-dash-count.count-0 {background: #ddd !important}
|
||||
.um-admin-dash-count.red {background:#C74A4A}
|
||||
|
||||
.um-admin-dash-head {
|
||||
background: #3ba1da;
|
||||
padding: 0 0 0 20px;
|
||||
}
|
||||
|
||||
.um-admin-dash-foot {
|
||||
border-radius: 0;
|
||||
background: none !important;
|
||||
padding: 10px 0;
|
||||
border-top: 1px solid #D8D8D8;
|
||||
}
|
||||
|
||||
/*
|
||||
- Header
|
||||
*/
|
||||
|
||||
.um-admin-dash-head-logo {
|
||||
float: left;
|
||||
margin: 20px 10px;
|
||||
}
|
||||
|
||||
.um-admin-dash-head h2 {
|
||||
color: #fff;
|
||||
font-size: 24px !important;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
background: url(../img/logo-header.png) no-repeat left 8px;
|
||||
padding: 10px 10px 10px 80px;
|
||||
margin: 0 !important;
|
||||
display: inline-block;
|
||||
font-style: normal;
|
||||
padding-right: 5px;
|
||||
line-height: 29px;
|
||||
}
|
||||
|
||||
.um-admin-dash-head span {
|
||||
color: #fff !important;
|
||||
font-size: 14px;
|
||||
position: relative;
|
||||
top: -10px;
|
||||
font-weight: 600;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
/*
|
||||
- Main
|
||||
*/
|
||||
|
||||
.um-admin-dash-main {
|
||||
margin-left: 201px;
|
||||
border-left: 1px solid #D8D8D8;
|
||||
padding: 0 30px 30px 30px;
|
||||
box-shadow: 0px 1px 0px #FFF inset;
|
||||
border-left: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.um-admin-dash-main h3{
|
||||
font-weight: 500;
|
||||
padding: 30px 0 10px 0;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.um-admin-dash-main h4{
|
||||
font-weight: 500;
|
||||
padding: 30px 0 10px 0;
|
||||
margin: 0 !important;
|
||||
}
|
||||
.wrap span.ok {color:#7ACF58}
|
||||
|
||||
.um-admin-dash-review {
|
||||
text-decoration: none !important;
|
||||
@@ -114,9 +15,10 @@
|
||||
right: 4px;
|
||||
}
|
||||
|
||||
/*
|
||||
- Share icons
|
||||
*/
|
||||
.um-admin-dash-content h4 {
|
||||
margin: 10px 0 3px 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.um-admin-dash-share {
|
||||
margin-top: 11px !important;
|
||||
@@ -133,10 +35,6 @@
|
||||
}
|
||||
.um-admin-dash-share a:hover {color: #3ba1da !important}
|
||||
|
||||
/*
|
||||
- Dashboard styles
|
||||
*/
|
||||
|
||||
.um-admin-dash-four-col .um-admin-dash-col {
|
||||
float: left;
|
||||
width: 25%;
|
||||
@@ -161,17 +59,10 @@
|
||||
.um-admin-dash-col a:hover {text-decoration: underline}
|
||||
.um-admin-dash-col a {text-decoration: none}
|
||||
|
||||
.um-admin-dash-num {
|
||||
display: inline-block;
|
||||
margin: 8px 0 0 0;
|
||||
font-size: 28px;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.um-admin-dash-item {
|
||||
padding: 5px 0;
|
||||
vertical-align: middle;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
border-top: 1px solid #eee;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
|
||||
@@ -183,7 +183,7 @@ body.um-admin-modal-open {
|
||||
}
|
||||
|
||||
.um-admin-success-block {
|
||||
background: #7ACE5A;
|
||||
background: #7ACF58;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
<?php
|
||||
|
||||
/***
|
||||
*** @purge temp
|
||||
***/
|
||||
add_action('um_admin_do_action__purge_temp', 'um_admin_do_action__purge_temp');
|
||||
function um_admin_do_action__purge_temp( $action ){
|
||||
global $ultimatemember;
|
||||
if ( !is_admin() || !current_user_can('manage_options') ) die();
|
||||
|
||||
$ultimatemember->files->remove_dir( $ultimatemember->files->upload_temp );
|
||||
|
||||
$url = remove_query_arg('um_adm_action', $ultimatemember->permalinks->get_current_url() );
|
||||
$url = add_query_arg('update','purged_temp',$url);
|
||||
exit( wp_redirect($url) );
|
||||
}
|
||||
|
||||
/***
|
||||
*** @duplicate form
|
||||
***/
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
<?php
|
||||
|
||||
class UM_Admin_Dashboard {
|
||||
|
||||
function __construct() {
|
||||
|
||||
$this->slug = 'ultimatemember';
|
||||
|
||||
$this->about_tabs['about'] = 'About';
|
||||
$this->about_tabs['start'] = 'Getting Started';
|
||||
|
||||
add_action('admin_menu', array(&$this, 'primary_admin_menu'), 0);
|
||||
add_action('admin_menu', array(&$this, 'secondary_menu_items'), 1000);
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
*** @setup admin menu
|
||||
***/
|
||||
function primary_admin_menu() {
|
||||
|
||||
$this->pagehook = add_menu_page( __('Ultimate Member', $this->slug), __('Ultimate Member', $this->slug), 'manage_options', $this->slug, array(&$this, 'admin_page'), 'dashicons-admin-users', '66.78578');
|
||||
add_action('load-'.$this->pagehook, array(&$this, 'on_load_page'));
|
||||
|
||||
add_submenu_page( $this->slug, __('Dashboard', $this->slug), __('Dashboard', $this->slug), 'manage_options', $this->slug, array(&$this, 'admin_page') );
|
||||
|
||||
foreach( $this->about_tabs as $k => $tab ) {
|
||||
add_submenu_page( '_'. $k . '_um', sprintf(__('%s | Ultimate Member', $this->slug), $tab), sprintf(__('%s | Ultimate Member', $this->slug), $tab), 'manage_options', $this->slug . '-' . $k, array(&$this, 'admin_page') );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
*** @secondary admin menu (after settings)
|
||||
***/
|
||||
function secondary_menu_items() {
|
||||
|
||||
add_submenu_page( $this->slug, __('Forms', $this->slug), __('Forms', $this->slug), 'manage_options', 'edit.php?post_type=um_form', '', '' );
|
||||
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' ) || !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', '', '' );
|
||||
}
|
||||
|
||||
do_action('um_extend_admin_menu');
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
*** @load metabox stuff
|
||||
***/
|
||||
function on_load_page() {
|
||||
|
||||
wp_enqueue_script('common');
|
||||
wp_enqueue_script('wp-lists');
|
||||
wp_enqueue_script('postbox');
|
||||
|
||||
add_screen_option('layout_columns', array('max' => 2, 'default' => 2) );
|
||||
|
||||
/** custom metaboxes for dashboard defined here **/
|
||||
|
||||
add_meta_box('um-metaboxes-contentbox-1', __('Users Overview','ultimatemember'), array(&$this, 'users_overview'), $this->pagehook, 'normal', 'core');
|
||||
|
||||
add_meta_box('um-metaboxes-sidebox-1', __('Purge Temp Files','ultimatemember'), array(&$this, 'purge_temp'), $this->pagehook, 'side', 'core');
|
||||
|
||||
}
|
||||
|
||||
function users_overview() {
|
||||
global $ultimatemember;
|
||||
include_once um_path . 'admin/templates/dashboard/users.php';
|
||||
}
|
||||
|
||||
function purge_temp() {
|
||||
global $ultimatemember;
|
||||
include_once um_path . 'admin/templates/dashboard/purge.php';
|
||||
}
|
||||
|
||||
/***
|
||||
*** @get a directory size
|
||||
***/
|
||||
function dir_size( $directory ) {
|
||||
global $ultimatemember;
|
||||
if ( $directory == 'temp' ) {
|
||||
$directory = $ultimatemember->files->upload_temp;
|
||||
$size = 0;
|
||||
foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory)) as $file){
|
||||
$size+=$file->getSize();
|
||||
}
|
||||
return round ( $size / 1048576, 2);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***
|
||||
*** @which admin page to show?
|
||||
***/
|
||||
function admin_page() {
|
||||
|
||||
$page = $_REQUEST['page'];
|
||||
if ( $page == 'ultimatemember' ) {
|
||||
|
||||
?>
|
||||
|
||||
<div id="um-metaboxes-general" class="wrap">
|
||||
|
||||
<h2>Ultimate Member <sup><?php echo ultimatemember_version; ?></sup></h2>
|
||||
|
||||
<form action="admin-post.php" method="post">
|
||||
|
||||
<?php wp_nonce_field('um-metaboxes-general'); ?>
|
||||
<?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false ); ?>
|
||||
<?php wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false ); ?>
|
||||
|
||||
<input type="hidden" name="action" value="save_um_metaboxes_general" />
|
||||
|
||||
<div id="poststuff">
|
||||
|
||||
<div id="post-body" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
|
||||
|
||||
<div id="postbox-container-2" class="postbox-container"><?php do_meta_boxes($this->pagehook,'normal',null); ?></div>
|
||||
<div id="postbox-container-1" class="postbox-container"><?php do_meta_boxes($this->pagehook,'side',null); ?></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div><div class="um-admin-clear"></div>
|
||||
|
||||
<div class="um-admin-dash-share"><?php global $reduxConfig; foreach ( $reduxConfig->args['share_icons'] as $k => $arr ) { ?><a href="<?php echo $arr['url']; ?>" class="um-about-icon um-admin-tipsy-n" title="<?php echo $arr['title']; ?>" target="_blank"><i class="<?php echo $arr['icon']; ?>"></i></a><?php } ?>
|
||||
</div><div class="um-admin-clear"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
jQuery(document).ready( function($) {
|
||||
// postboxes setup
|
||||
postboxes.add_postbox_toggles('<?php echo $this->pagehook; ?>');
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<?php
|
||||
|
||||
} else if ( strstr( $page, 'ultimatemember-' ) ) {
|
||||
|
||||
$template = str_replace('ultimatemember-','',$page);
|
||||
$file = um_path . 'admin/templates/welcome/'. $template . '.php';
|
||||
|
||||
if ( file_exists( $file ) ){
|
||||
include_once um_path . 'admin/templates/welcome/'. $template . '.php';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$um_dashboard = new UM_Admin_Dashboard();
|
||||
@@ -111,6 +111,10 @@ class UM_Admin_Notices {
|
||||
$update = $_REQUEST['update'];
|
||||
switch($update) {
|
||||
|
||||
case 'purged_temp':
|
||||
$messages[0]['content'] = __('Your temp uploads directory is now clean.','ultimatemember');
|
||||
break;
|
||||
|
||||
case 'form_duplicated':
|
||||
$messages[0]['content'] = __('The form has been duplicated successfully.','ultimatemember');
|
||||
break;
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php global $ultimatemember; ?>
|
||||
|
||||
<div class="um-admin-dash-container">
|
||||
|
||||
<div class="um-admin-dash-head">
|
||||
|
||||
<div class="um-admin-dash-head-logo">
|
||||
<h2>Dashboard</h2>
|
||||
<span><?php echo ultimatemember_version; ?></span>
|
||||
</div><div class="um-admin-clear"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-body">
|
||||
|
||||
<div class="um-admin-dash-main">
|
||||
|
||||
<div class="um-admin-dash-content">
|
||||
|
||||
<?php include_once um_path . 'admin/templates/dashboard/overview.php'; ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div><div class="um-admin-clear"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-foot">
|
||||
<div class="um-admin-dash-share">
|
||||
|
||||
<?php global $reduxConfig; foreach ( $reduxConfig->args['share_icons'] as $k => $arr ) { ?><a href="<?php echo $arr['url']; ?>" class="um-about-icon um-admin-tipsy-n" title="<?php echo $arr['title']; ?>" target="_blank"><i class="<?php echo $arr['icon']; ?>"></i></a><?php } ?>
|
||||
|
||||
</div><div class="clear"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -1,158 +0,0 @@
|
||||
<div class="um-admin-dash-two-col">
|
||||
|
||||
<div class="um-admin-dash-col">
|
||||
|
||||
<h3><?php _e('Recent Members','ultimatemember'); ?></h3>
|
||||
|
||||
<?php foreach( $ultimatemember->query->get_users_by_status('approved') as $user_id ) { um_fetch_user( $user_id ); ?>
|
||||
|
||||
<div class="um-admin-dash-item">
|
||||
|
||||
<div class="um-admin-dash-thumb">
|
||||
<a href="<?php echo um_user_profile_url(); ?>" target="_blank"><?php echo um_user('profile_photo', 30 ); ?></a>
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-info">
|
||||
<a href="<?php echo um_user_profile_url(); ?>" target="_blank"><?php echo um_user('display_name'); ?></a>
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-meta"><?php echo date( "j M H:i", strtotime( um_user('user_registered') ) ); ?>
|
||||
|
||||
<?php
|
||||
|
||||
if ( um_user('submitted') ) {
|
||||
|
||||
echo '<a href="#" class="um-admin-dash-review um-admin-tipsy-n" data-modal="UM_preview_registration" data-modal-size="smaller" data-dynamic-content="um_admin_review_registration" data-arg1="'.$user_id.'" data-arg2="edit_registration" title="Review registration info"><i class="um-icon-information-circled"></i></a>';
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-more">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php um_reset_user(); } ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-col">
|
||||
|
||||
<?php $users = $ultimatemember->query->get_users_by_status('awaiting_admin_review'); ?>
|
||||
<h3><?php _e('Users Awaiting Review','ultimatemember'); ?><span class="um-admin-dash-count red count-0">0</span></h3>
|
||||
|
||||
<?php foreach( $users as $user_id ) { um_fetch_user( $user_id ); ?>
|
||||
|
||||
<div class="um-admin-dash-item">
|
||||
|
||||
<div class="um-admin-dash-thumb">
|
||||
<a href="<?php echo um_user_profile_url(); ?>" target="_blank"><?php echo um_user('profile_photo', 30 ); ?></a>
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-info">
|
||||
<a href="<?php echo um_user_profile_url(); ?>" target="_blank"><?php echo um_user('display_name'); ?></a>
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-meta"><?php echo date( "j M H:i", strtotime( um_user('user_registered') ) ); ?>
|
||||
|
||||
<?php
|
||||
|
||||
if ( um_user('submitted') ) {
|
||||
|
||||
echo '<a href="#" class="um-admin-dash-review um-admin-tipsy-n" data-modal="UM_preview_registration" data-modal-size="smaller" data-dynamic-content="um_admin_review_registration" data-arg1="'.$user_id.'" data-arg2="edit_registration" title="Review registration info"><i class="um-icon-information-circled"></i></a>';
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-more">
|
||||
<a href="<?php echo $ultimatemember->permalinks->admin_act_url('user_action','um_approve_membership'); ?>" class="ok">Approve</a> | <a href="<?php echo $ultimatemember->permalinks->admin_act_url('user_action','um_reject_membership'); ?>" class="red">Reject</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php um_reset_user(); } ?>
|
||||
|
||||
<?php if ( !$users ) { ?>
|
||||
<div class="um-admin-dash-item"><?php _e('No users are awaiting manual verification so far.','ultimatemember'); ?></div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-two-col">
|
||||
|
||||
<div class="um-admin-dash-col">
|
||||
|
||||
<?php $users = $ultimatemember->query->get_users_by_status('awaiting_email_confirmation'); ?>
|
||||
<h3><?php _e('Pending e-mail confirmation','ultimatemember'); ?><span class="um-admin-dash-count red count-0">0</span></h3>
|
||||
|
||||
<?php foreach( $users as $user_id ) { um_fetch_user( $user_id ); ?>
|
||||
|
||||
<div class="um-admin-dash-item">
|
||||
|
||||
<div class="um-admin-dash-thumb">
|
||||
<a href="<?php echo um_user_profile_url(); ?>" target="_blank"><?php echo um_user('profile_photo', 30 ); ?></a>
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-info">
|
||||
<a href="<?php echo um_user_profile_url(); ?>" target="_blank"><?php echo um_user('display_name'); ?></a>
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-meta"><?php echo date( "j M H:i", strtotime( um_user('user_registered') ) ); ?></div>
|
||||
|
||||
<div class="um-admin-dash-more">
|
||||
<a href="<?php echo $ultimatemember->permalinks->admin_act_url('user_action','um_resend_activation'); ?>" class="ok">Resend Email</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php um_reset_user(); } ?>
|
||||
|
||||
<?php if ( !$users ) { ?>
|
||||
<div class="um-admin-dash-item"><?php _e('No users are awaiting e-mail validation yet.','ultimatemember'); ?></div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-col">
|
||||
|
||||
<?php $users = $ultimatemember->query->get_users_by_status('inactive'); ?>
|
||||
<h3><?php _e('Recently Deactivated','ultimatemember'); ?><span class="um-admin-dash-count red count-0">0</span></h3>
|
||||
|
||||
<?php foreach( $users as $user_id ) { um_fetch_user( $user_id ); ?>
|
||||
|
||||
<div class="um-admin-dash-item">
|
||||
|
||||
<div class="um-admin-dash-thumb">
|
||||
<a href="<?php echo um_user_profile_url(); ?>" target="_blank"><?php echo um_user('profile_photo', 30 ); ?></a>
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-info">
|
||||
<a href="<?php echo um_user_profile_url(); ?>" target="_blank"><?php echo um_user('display_name'); ?></a>
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-meta"><?php echo date( "j M H:i", strtotime( um_user('user_registered') ) ); ?></div>
|
||||
|
||||
<div class="um-admin-dash-more">
|
||||
<a href="<?php echo $ultimatemember->permalinks->admin_act_url('user_action','um_reenable'); ?>" class="ok">Re-activate</a> | <a href="<?php echo $ultimatemember->permalinks->admin_act_url('user_action','um_delete'); ?>" class="red">Delete</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php um_reset_user(); } ?>
|
||||
|
||||
<?php if ( !$users ) { ?>
|
||||
<div class="um-admin-dash-item"><?php _e('No users have been deactivated recently.','ultimatemember'); ?></div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php if ( $this->dir_size('temp') > 0.1 ) { ?>
|
||||
|
||||
<p>You can free up <span class="red"><?php echo $this->dir_size('temp'); ?>MB</span> by purging your temp upload directory.</p>
|
||||
|
||||
<p><a href="<?php echo add_query_arg( 'um_adm_action', 'purge_temp' ); ?>" class="button">Purge Temp</a></p>
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
<p>Your temp uploads directory is <span class="ok">clean</span>. There is nothing to purge.</p>
|
||||
|
||||
<?php } ?>
|
||||
@@ -0,0 +1,162 @@
|
||||
<div class="um-admin-dash-content">
|
||||
|
||||
<div class="um-admin-dash-two-col">
|
||||
|
||||
<div class="um-admin-dash-col">
|
||||
|
||||
<h4><?php _e('Recent Members','ultimatemember'); ?></h4>
|
||||
|
||||
<?php foreach( $ultimatemember->query->get_users_by_status('approved') as $user_id ) { um_fetch_user( $user_id ); ?>
|
||||
|
||||
<div class="um-admin-dash-item">
|
||||
|
||||
<div class="um-admin-dash-thumb">
|
||||
<a href="<?php echo um_user_profile_url(); ?>" target="_blank"><?php echo um_user('profile_photo', 30 ); ?></a>
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-info">
|
||||
<a href="<?php echo um_user_profile_url(); ?>" target="_blank"><?php echo um_user('display_name'); ?></a>
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-meta"><?php echo date( "j M H:i", strtotime( um_user('user_registered') ) ); ?>
|
||||
|
||||
<?php
|
||||
|
||||
if ( um_user('submitted') ) {
|
||||
|
||||
echo '<a href="#" class="um-admin-dash-review um-admin-tipsy-n" data-modal="UM_preview_registration" data-modal-size="smaller" data-dynamic-content="um_admin_review_registration" data-arg1="'.$user_id.'" data-arg2="edit_registration" title="Review registration info"><i class="um-icon-information-circled"></i></a>';
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-more">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php um_reset_user(); } ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-col">
|
||||
|
||||
<?php $users = $ultimatemember->query->get_users_by_status('awaiting_admin_review'); ?>
|
||||
<h4><?php _e('Users Awaiting Review','ultimatemember'); ?></h4>
|
||||
|
||||
<?php foreach( $users as $user_id ) { um_fetch_user( $user_id ); ?>
|
||||
|
||||
<div class="um-admin-dash-item">
|
||||
|
||||
<div class="um-admin-dash-thumb">
|
||||
<a href="<?php echo um_user_profile_url(); ?>" target="_blank"><?php echo um_user('profile_photo', 30 ); ?></a>
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-info">
|
||||
<a href="<?php echo um_user_profile_url(); ?>" target="_blank"><?php echo um_user('display_name'); ?></a>
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-meta"><?php echo date( "j M H:i", strtotime( um_user('user_registered') ) ); ?>
|
||||
|
||||
<?php
|
||||
|
||||
if ( um_user('submitted') ) {
|
||||
|
||||
echo '<a href="#" class="um-admin-dash-review um-admin-tipsy-n" data-modal="UM_preview_registration" data-modal-size="smaller" data-dynamic-content="um_admin_review_registration" data-arg1="'.$user_id.'" data-arg2="edit_registration" title="Review registration info"><i class="um-icon-information-circled"></i></a>';
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-more">
|
||||
<a href="<?php echo $ultimatemember->permalinks->admin_act_url('user_action','um_approve_membership'); ?>" class="ok">Approve</a> | <a href="<?php echo $ultimatemember->permalinks->admin_act_url('user_action','um_reject_membership'); ?>" class="red">Reject</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php um_reset_user(); } ?>
|
||||
|
||||
<?php if ( !$users ) { ?>
|
||||
<div class="um-admin-dash-item"><?php _e('No users are awaiting manual verification so far.','ultimatemember'); ?></div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-two-col">
|
||||
|
||||
<div class="um-admin-dash-col">
|
||||
|
||||
<?php $users = $ultimatemember->query->get_users_by_status('awaiting_email_confirmation'); ?>
|
||||
<h4><?php _e('Pending e-mail confirmation','ultimatemember'); ?></h4>
|
||||
|
||||
<?php foreach( $users as $user_id ) { um_fetch_user( $user_id ); ?>
|
||||
|
||||
<div class="um-admin-dash-item">
|
||||
|
||||
<div class="um-admin-dash-thumb">
|
||||
<a href="<?php echo um_user_profile_url(); ?>" target="_blank"><?php echo um_user('profile_photo', 30 ); ?></a>
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-info">
|
||||
<a href="<?php echo um_user_profile_url(); ?>" target="_blank"><?php echo um_user('display_name'); ?></a>
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-meta"><?php echo date( "j M H:i", strtotime( um_user('user_registered') ) ); ?></div>
|
||||
|
||||
<div class="um-admin-dash-more">
|
||||
<a href="<?php echo $ultimatemember->permalinks->admin_act_url('user_action','um_resend_activation'); ?>" class="ok">Resend Email</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php um_reset_user(); } ?>
|
||||
|
||||
<?php if ( !$users ) { ?>
|
||||
<div class="um-admin-dash-item"><?php _e('No users are awaiting e-mail validation yet.','ultimatemember'); ?></div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-col">
|
||||
|
||||
<?php $users = $ultimatemember->query->get_users_by_status('inactive'); ?>
|
||||
<h4><?php _e('Recently Deactivated','ultimatemember'); ?></h4>
|
||||
|
||||
<?php foreach( $users as $user_id ) { um_fetch_user( $user_id ); ?>
|
||||
|
||||
<div class="um-admin-dash-item">
|
||||
|
||||
<div class="um-admin-dash-thumb">
|
||||
<a href="<?php echo um_user_profile_url(); ?>" target="_blank"><?php echo um_user('profile_photo', 30 ); ?></a>
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-info">
|
||||
<a href="<?php echo um_user_profile_url(); ?>" target="_blank"><?php echo um_user('display_name'); ?></a>
|
||||
</div>
|
||||
|
||||
<div class="um-admin-dash-meta"><?php echo date( "j M H:i", strtotime( um_user('user_registered') ) ); ?></div>
|
||||
|
||||
<div class="um-admin-dash-more">
|
||||
<a href="<?php echo $ultimatemember->permalinks->admin_act_url('user_action','um_reenable'); ?>" class="ok">Re-activate</a> | <a href="<?php echo $ultimatemember->permalinks->admin_act_url('user_action','um_delete'); ?>" class="red">Delete</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php um_reset_user(); } ?>
|
||||
|
||||
<?php if ( !$users ) { ?>
|
||||
<div class="um-admin-dash-item"><?php _e('No users have been deactivated recently.','ultimatemember'); ?></div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div><div class="um-admin-clear"></div>
|
||||
@@ -60,7 +60,7 @@
|
||||
<?php if ( $i == 1 ) { ?>
|
||||
<a href="#" class="um-admin-clone button um-admin-tipsy-n" title="New Field"><i class="um-icon-plus" style="margin-right:0!important"></i></a>
|
||||
<?php } else { ?>
|
||||
<a href="#" class="um-admin-clone-remove button um-admin-tipsy-n" title="Remove Field"><i class="um-icon-remove" style="margin-right:0!important"></i></a>
|
||||
<a href="#" class="um-admin-clone-remove button um-admin-tipsy-n" title="Remove Field"><i class="um-icon-close" style="margin-right:0!important"></i></a>
|
||||
<?php } ?>
|
||||
|
||||
</span>
|
||||
@@ -126,7 +126,7 @@
|
||||
<?php if ( $i == 1 ) { ?>
|
||||
<a href="#" class="um-admin-clone button um-admin-tipsy-n" title="New Field"><i class="um-icon-plus" style="margin-right:0!important"></i></a>
|
||||
<?php } else { ?>
|
||||
<a href="#" class="um-admin-clone-remove button um-admin-tipsy-n" title="Remove Field"><i class="um-icon-remove" style="margin-right:0!important"></i></a>
|
||||
<a href="#" class="um-admin-clone-remove button um-admin-tipsy-n" title="Remove Field"><i class="um-icon-close" style="margin-right:0!important"></i></a>
|
||||
<?php } ?>
|
||||
|
||||
</span>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<?php if ( $i == 1 ) { ?>
|
||||
<a href="#" class="um-admin-clone button um-admin-tipsy-n" title="New Field"><i class="um-icon-plus" style="margin-right:0!important"></i></a>
|
||||
<?php } else { ?>
|
||||
<a href="#" class="um-admin-clone-remove button um-admin-tipsy-n" title="Remove Field"><i class="um-icon-remove" style="margin-right:0!important"></i></a>
|
||||
<a href="#" class="um-admin-clone-remove button um-admin-tipsy-n" title="Remove Field"><i class="um-icon-close" style="margin-right:0!important"></i></a>
|
||||
<?php } ?>
|
||||
|
||||
</span>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
<?php global $ultimatemember; include_once um_path . 'admin/templates/about_header.php'; ?>
|
||||
<?php global $ultimatemember; include_once um_path . 'admin/templates/welcome/about_header.php'; ?>
|
||||
|
||||
<div class="changelog headline-feature dfw">
|
||||
<h2>Introducing Ultimate Member</h2>
|
||||
@@ -71,4 +71,4 @@
|
||||
|
||||
</div>
|
||||
|
||||
<?php include_once um_path . 'admin/templates/about_footer.php'; ?>
|
||||
<?php include_once um_path . 'admin/templates/welcome/about_footer.php'; ?>
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
<?php global $ultimatemember; include_once um_path . 'admin/templates/about_header.php'; ?>
|
||||
<?php global $ultimatemember; include_once um_path . 'admin/templates/welcome/about_header.php'; ?>
|
||||
|
||||
<div class="changelog headline-feature dfw">
|
||||
<h2>Getting Started</h2>
|
||||
@@ -63,4 +63,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include_once um_path . 'admin/templates/about_footer.php'; ?>
|
||||
<?php include_once um_path . 'admin/templates/welcome/about_footer.php'; ?>
|
||||
+1
-65
@@ -4,15 +4,7 @@ class UM_Admin_API {
|
||||
|
||||
function __construct() {
|
||||
|
||||
$this->slug = 'ultimatemember';
|
||||
|
||||
$this->about_tabs['about'] = 'About';
|
||||
$this->about_tabs['start'] = 'Getting Started';
|
||||
|
||||
add_action('admin_init', array(&$this, 'admin_init'), 0);
|
||||
|
||||
add_action('admin_menu', array(&$this, 'admin_menu'), 0 );
|
||||
add_action('admin_menu', array(&$this, 'secondary_menu_items'), 1000 );
|
||||
|
||||
$_redux_tracker['dev_mode'] = false;
|
||||
$_redux_tracker['hash'] = md5( network_site_url() . '-' . $_SERVER['REMOTE_ADDR'] );
|
||||
@@ -26,64 +18,8 @@ class UM_Admin_API {
|
||||
require_once( um_path . 'admin/core/um-admin-redux.php' );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
*** @Creates menu
|
||||
***/
|
||||
function admin_menu() {
|
||||
require_once um_path . 'admin/core/um-admin-dashboard.php';
|
||||
|
||||
add_menu_page( __('Ultimate Member', $this->slug), __('Ultimate Member', $this->slug), 'manage_options', $this->slug, array(&$this, 'admin_page'), 'dashicons-admin-users', '66.78578');
|
||||
|
||||
add_submenu_page( $this->slug, __('Dashboard', $this->slug), __('Dashboard', $this->slug), 'manage_options', $this->slug, array(&$this, 'admin_page') );
|
||||
|
||||
foreach( $this->about_tabs as $k => $tab ) {
|
||||
add_submenu_page( '_'. $k . '_um', sprintf(__('%s | Ultimate Member', $this->slug), $tab), sprintf(__('%s | Ultimate Member', $this->slug), $tab), 'manage_options', $this->slug . '-' . $k, array(&$this, 'admin_page') );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
*** @After "settings" menu
|
||||
***/
|
||||
function secondary_menu_items() {
|
||||
|
||||
add_submenu_page( $this->slug, __('Forms', $this->slug), __('Forms', $this->slug), 'manage_options', 'edit.php?post_type=um_form', '', '' );
|
||||
|
||||
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' ) || !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', '', '' );
|
||||
}
|
||||
|
||||
do_action('um_extend_admin_menu');
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
*** @Admin page function
|
||||
***/
|
||||
function admin_page() {
|
||||
|
||||
$page = $_REQUEST['page'];
|
||||
|
||||
if ( $page == 'ultimatemember' ) {
|
||||
include_once um_path . 'admin/templates/dashboard.php';
|
||||
}
|
||||
|
||||
if ( strstr( $page, 'ultimatemember-' ) ) {
|
||||
|
||||
$template = str_replace('ultimatemember-','',$page);
|
||||
$file = um_path . 'admin/templates/'. $template . '.php';
|
||||
|
||||
if ( file_exists( $file ) ){
|
||||
include_once um_path . 'admin/templates/'. $template . '.php';
|
||||
} else {
|
||||
echo '<h4>' . __('Please create a team.php template in admin templates.','ultimatemember') . '</h4>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
|
||||
@@ -87,6 +87,8 @@
|
||||
$ultimatemember->user->update_files( $files );
|
||||
}
|
||||
|
||||
do_action('um_after_user_upload', um_user('ID') );
|
||||
|
||||
do_action('um_user_after_updating_profile', $to_update );
|
||||
|
||||
if ( !isset( $args['is_signup'] ) ) {
|
||||
|
||||
@@ -6,15 +6,18 @@
|
||||
add_action('um_after_user_upload','um_remove_unused_uploads', 10);
|
||||
function um_remove_unused_uploads( $user_id ) {
|
||||
global $ultimatemember;
|
||||
|
||||
um_fetch_user( $user_id );
|
||||
|
||||
$array = $ultimatemember->user->profile;
|
||||
|
||||
$files = glob( um_user_uploads_dir() . '*', GLOB_BRACE);
|
||||
foreach($files as $file) {
|
||||
$str = basename($file);
|
||||
if ( !strstr( $str, 'profile_photo') && !strstr( $str, 'cover_photo') && !preg_grep('/' . $str . '/', $array ) )
|
||||
unlink( $file );
|
||||
}
|
||||
um_reset_user();
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
|
||||
+2
-2
@@ -555,7 +555,7 @@ class UM_Builtin {
|
||||
'required' => 0,
|
||||
'public' => 1,
|
||||
'editable' => 1,
|
||||
'options' => array('Male','Female')
|
||||
'options' => array( __('Male','ultimatemember'), __('Female','ultimatemember') )
|
||||
),
|
||||
|
||||
'country' => array(
|
||||
@@ -563,7 +563,7 @@ class UM_Builtin {
|
||||
'metakey' => 'country',
|
||||
'type' => 'select',
|
||||
'label' => __('Country','ultimatemember'),
|
||||
'placeholder' => 'Choose a Country',
|
||||
'placeholder' => __('Choose a Country','ultimatemember'),
|
||||
'required' => 0,
|
||||
'public' => 1,
|
||||
'editable' => 1,
|
||||
|
||||
+1
-4
@@ -504,9 +504,6 @@ class UM_Files {
|
||||
// update user's meta
|
||||
update_user_meta( $user_id, $key, $filename );
|
||||
|
||||
// this action is executed after upload
|
||||
do_action('um_after_user_upload', $user_id );
|
||||
|
||||
// the url of upload
|
||||
return $this->upload_baseurl . $user_id . '/' . $filename;
|
||||
|
||||
@@ -518,7 +515,7 @@ class UM_Files {
|
||||
function remove_dir($dir) {
|
||||
if ( file_exists( $dir ) ) {
|
||||
foreach(glob($dir . '/*') as $file) {
|
||||
if(is_dir($file)) remove_dir($file); else unlink($file);
|
||||
if(is_dir($file)) $this->remove_dir($file); else unlink($file);
|
||||
} rmdir($dir);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,6 +80,11 @@
|
||||
|
||||
if ( !in_array( $field, $ultimatemember->members->core_search_fields ) ) {
|
||||
|
||||
if ( strstr($field, 'role_' ) ) {
|
||||
$field = 'role';
|
||||
$operator = '=';
|
||||
}
|
||||
|
||||
$query_args['meta_query'][] = array(
|
||||
'key' => $field,
|
||||
'value' => $value,
|
||||
|
||||
+12
-2
@@ -61,6 +61,7 @@ class UM_Members {
|
||||
global $ultimatemember;
|
||||
|
||||
$fields = $ultimatemember->builtin->all_user_fields;
|
||||
|
||||
$attrs = $fields[$filter];
|
||||
|
||||
if ( $ultimatemember->builtin->is_dropdown_field( $filter ) ) {
|
||||
@@ -79,9 +80,18 @@ class UM_Members {
|
||||
|
||||
<option></option>
|
||||
|
||||
<?php foreach( $attrs['options'] as $k => $v ) { $v = stripslashes($v); ?>
|
||||
<?php foreach( $attrs['options'] as $k => $v ) {
|
||||
|
||||
$v = stripslashes($v);
|
||||
|
||||
$opt = $v;
|
||||
|
||||
if ( strstr($filter, 'role_') )
|
||||
$opt = $k;
|
||||
|
||||
?>
|
||||
|
||||
<option value="<?php echo $v; ?>" <?php um_select_if_in_query_params( $filter, $v ); ?>><?php echo $v; ?></option>
|
||||
<option value="<?php echo $opt; ?>" <?php um_select_if_in_query_params( $filter, $opt ); ?>><?php echo $v; ?></option>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Plugin Name: Ultimate Member
|
||||
Plugin URI: http://ultimatemember.com/
|
||||
Description: Ultimate Member is a powerful community and membership plugin that allows you to create beautiful community and membership sites with WordPress
|
||||
Version: 1.0.46
|
||||
Version: 1.0.47
|
||||
Author: Ultimate Member
|
||||
Author URI: http://ultimatemember.com/
|
||||
*/
|
||||
|
||||
+10
-1
@@ -7,7 +7,7 @@ Tags: access control, author, authors, author profile, comments, community, comm
|
||||
Requires at least: 4.1
|
||||
Tested up to: 4.1
|
||||
|
||||
Stable Tag: 1.0.46
|
||||
Stable Tag: 1.0.47
|
||||
|
||||
License: GNU Version 2 or Any Later Version
|
||||
|
||||
@@ -186,6 +186,15 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 1.0.47: February 9, 2015 =
|
||||
|
||||
* New: A more native dashboard for Ultimate Member
|
||||
* New: view your temp uploads directory size and purge it from dashboard
|
||||
* Fixed: user uploads bug with handling photo uploads at once
|
||||
* Fixed: issue with using UM role as search filter in directory
|
||||
* Fixed: a little icon issue with directory backend
|
||||
* Fixed: localized a few words from predefined fields
|
||||
|
||||
= 1.0.46: February 8, 2015 =
|
||||
|
||||
(Update Recommended)
|
||||
|
||||
Reference in New Issue
Block a user