mardi 3 mai 2016

WordPress: Changing comment_form(); $defaults in plug-in

I'm using the extend comment plugin to change the comment_form(); drastically. Now I want to control the values of the $default options in the plugin. Tested the PHP below, but got the following error:

php:

add_filter( 'comment_form_defaults', $defaults );

function custom_defaults($defaults) {
    $comment_field_hide = '';

    $defaults[ 'label_submit' ] = 'fooBar';
    return $defaults;

}

EDIT: Changed according to the comment below, error is gone, but function doesn't take effect.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire