Skip to content

Instantly share code, notes, and snippets.

@clakeb
Last active August 29, 2015 14:03
Show Gist options
  • Save clakeb/d2326e3d48b4a12ddcdc to your computer and use it in GitHub Desktop.
Save clakeb/d2326e3d48b4a12ddcdc to your computer and use it in GitHub Desktop.
Filter Genesis Comment Instructions
<?php // don't use the opening php tag in functions.php if you don't need to.
add_filter( 'comment_form_defaults', 'cbb_my_handy_change_comment_instr_function' ); // name your function whatever you want. I like to add a company or project prefix like "cbb_"
function cbb_my_handy_change_comment_instr_function( $cbb_some_variable ) {
$cbb_fields['must_log_in'] = '<p class="must-log-in">' . sprintf( __( 'You must be <a href="%s">logged in</a> to post a comment.' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>';
return $cbb_fields;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment