Created
September 5, 2019 11:13
-
-
Save gboudreau/dc94478877dab935edf562f826531906 to your computer and use it in GitHub Desktop.
Diff to fix Ultimate Member Profile Tabs (profile-tabs-for-ultimate-member) for Ultimate Member 2.0.53 and later
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -rbc a/profile-tabs-for-ultimate-member/core.php b/profile-tabs-for-ultimate-member/core.php | |
*** a/profile-tabs-for-ultimate-member/core.php 2018-09-29 16:05:06.000000000 -0400 | |
--- b/profile-tabs-for-ultimate-member/core.php 2019-08-30 00:00:02.000000000 -0400 | |
*************** | |
*** 7,13 **** | |
add_action( 'init', array( $this, 'create_cpt' ) ); | |
add_action( 'admin_menu', array( $this, 'add_admin_page' ) ); | |
add_action( 'template_redirect', array( $this, 'show_profile_tab_content' ), 20 ); | |
! add_filter( 'um_profile_tabs', array( $this, 'add_profile_tabs' ), 9000 ); | |
} | |
function create_cpt() { | |
--- 7,13 ---- | |
add_action( 'init', array( $this, 'create_cpt' ) ); | |
add_action( 'admin_menu', array( $this, 'add_admin_page' ) ); | |
add_action( 'template_redirect', array( $this, 'show_profile_tab_content' ), 20 ); | |
! add_filter( 'um_user_profile_tabs', array( $this, 'add_profile_tabs' ), 9000 ); | |
} | |
function create_cpt() { | |
*************** | |
*** 110,116 **** | |
$posts = get_posts( $args ); | |
$user_role = UM()->roles()->get_all_user_roles( get_current_user_id() ); | |
! $profile_role = UM()->roles()->get_all_user_roles( um_get_requested_user() ); | |
if ( empty( $user_role ) ) { | |
$user_role = array(); | |
--- 110,116 ---- | |
$posts = get_posts( $args ); | |
$user_role = UM()->roles()->get_all_user_roles( get_current_user_id() ); | |
! $profile_role = UM()->roles()->get_all_user_roles( um_profile_id() ); | |
if ( empty( $user_role ) ) { | |
$user_role = array(); | |
diff -rbc a/profile-tabs-for-ultimate-member/pp-tabs.php b/profile-tabs-for-ultimate-member/pp-tabs.php | |
*** a/profile-tabs-for-ultimate-member/pp-tabs.php 2018-09-29 16:05:06.000000000 -0400 | |
--- b/profile-tabs-for-ultimate-member/pp-tabs.php 2019-08-30 00:28:26.000000000 -0400 | |
*************** | |
*** 2,10 **** | |
/** | |
* Plugin Name: Ultimate Member - Profile Tabs | |
* Plugin URI: https://www.plusplugins.com | |
! * Description: Add custom profile tabs to your Ultimate Member site with content area and privacy settings. | |
* Author: PlusPlugins | |
! * Version: 2.1.1 | |
* Author URI: https://www.plusplugins.com | |
* Text Domain: profile-tabs-for-ultimate-member | |
* Domain Path: /languages | |
--- 2,10 ---- | |
/** | |
* Plugin Name: Ultimate Member - Profile Tabs | |
* Plugin URI: https://www.plusplugins.com | |
! * Description: Add custom profile tabs to your Ultimate Member site with content area and privacy settings. Edited version of 2.1.1 of Merck del Moro of NerbMedia to Fix the Issue in Version UM 2.0.56 | |
* Author: PlusPlugins | |
! * Version: 2019.08.30 | |
* Author URI: https://www.plusplugins.com | |
* Text Domain: profile-tabs-for-ultimate-member | |
* Domain Path: /languages |
Where to put this code?
Hello, did you managed to find out where to put this code?
Managed to find out. You replace the first "yellow" line with the change of the second "yellow" line at core.php and pp-tabs.php
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Where to put this code?