Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'comment_form_logged_in_after', 'review_field_fields' );
- add_action( 'comment_form_after_fields', 'review_field_fields' );
- function review_field_fields()
- {
- ?>
- <p class="comment-form-url">
- <label for="url"><?php _e( 'URL' ); ?></label>
- <input type="text" name="url" id="url" />
- </p>
- <?php
- }
- add_action( 'comment_post', 'review_field_insert_comment', 10, 1 );
- function review_field_insert_comment( $comment_id )
- {
- if( isset( $_POST['url'] ) )
- update_comment_meta( $comment_id, 'comment_author_url', esc_attr( $_POST['url'] ) );
- }
Add Comment
Please, Sign In to add comment