WP-Members: Membership Framework
[resolved] [Plugin: WP-Members} Sidebar Login Widget changes (4 posts)

  1. Marcus Tibesar
    Posted 3 years ago #

    The WP-Members sidebar login widget is a bit dated and verbose.

    I would like to change the verbage "click here to logout" to just "Logout".

    How would I accomplish this without changing the core files please?

    Thank you very much.


  2. Chad Butler
    Plugin Author

    Posted 3 years ago #

    wpmem_sidebar_status is the filter for the user's login status - you could use that and php's str_replace function.

  3. Marcus Tibesar
    Posted 3 years ago #

    I really am not a php programmer. So I am not fully understanding functions and filters.

    What is the php code that I would insert into my child theme's functions.php file in order to change the verbage from "click here to logout" to just "logout" please?

    Thank you!

  4. Chad Butler
    Plugin Author

    Posted 3 years ago #

    If you want to be able to effectively work with WordPress, you probably should invest some time into learning php so you can use WordPress' action and filter hooks.

    This filter is the exact same concept as the one you used over here: http://wordpress.org/support/topic/plugin-wp-members-customize-submit-button?replies=8#post-2807342 Same concept - different filter. In both of these I even added specific comments to explain to you what the filter is doing so you can expand on this on your own:

    add_filter( 'wpmem_sidebar_status', 'my_sidebar_status_filter' );
    function my_sidebar_status_filter( $string ) {
    	// the html of the form is the parameter $string
    	// use str_replace like:
    	// $new_string = str_replace( $needle, $replacement, $haystack );
    	$string  = str_replace( 'click here to logout', 'logout', $string );
    	return $string;

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP-Members: Membership Framework
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic