'; $fields['email'] = '

'; $fields['url'] = ''; return $fields; } add_filter( 'comment_form_default_fields', 'my_update_comment_fields' ); /** part 2 **/ function my_update_comment_field( $comment_field ) { $comment_field = '

'; return $comment_field; } add_filter( 'comment_form_field_comment', 'my_update_comment_field' ); /** limit comment length **/ add_filter( 'preprocess_comment', 'wpb_preprocess_comment' ); function wpb_preprocess_comment($comment) { if ( strlen( $comment['comment_content'] ) > 1500 ) { wp_die('You Comment/Reply is too long. Please keep your comment under 1500 characters.'); } if ( strlen( $comment['comment_content'] ) < 4 ) { wp_die('Comment/Reply is too short. Please use at least 4 characters.'); } return $comment; } /** Change Cache Enabler for breadcrumbs **/ add_action( 'save_post', 'cache_enabler_clear_previous_post_cache' ); add_action( 'wp_trash_post', 'cache_enabler_clear_previous_post_cache' ); // clear page cache of previous post when any published 'post' post type has been created, updated, or about to be trashed function cache_enabler_clear_previous_post_cache( $post_id ) { $post_status = get_post_status( $post_id ); $post_type = get_post_type( $post_id ); if ( $post_status !== 'publish' || $post_type !== 'post' ) { return; } global $post; $global_post = $post; $post = get_post( $post_id ); $prev_post = get_previous_post(); $post = $global_post; if ( is_object( $prev_post ) ) { do_action( 'cache_enabler_clear_page_cache_by_post_id', $prev_post->ID ); } }