Version 1.0.27

This commit is contained in:
ultimatemember
2015-01-27 01:52:11 +02:00
parent adebeee3d5
commit 31dc7962bf
7 changed files with 77 additions and 10 deletions
+30 -2
View File
@@ -60,7 +60,27 @@ class UM_Admin_Access {
***/
function load_metabox_form( $object, $box ) {
global $ultimatemember, $post;
include_once um_path . 'admin/templates/access/settings.php';
$box['id'] = str_replace('um-admin-access-','', $box['id']);
if ( $box['id'] == 'builder' ) {
$UM_Builder = new UM_Admin_Builder();
$UM_Builder->form_id = get_the_ID();
}
preg_match('#\{.*?\}#s', $box['id'], $matches);
if ( isset($matches[0]) ){
$path = $matches[0];
$box['id'] = preg_replace('~(\\{[^}]+\\})~','', $box['id'] );
} else {
$path = um_path;
}
$path = str_replace('{','', $path );
$path = str_replace('}','', $path );
include_once $path . 'admin/templates/access/'. $box['id'] . '.php';
wp_nonce_field( basename( __FILE__ ), 'um_admin_save_metabox_access_nonce' );
}
@@ -72,7 +92,9 @@ class UM_Admin_Access {
$types = get_post_types();
foreach($types as $post_type) {
if ( $this->core_post_type( $post_type ) ) return;
add_meta_box('um-admin-access-control', __('Access Control'), array(&$this, 'load_metabox_form'), $post_type, 'side', 'default');
add_meta_box('um-admin-access-settings', __('Access Control'), array(&$this, 'load_metabox_form'), $post_type, 'side', 'default');
do_action('um_admin_custom_access_metaboxes');
}
}
@@ -91,6 +113,12 @@ class UM_Admin_Access {
if ( !current_user_can( $post_type->cap->edit_post, $post_id ) ) return $post_id;
// save
$multi_choice_keys = apply_filters('um_admin_multi_choice_keys', array() );
if ( $multi_choice_keys ) {
foreach( $multi_choice_keys as $k ) {
delete_post_meta( $post_id, $k );
}
}
foreach( $_POST as $k => $v ) {
if (strstr($k, '_um_')){
update_post_meta( $post_id, $k, $v);
+24 -3
View File
@@ -171,9 +171,28 @@ class UM_Admin_Metabox {
*** @load a role metabox
***/
function load_metabox_role( $object, $box ) {
global $ultimatemember;
global $ultimatemember, $post;
$box['id'] = str_replace('um-admin-form-','', $box['id']);
include_once um_path . 'admin/templates/role/'. $box['id'] . '.php';
if ( $box['id'] == 'builder' ) {
$UM_Builder = new UM_Admin_Builder();
$UM_Builder->form_id = get_the_ID();
}
preg_match('#\{.*?\}#s', $box['id'], $matches);
if ( isset($matches[0]) ){
$path = $matches[0];
$box['id'] = preg_replace('~(\\{[^}]+\\})~','', $box['id'] );
} else {
$path = um_path;
}
$path = str_replace('{','', $path );
$path = str_replace('}','', $path );
include_once $path . 'admin/templates/role/'. $box['id'] . '.php';
wp_nonce_field( basename( __FILE__ ), 'um_admin_save_metabox_role_nonce' );
}
@@ -181,7 +200,7 @@ class UM_Admin_Metabox {
*** @load a form metabox
***/
function load_metabox_form( $object, $box ) {
global $ultimatemember;
global $ultimatemember, $post;
$box['id'] = str_replace('um-admin-form-','', $box['id']);
@@ -244,6 +263,8 @@ class UM_Admin_Metabox {
add_meta_box('um-admin-form-logout', __('Logout Options'), array(&$this, 'load_metabox_role'), 'um_role', 'normal', 'default');
add_meta_box('um-admin-form-delete', __('Delete Options'), array(&$this, 'load_metabox_role'), 'um_role', 'normal', 'default');
do_action('um_admin_custom_role_metaboxes');
}
+10 -1
View File
@@ -63,7 +63,16 @@
if( !is_admin() && !um_user('can_access_wpadmin')) {
return false;
} else {
um_fetch_user( get_current_user_id() );
return true;
}
}
add_filter( 'show_admin_bar' , 'um_control_admin_bar');
add_filter( 'show_admin_bar' , 'um_control_admin_bar');
/***
*** @fix permission for admin bar
***/
function um_force_admin_bar() {
um_reset_user();
}
add_action( 'wp_footer', 'um_force_admin_bar' );
+1 -2
View File
@@ -44,8 +44,7 @@
'?d='. $default . '&s=' . $size . '" class="gravatar avatar avatar-'.$size.' um-avatar" width="'.$size.'" height="'.$size.'" alt="" />';
}
um_reset_user();
return $avatar;
}
+1
View File
@@ -63,6 +63,7 @@
*** @Capitalize first initial
***/
function um_cap_initials( $name ) {
if ( is_email( $name ) ) return $name;
$name = str_replace('\' ', '\'', ucwords(str_replace('\'', '\' ', strtolower($name))));
return $name;
}
+1 -1
View File
@@ -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.25
Version: 1.0.27
Author: Ultimate Member
Author URI: http://ultimatemember.com/
*/
+10 -1
View File
@@ -7,7 +7,7 @@ Tags: access control, community, communities, conditional fields, conditional lo
Requires at least: 4.1
Tested up to: 4.1
Stable Tag: 1.0.25
Stable Tag: 1.0.27
License: GNU Version 2 or Any Later Version
@@ -168,6 +168,15 @@ Yes. The plugin works fine with WordPress network / multisite now. In a recent u
== Changelog ==
= 1.0.27: January 27, 2015 =
* Fixed: WP admin bar issue with some plugins and themes
* Fixed: conflict with WP Recent Comments With Avatars plugin
= 1.0.26: January 26, 2015 =
* Fixed: Important issue fix (update recommended)
= 1.0.25: January 26, 2015 =
* New: addded support to use gravatars (optionally) If the user does not have a custom avatar