Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author myCred

    (@designbymerovingi)

    Hey.

    Yes it was changed with the introduction of multiple point types.

    You can add the following code snippet to your themes functions.php file to change the label:

    add_filter( 'mycred_types', 'adjust_mycred_menu_labels' );
    function adjust_mycred_menu_labels( $types ) {
    	if ( ! array_key_exists( 'mycred_default' ) ) return $types;
    
    	$types['mycred_default'] = 'Points';
    	return $types;
    }

    This will rename your main point type’s name without effecting your settings and should now show “Points History”.

    Thread Starter iamonlythird

    (@iamonlythird)

    Just tested this and nothing was changed. No errors either.

    Is the code functional for you?

    Plugin Author myCred

    (@designbymerovingi)

    You are right, the above code will not work. Especially since array_key_exists is used incorrectly.

    Here is a solution that I tested to be working:

    add_action( 'mycred_add_menu', 'adjust_mycred_menu_labels', 1 );
    function adjust_mycred_menu_labels() {
    	global $mycred_types;
    	$mycred_types['mycred_default'] = 'Points';
    }

    Plugin Author myCred

    (@designbymerovingi)

    But I will need to come up with a better solution. The change comes from 1.4 when custom point types were introduced. Maybe using the myCRED label is not the best way to handle menu naming. I should probably change this to the name you give this point type instead.

    Thread Starter iamonlythird

    (@iamonlythird)

    Thank you, I agree about changing it to the name given to points. Should I use this code or will you roll out an update soon?

    Plugin Author myCred

    (@designbymerovingi)

    You can use this for now if you want, the next update is not scheduled until next week right now. Sorry for the inconvenience.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Change menu title "myCRED History" to something else’ is closed to new replies.