Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    My suggestion would be to use the pms_login_form_logged_in_message filter if you want to change that label directly in the code.

    – Create an empty plugin like this: https://gist.github.com/sareiodata/76f701e01db6685829db

    – Add the following code to the end of it:

    – Code

    – Install this plugin via FTP (copy it inside wp-content/plugins) or create a zip archive with it and install it via the WordPress plugin upload functionality

    If you follow the steps above you will not lose the changes when you will update PMS.

    Best regards,

    Thread Starter sigwinstonwolf

    (@sigwinstonwolf)

    missing the code

    Hi,

    Add this in the plugin:

    /*
     * Filter the logged in message from the PMS login form. Tags: logged in, login
     */
    
    add_filter('pms_login_form_logged_in_message', 'pmsc_custom_logged_in_msg', 20, 3);
        function pmsc_custom_logged_in_msg($output, $user_id, $display_name){
        $user = get_user_by("ID", $user_id);
        $logout_url = '<a href="' . wp_logout_url( pms_get_current_page_url() ) . '" title="' . __( 'Log out of this account', 'paid-member-subscriptions' ) . '">' . __( 'Log out', 'paid-member-subscriptions' ) . '</a>';
        return '<p class="pms-alert">' . sprintf(__( 'My Custom text - You are login as %1$s. %2$s', 'paid-member-subscriptions' ), $user->display_name, $logout_url . '</p>', $user->ID, $user->display_name );
    }

    Best regards,

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘"Currently logged in" message translation’ is closed to new replies.