Removing WPUF Post Lock from User Profile

This topic contains 4 reply and 3 voices, and was last updated by rocketseven 10 years ago
Viewing 4 Posts - 1 through 4 (of 4 total)
Author Posts
February 8, 2014 at 6:46 pm 15238
rocketseven Hey Tareq, This is backend. How would I go about removing the WPUF Post Lock fields injected into a user profile. I used my usual methods of remove_action but am I missing something. Have I got the global correct?

global $wpuf_subscription;
remove_action( 'show_user_profile', array($wpuf_subscription, 'post_lock_form') );
remove_action( 'edit_user_profile', array($wpuf_subscription, 'post_lock_form') );
February 11, 2014 at 1:15 am 15292
Tareq Hasan Tareq Hasan

It’s not coming from WPUF_Subscription class, but from WPUF_Admin_Posting_Profile. Removing any action within a class is always a trouble. If the WPUF_Admin_Posting_Profile was in a global variable, you could do that easily using your method. But as it’s not in any global variable, that would be very difficult to do.

February 11, 2014 at 3:31 pm 15318
Jonathan Jonathan

Hey Tareq,
Thanks for letting me know.
I guess i’ll have to resort to some hacky javascript solution for now 🙁

February 11, 2014 at 3:42 pm 15319
Jonathan Jonathan

If it helps anyone else…


add_action('admin_head','hide_wpuf_lock_from_usertable');
function hide_wpuf_lock_from_usertable() { ?>
<script type="text/javascript">jQuery(document).ready(function($) { $('form#your-profile > h3:eq(4)').hide(); $('form#your-profile > table:eq(4)').hide(); $('form#your-profile').show(); });</script>
<?php }

Be sure to change the value of eq (in both instances) to the position it lands within your user profile screen.

April 8, 2014 at 10:25 am 18235
rocketseven rocketseven

Hello Jonathan and thank you for your help on this.

As im not a programer i dont understand what do i heve to change in your code in order to remove the WPUF post lock section from user profile page in wordpress backend.

I´ve tryed your code in functions.php but it removes all WPUF fields…

Can you please give me a hint?

Thank you so much

Viewing 4 Posts - 1 through 4 (of 4 total)