Support » Plugin: Front End PM » How to change text on ‘Directory’ button

  • Resolved onlinecnctns

    (@onlinecnctns)


    I’m trying the code below and it’s not working.

    add_filter(‘fep_menu_buttons’, function( $menu ){
    $menu[‘directory’][‘title’] = sprintf(__(‘Member Directory’, ‘front-end-pm’), fep_get_new_message_button() );
    return $menu;
    });

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Shamim Hasan

    (@shamim51)

    where did you added this code?
    Code seems ok. You can try__( 'Member Directory', 'front-end-pm' )

    Thread Starter onlinecnctns

    (@onlinecnctns)

    It is the functions.php file.

    Here is the code I’ve been using and the other buttons were renamed and removed ok, this is the only one that is not working.

    add_filter(‘fep_menu_buttons’, function( $menu ){
    $menu[‘newmessage’][‘title’] = sprintf(__(‘Send a New Lead’, ‘front-end-pm’), fep_get_new_message_button() );
    return $menu;
    });

    add_filter(‘fep_menu_buttons’, function( $menu ){
    $menu[‘message_box’][‘title’] = sprintf(__(‘Lead Archive’, ‘front-end-pm’), fep_get_new_message_button() );
    return $menu;
    });

    add_filter(‘fep_menu_buttons’, function( $menu ){
    $menu[‘directory’][‘title’] = sprintf(__( ‘Member Directory’, ‘front-end-pm’ ), fep_get_new_message_button() );
    return $menu;
    });

    add_filter( ‘fep_menu_buttons’, ‘fep_cus_fep_menu_buttons’, 99 );

    function fep_cus_fep_menu_buttons( $menu )
    {
    unset( $menu[‘announcements’] );
    unset( $menu[‘settings’] );
    return $menu;
    }

    Plugin Author Shamim Hasan

    (@shamim51)

    Use following code

    add_filter('fep_menu_buttons', function( $menu ){
    	$menu['directory']['title'] = __( 'Member Directory', 'front-end-pm' );
    	return $menu;
    }, 20);
    
    Thread Starter onlinecnctns

    (@onlinecnctns)

    That worked, thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to change text on ‘Directory’ button’ is closed to new replies.