Changeset 1913082
- Timestamp:
- 07/22/2018 05:27:54 PM (8 years ago)
- Location:
- profile-tabs-for-ultimate-member
- Files:
-
- 6 edited
- 1 copied
-
tags/2.1.0 (copied) (copied from profile-tabs-for-ultimate-member/trunk)
-
tags/2.1.0/core.php (modified) (3 diffs)
-
tags/2.1.0/pp-tabs.php (modified) (2 diffs)
-
tags/2.1.0/readme.txt (modified) (2 diffs)
-
trunk/core.php (modified) (3 diffs)
-
trunk/pp-tabs.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
profile-tabs-for-ultimate-member/tags/2.1.0/core.php
r1896830 r1913082 110 110 111 111 $posts = get_posts( $args ); 112 $user_role = get_user_meta( get_current_user_id(), 'role', true);113 $profile_role = get_user_meta( um_profile_id(), 'role', true);112 $user_role = UM()->roles()->get_all_user_roles( get_current_user_id() ); 113 $profile_role = UM()->roles()->get_all_user_roles( um_profile_id() ); 114 114 115 115 foreach ( $posts as $post ) { … … 132 132 133 133 if ( ! empty( $have_roles ) ) { 134 if ( ! in_array( $profile_role, $have_roles )) {134 if ( count( array_intersect( $profile_role, $have_roles ) ) <= 0 ) { 135 135 continue; 136 136 } 137 137 } 138 138 139 // if we are here then the profile has that tab - just need to check if user may view 140 139 // if we are here then the profile has that tab - just need to check if user may view 141 140 if ( $private_tab ) { 142 141 143 142 // private tab - user on another profile but can not view 144 if ( um_profile_id() != get_current_user_id() && ! in_array( $user_role, $view_roles )) {143 if ( um_profile_id() != get_current_user_id() && count( array_intersect( $user_role, $view_roles ) ) <= 0 ) { 145 144 continue; 146 145 } 147 146 148 147 } else { 148 149 149 // public tab - user can not view tab 150 150 if ( ! empty( $view_roles ) ) { 151 if ( ! in_array( $user_role, $view_roles )) {151 if ( count( array_intersect( $user_role, $view_roles ) ) <= 0 ) { 152 152 continue; 153 153 } … … 201 201 } ); 202 202 } 203 204 203 } 205 204 206 205 return $tabs; 207 206 } 208 209 207 } -
profile-tabs-for-ultimate-member/tags/2.1.0/pp-tabs.php
r1896830 r1913082 5 5 * Description: Add custom profile tabs to your Ultimate Member site with content area and privacy settings. 6 6 * Author: PlusPlugins 7 * Version: 2. 0.27 * Version: 2.1.0 8 8 * Author URI: https://www.plusplugins.com 9 9 * Text Domain: profile-tabs-for-ultimate-member … … 13 13 define( 'PP_TABS_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 14 14 define( 'PP_TABS_PLUGIN_URI', plugin_dir_url( __FILE__ ) ); 15 define( 'PP_TABS_REQUIRES', '2.0. 4' );15 define( 'PP_TABS_REQUIRES', '2.0.5' ); 16 16 17 17 require_once PP_TABS_PLUGIN_DIR . 'init.php'; -
profile-tabs-for-ultimate-member/tags/2.1.0/readme.txt
r1896830 r1913082 3 3 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TY7RLMFUCPVE4 4 4 Tags: ultimate member, ultimatemember, user profiles, tabs, profile tabs, custom tabs, user tabs, member tabs, reorder tabs, sort tabs, membership tabs, extra tabs 5 Requires at least: 4.1 , Ultimate Member: 2.0.46 Tested up to: 4.9. 6, Ultimate Member: 2.0.175 Requires at least: 4.1 6 Tested up to: 4.9.7 7 7 Requires PHP: 5.6 8 Stable tag: 2. 0.28 Stable tag: 2.1.0 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 83 83 == Changelog == 84 84 85 = 2.1.0 = 86 * Fix: User Role issue with tabs 87 * Update: Confirm UM 2.0 User Roles Logic compatibility 88 * Update: Confirm WordPress 4.9.7 compatibility 89 85 90 = 2.0.2 = 86 91 * Fix: Timeout issue when UM Profile Form shortcode is used -
profile-tabs-for-ultimate-member/trunk/core.php
r1896830 r1913082 110 110 111 111 $posts = get_posts( $args ); 112 $user_role = get_user_meta( get_current_user_id(), 'role', true);113 $profile_role = get_user_meta( um_profile_id(), 'role', true);112 $user_role = UM()->roles()->get_all_user_roles( get_current_user_id() ); 113 $profile_role = UM()->roles()->get_all_user_roles( um_profile_id() ); 114 114 115 115 foreach ( $posts as $post ) { … … 132 132 133 133 if ( ! empty( $have_roles ) ) { 134 if ( ! in_array( $profile_role, $have_roles )) {134 if ( count( array_intersect( $profile_role, $have_roles ) ) <= 0 ) { 135 135 continue; 136 136 } 137 137 } 138 138 139 // if we are here then the profile has that tab - just need to check if user may view 140 139 // if we are here then the profile has that tab - just need to check if user may view 141 140 if ( $private_tab ) { 142 141 143 142 // private tab - user on another profile but can not view 144 if ( um_profile_id() != get_current_user_id() && ! in_array( $user_role, $view_roles )) {143 if ( um_profile_id() != get_current_user_id() && count( array_intersect( $user_role, $view_roles ) ) <= 0 ) { 145 144 continue; 146 145 } 147 146 148 147 } else { 148 149 149 // public tab - user can not view tab 150 150 if ( ! empty( $view_roles ) ) { 151 if ( ! in_array( $user_role, $view_roles )) {151 if ( count( array_intersect( $user_role, $view_roles ) ) <= 0 ) { 152 152 continue; 153 153 } … … 201 201 } ); 202 202 } 203 204 203 } 205 204 206 205 return $tabs; 207 206 } 208 209 207 } -
profile-tabs-for-ultimate-member/trunk/pp-tabs.php
r1896830 r1913082 5 5 * Description: Add custom profile tabs to your Ultimate Member site with content area and privacy settings. 6 6 * Author: PlusPlugins 7 * Version: 2. 0.27 * Version: 2.1.0 8 8 * Author URI: https://www.plusplugins.com 9 9 * Text Domain: profile-tabs-for-ultimate-member … … 13 13 define( 'PP_TABS_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 14 14 define( 'PP_TABS_PLUGIN_URI', plugin_dir_url( __FILE__ ) ); 15 define( 'PP_TABS_REQUIRES', '2.0. 4' );15 define( 'PP_TABS_REQUIRES', '2.0.5' ); 16 16 17 17 require_once PP_TABS_PLUGIN_DIR . 'init.php'; -
profile-tabs-for-ultimate-member/trunk/readme.txt
r1896830 r1913082 3 3 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TY7RLMFUCPVE4 4 4 Tags: ultimate member, ultimatemember, user profiles, tabs, profile tabs, custom tabs, user tabs, member tabs, reorder tabs, sort tabs, membership tabs, extra tabs 5 Requires at least: 4.1 , Ultimate Member: 2.0.46 Tested up to: 4.9. 6, Ultimate Member: 2.0.175 Requires at least: 4.1 6 Tested up to: 4.9.7 7 7 Requires PHP: 5.6 8 Stable tag: 2. 0.28 Stable tag: 2.1.0 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 83 83 == Changelog == 84 84 85 = 2.1.0 = 86 * Fix: User Role issue with tabs 87 * Update: Confirm UM 2.0 User Roles Logic compatibility 88 * Update: Confirm WordPress 4.9.7 compatibility 89 85 90 = 2.0.2 = 86 91 * Fix: Timeout issue when UM Profile Form shortcode is used
Note: See TracChangeset
for help on using the changeset viewer.