Version 1.0.35

This commit is contained in:
ultimatemember
2015-02-01 01:30:04 +02:00
parent df37a3164f
commit 539ebf10d7
41 changed files with 938 additions and 226 deletions
+11
View File
@@ -11,6 +11,17 @@
exit( wp_redirect( remove_query_arg('um_adm_action') ) );
}
/***
*** @Hide exif notice
***/
add_action('um_admin_do_action__um_show_exif_notice', 'um_admin_do_action__um_show_exif_notice');
function um_admin_do_action__um_show_exif_notice( $action ){
global $ultimatemember;
if ( !is_admin() || !current_user_can('manage_options') ) die();
update_option( $action, 1 );
exit( wp_redirect( remove_query_arg('um_adm_action') ) );
}
/***
*** @Opt-in tracking
***/
+1 -1
View File
@@ -348,7 +348,7 @@ class UM_Admin_Metabox {
$where = array( 'ID' => $post_id );
if (empty($_POST['post_title'])) $_POST['post_title'] = 'Role #'.$post_id;
$wpdb->update( $wpdb->posts, array( 'post_title' => $_POST['post_title'] ), $where );
$wpdb->update( $wpdb->posts, array( 'post_title' => $_POST['post_title'], 'post_name' => wp_unique_post_slug( sanitize_title( $_POST['post_title'] ) ) ), $where );
// save
delete_post_meta( $post_id, '_um_can_view_roles' );
+15 -2
View File
@@ -15,9 +15,9 @@ class UM_Admin_Notices {
***/
function main_notices(){
$hide_notice = get_option('um_can_register_notice');
$hide_register_notice = get_option('um_can_register_notice');
if ( !get_option('users_can_register') && !$hide_notice ) {
if ( !get_option('users_can_register') && !$hide_register_notice ) {
echo '<div class="updated" style="border-color: #3ba1da;"><p>';
@@ -26,6 +26,19 @@ class UM_Admin_Notices {
echo '</p></div>';
}
$hide_exif_notice = get_option('um_show_exif_notice');
if ( !extension_loaded('exif') && !$hide_exif_notice ) {
echo '<div class="updated" style="border-color: #3ba1da;"><p>';
echo sprintf(__( 'Exif is not enabled on your server. Mobile photo uploads will not be rotated correctly until you enable the exif extension. <a href="%s">Hide this notice</a>', 'ultimatemember' ), add_query_arg('um_adm_action', 'um_show_exif_notice') );
echo '</p></div>';
}
}
/***
+2 -1
View File
@@ -117,7 +117,8 @@ class UM_Admin_Users {
foreach($users as $user_id){
$ultimatemember->user->set( $user_id );
if ( !um_user('super_admin') ) {
// change role for non-wp admins or non-community admins only
if ( !um_user('super_admin') || um_user('role') != 'admin' ) {
$ultimatemember->user->set_role( $new_role );
} else {
$admin_err = 1;
+9 -1
View File
@@ -7,13 +7,21 @@
<label class="um-admin-half"><?php _e('Can access wp-admin?','ultimatemember'); ?> <?php $this->tooltip( __('The core admin role must always have access to wp-admin / WordPress backend','ultimatemember') ); ?></label>
<span class="um-admin-half"><?php $this->ui_on_off('_um_can_access_wpadmin', 1); ?></span>
</p><div class="um-admin-clear"></div>
<p>
<label class="um-admin-half"><?php _e('Force hiding adminbar in frontend?','ultimatemember'); ?> <?php $this->tooltip( __('Show/hide the adminbar on frontend','ultimatemember') ); ?></label>
<span class="um-admin-half"><?php $this->ui_on_off('_um_can_not_see_adminbar', 0); ?></span>
</p><div class="um-admin-clear"></div>
<?php } else { ?>
<p>
<label class="um-admin-half"><?php _e('Can access wp-admin?','ultimatemember'); ?> <?php $this->tooltip( __('Allow this role to access the admin dashboard. If turned on the WordPress toolbar will appear at top of the page.','ultimatemember') ); ?></label>
<span class="um-admin-half"><?php $this->ui_on_off('_um_can_access_wpadmin', 0); ?></span>
</p><div class="um-admin-clear"></div>
<p>
<label class="um-admin-half"><?php _e('Force hiding adminbar in frontend?','ultimatemember'); ?> <?php $this->tooltip( __('Show/hide the adminbar on frontend','ultimatemember') ); ?></label>
<span class="um-admin-half"><?php $this->ui_on_off('_um_can_not_see_adminbar', 1); ?></span>
</p><div class="um-admin-clear"></div>
<?php } ?>
<p>
<label class="um-admin-half"><?php _e('Can edit other member accounts?','ultimatemember'); ?> <?php $this->tooltip( __('Allow this role to edit accounts of other members','ultimatemember') ); ?></label>
<span class="um-admin-half"><?php $this->ui_on_off('_um_can_edit_everyone', 0, true, 1, 'edit-roles', 'xxx'); ?></span>