<?php

 ini_set('display_errors', 'Off');

/*
// this might not be necessary.

//fix for cookie error while login.
function set_wp_test_cookie() {
	setcookie(TEST_COOKIE, 'WP Cookie check', 0, COOKIEPATH, COOKIE_DOMAIN);
	if ( SITECOOKIEPATH != COOKIEPATH )
		setcookie(TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN);
}
if(in_array($_SERVER['PHP_SELF'], array('/wp/wp-login.php', '/wp/wp-register.php'))){
add_action( 'after_setup_theme', 'set_wp_test_cookie', 101 );
}

*/

add_filter('widget_text', 'do_shortcode');


add_filter('comment_form_default_fields', 'nltp_form_placeholders', 11);

function nltp_form_placeholders(){

	// if you pass this function an argument, it's the ID of the page.  
	// which we don't require.
	

	// we don't really need to call this because it's known.
	// except whoops yes we do.
$commenter = wp_get_current_commenter();
	/*
$req = get_option( 'require_name_email' );
$aria_req = ( $req ? " aria-required='true'" : '' );	
*/


	
	$fields =  array(

  'author' =>
    '<p class="comment-form-author">
		<label for="author">&nbsp;</label> 
		<span class="required">*</span><br />
		<input placeholder="' . __( 'Name', 'sparkling' ) . '" id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) .
    '" size="30" aria-required="true" /></p>',

  'email' =>
    '<p class="comment-form-email">
	<label for="email">&nbsp;</label> 
	<span class="required">*</span><br />
	<input placeholder="' . __( 'Email', 'sparkling' ) . '" id="email" name="email" type="text" value="' . esc_attr(  $commenter['comment_author_email'] ) .
    '" size="30" aria-required="true" /></p>',

  'url' =>
    '<p class="comment-form-url"><label for="url">&nbsp;</label>' .
    '<input placeholder="' . __( 'Website', 'sparkling' ) . '" id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) .
    '" size="30" /></p>',
);

return $fields;

}

add_filter('comment_form_field_comment', 'nltp_comment_form_field_comment', 11);

function nltp_comment_form_field_comment(){
	return '<p class="comment-form-comment">
	<label for="comment">&nbsp;</label>
	<textarea placeholder="' . __( 'Your Comment', 'sparkling' ) . '" id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>';
} 