How to change the Publish button text in Gutenberg editor

Question

I want to change the Publish button text to Submit in WordPress Gutenberg editor. How can I do this? Added filter gettext and replaced the text. But this is reflecting only on the old editor

add_filter( 'gettext', 'change_publish_button', 99, 2 );

function change_publish_button( $translation, $text ) {
    if ( $text == 'Publish' ){
        return 'Submit';
    }

    return $translation;
}

enter image description here

0
, UnleashDchaos 4 years 2020-03-06T03:56:10-05:00 0 Answers 117 views 0

Leave an answer

Browse
Browse