Support » Plugin: Gwolle Guestbook » Submit button

  • Resolved carlager

    (@carlager)


    I want to change the text on the button.

    The following will change the first button

    // Your code goes below
    // Change text button

    function my_gwolle_gb_button( $button ) {
    // $button is a string
    $button = ‘
    <div id=”gwolle_gb_write_button”>
    <input type=”button” value=”Klik og Skriv &raquo” />
    </div>’;

    return $button;
    }
    add_filter( ‘gwolle_gb_button’, ‘my_gwolle_gb_button’, 10, 1 );

    How do I change the text in the “submit” button ?

    • This topic was modified 10 months, 1 week ago by  carlager.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Marcel Pol

    (@mpol)

    Hi, you can use a more general filter for that. Be aware that this does a replace for the whole form, so be carefull what text string you replace.

    function my_gwolle_gb_write( $form_html ) {
    	// $form_html is a string
    	$old = 'Old String';
    	$new = 'New String';
    	$form_html = str_replace( $old, $new, $form_html );
    	return $form_html;
    }
    add_filter( 'gwolle_gb_write', 'my_gwolle_gb_write', 10, 1 );
    Plugin Author Marcel Pol

    (@mpol)

    It could look like this:

    function my_gwolle_gb_write( $form_html ) {
    	// $form_html is a string
    	$old = 'Submit';
    	$new = 'My New Submit';
    	$form_html = str_replace( $old, $new, $form_html );
    	return $form_html;
    }
    add_filter( 'gwolle_gb_write', 'my_gwolle_gb_write', 10, 1 );
    Plugin Author Marcel Pol

    (@mpol)

    For Danish, you can also change the strings in GlotPress. Did you check that out?
    https://translate.wordpress.org/locale/da/default/wp-plugins/gwolle-gb

    If you want, I can request that you become translation editor for this plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Submit button’ is closed to new replies.