====== Unterschiede ====== Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
130623-1 [2013/06/27 13:33] Sunflower doppelte class entfernt |
130623-1 [2019/04/25 14:04] (aktuell) |
||
---|---|---|---|
Zeile 16: | Zeile 16: | ||
remove_filter( 'comment_form_defaults', 'xtreme_comment_form_textarea' ); | remove_filter( 'comment_form_defaults', 'xtreme_comment_form_textarea' ); | ||
</code> | </code> | ||
- | Dann kopiert man sich folgende abgeänderte Funktion in die functions.php des ChildThemes und ändert nach Bedarf die Ausgabe. Im Beispiel habe ich es jetzt auf ''Ihr Kommentar'' abgeändert. | + | Dann kopiert man sich die Funktion(''function xtreme_comment_form_textarea'') aus ''xtreme-one/lib/xtreme-comment-functions.php'' in die functions.php des ChildThemes, bennet diese um und ändert nach Bedarf die Ausgabe. Im Beispiel habe ich es jetzt auf ''Ihr Kommentar'' abgeändert. |
+ | ===== Code für xtreme-one <= 1.5xxxx (bis YAML 3) ===== | ||
<code phpwp> | <code phpwp> | ||
function tc_comment_form_textarea( $args ) { | function tc_comment_form_textarea( $args ) { | ||
Zeile 42: | Zeile 44: | ||
Nachtrag: Doppelte class entfernt, war im Original schon falsch | Nachtrag: Doppelte class entfernt, war im Original schon falsch | ||
+ | |||
+ | ===== Code für xtreme-one >= 1.6.xx(ab YAML 4) ===== | ||
+ | |||
+ | <code phpwp> | ||
+ | function tc_comment_form_textarea( $args ) { | ||
+ | |||
+ | $options = get_option( XF_OPTIONS ); | ||
+ | |||
+ | $aria_req = ''; | ||
+ | if ( TRUE === $options['xc_general']['aria_required']['value'] ) { | ||
+ | $aria_req = " aria-required='true'"; | ||
+ | } | ||
+ | $msg = '<div class="comment-form-comment ym-fbox-text">'; | ||
+ | $msg .= '<label for="comment">Ihr Kommentar</label>'; | ||
+ | $msg .= '<textarea id="comment" name="comment" cols="45" rows="10" tabindex="4" ' . $aria_req . '></textarea>'; | ||
+ | $msg .= '</div>'; | ||
+ | |||
+ | $args['comment_field'] = $msg; | ||
+ | |||
+ | return $args; | ||
+ | } | ||
+ | add_filter( 'comment_form_defaults', 'tc_comment_form_textarea' ); | ||
+ | </code> |