diff --git a/assets/js/um-profile.js b/assets/js/um-profile.js index 12238b55..60a7861c 100644 --- a/assets/js/um-profile.js +++ b/assets/js/um-profile.js @@ -23,7 +23,7 @@ jQuery(document).ready(function() { jQuery(this).addClass('active'); }); - jQuery(document).on('click', '.um-cover a, .um-photo a', function(e){ + jQuery(document).on('click', '.um-cover a.um-cover-add, .um-photo a', function(e){ e.preventDefault(); return false; }); diff --git a/includes/admin/core/packages/2.0-beta1.php b/includes/admin/core/packages/2.0-beta1.php index 655b5d0e..a554c1be 100644 --- a/includes/admin/core/packages/2.0-beta1.php +++ b/includes/admin/core/packages/2.0-beta1.php @@ -1017,6 +1017,10 @@ update_option( 'um_roles', $role_keys ); //Content Restriction transfer +global $wp_roles; +if( method_exists($wp_roles,'_init') ){ + $wp_roles->_init(); +} $roles_array = UM()->roles()->get_roles( false, array( 'administrator' ) ); $posts = get_posts( array( @@ -1035,14 +1039,14 @@ if ( ! empty( $posts ) ) { $access_roles = array(); if ( ! empty( $um_access_roles ) ) { - foreach ( $roles_array as $role ) { + foreach ( $roles_array as $role => $role_label ) { if ( in_array( substr( $role, 3 ), $um_access_roles ) ) $access_roles[$role] = '1'; else $access_roles[$role] = '0'; } } else { - foreach ( $roles_array as $role ) { + foreach ( $roles_array as $role => $role_label ) { $access_roles[$role] = '0'; } } diff --git a/includes/core/class-shortcodes.php b/includes/core/class-shortcodes.php index f6534aa1..553b98ac 100644 --- a/includes/core/class-shortcodes.php +++ b/includes/core/class-shortcodes.php @@ -290,14 +290,16 @@ if ( ! class_exists( 'Shortcodes' ) ) { $post_data['template'] = $post_data['mode']; } - $args = array_merge($post_data, $args); + if( 'directory' != $args['mode'] ) { - if ( empty( $args['use_custom_settings'] ) ) { - $args = array_merge( $args, $this->get_css_args( $args ) ); - } else { - $args = array_merge( $this->get_css_args( $args ), $args ); - } + $args = array_merge( $post_data, $args ); + if (empty( $args['use_custom_settings'] )) { + $args = array_merge( $args, $this->get_css_args( $args ) ); + } else { + $args = array_merge( $this->get_css_args( $args ), $args ); + } + } // filter for arguments $args = apply_filters('um_shortcode_args_filter', $args);