/**
 * This function generates the form code to be used in the metaboxes
 *
 * @since 0.1
 */
function gsc_defaults_box()
{
    ?>

	<h4>Default Settings</h4>

            <p><?php 
    _e("Title Wrap:", 'gsc');
    ?>
<sup><abbr title="<?php 
    _e('This is the html tag used around the Comment Title and Pings Title.  Make sure you keep the <tag>%s</tag> format for the wrap to work correctly.', 'gsc');
    ?>
">*</abbr></sup>
		<input type="text" name="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[title_wrap]" value="<?php 
    echo esc_attr(gsc_get_option('title_wrap'));
    ?>
" size="27" /></p>

            <p><?php 
    _e("Comment Title:", 'gsc');
    ?>
		<input type="text" name="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[genesis_title_comments]" value="<?php 
    echo esc_attr(gsc_get_option('genesis_title_comments'));
    ?>
" size="27" /></p>

            <p><?php 
    _e("No Comments Text:", 'gsc');
    ?>
		<input type="text" name="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[genesis_no_comments_text]" value="<?php 
    echo esc_attr(gsc_get_option('genesis_no_comments_text'));
    ?>
" size="27" /></p>

            <p><?php 
    _e("Comments Closed Text:", 'gsc');
    ?>
		<input type="text" name="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[genesis_comments_closed_text]" value="<?php 
    echo esc_attr(gsc_get_option('genesis_comments_closed_text'));
    ?>
" size="27" /></p>

            <p><?php 
    _e("Pings Title:", 'gsc');
    ?>
		<input type="text" name="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[genesis_title_pings]" value="<?php 
    echo esc_attr(gsc_get_option('genesis_title_pings'));
    ?>
" size="27" /></p>

            <p><?php 
    _e("No Pings Text:", 'gsc');
    ?>
		<input type="text" name="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[genesis_no_pings_text]" value="<?php 
    echo esc_attr(gsc_get_option('genesis_no_pings_text'));
    ?>
" size="27" /></p>

	<hr class="div" />

            <p><?php 
    _e("Avatar Size:", 'gsc');
    ?>
		<input type="text" name="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[genesis_comment_list_args_avatar_size]" value="<?php 
    echo esc_attr(gsc_get_option('genesis_comment_list_args_avatar_size'));
    ?>
" size="27" /></p>

            <p><?php 
    _e("Author Says Text:", 'gsc');
    ?>
		<input type="text" name="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[comment_author_says_text]" value="<?php 
    echo esc_attr(gsc_get_option('comment_author_says_text'));
    ?>
" size="27" /></p>

            <p><?php 
    _e("Comment Awaiting Moderation Text:", 'gsc');
    ?>
		<input type="text" name="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[genesis_comment_awaiting_moderation]" value="<?php 
    echo esc_attr(gsc_get_option('genesis_comment_awaiting_moderation'));
    ?>
" size="27" /></p>

        <hr class="div" />

        <h5>Form Fields</h5>

            <p><input type="checkbox" name="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[genesis_comment_form_args_fields_aria_display]" id="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[genesis_comment_form_args_fields_aria_display]" value="1" <?php 
    checked(1, gsc_get_option('genesis_comment_form_args_fields_aria_display'));
    ?>
 /> <label for="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[genesis_comment_form_args_fields_aria_display]"><?php 
    _e("Enable Aria Require True Attribute?", 'gsc');
    ?>
<sup><abbr title="<?php 
    _e('This is enabled by default and adds an attribute to the required comment fields that adds a layout of accesibility for visually impaired site visitors.  This attribute is not technically valid XHTML but works in all browsers. Unless you need 100% valid markup at the expense of accesability, leave this option enabled.', 'gsc');
    ?>
">*</abbr></sup></label>
		</p>

            <p><input type="checkbox" name="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[genesis_comment_form_args_fields_author_display]" id="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[genesis_comment_form_args_fields_author_display]" value="1" <?php 
    checked(1, gsc_get_option('genesis_comment_form_args_fields_author_display'));
    ?>
 /> <label for="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[genesis_comment_form_args_fields_author_display]"><?php 
    _e("Display Author Field?", 'gsc');
    ?>
</label>
		</p>

            <p><?php 
    _e("Author Label:", 'gsc');
    ?>
                    <input type="text" name="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[genesis_comment_form_args_fields_author_label]" value="<?php 
    echo esc_attr(gsc_get_option('genesis_comment_form_args_fields_author_label'));
    ?>
" size="27" /></p>

            <p><input type="checkbox" name="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[genesis_comment_form_args_fields_email_display]" id="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[genesis_comment_form_args_fields_email_display]" value="1" <?php 
    checked(1, gsc_get_option('genesis_comment_form_args_fields_email_display'));
    ?>
 /> <label for="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[genesis_comment_form_args_fields_email_display]"><?php 
    _e("Display Email Field?", 'gsc');
    ?>
</label>
		</p>

            <p><?php 
    _e("Email Label:", 'gsc');
    ?>
                    <input type="text" name="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[genesis_comment_form_args_fields_email_label]" value="<?php 
    echo esc_attr(gsc_get_option('genesis_comment_form_args_fields_email_label'));
    ?>
" size="27" /></p>

            <p><input type="checkbox" name="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[genesis_comment_form_args_fields_url_display]" id="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[genesis_comment_form_args_fields_url_display]" value="1" <?php 
    checked(1, gsc_get_option('genesis_comment_form_args_fields_url_display'));
    ?>
 /> <label for="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[genesis_comment_form_args_fields_url_display]"><?php 
    _e("Display URL Field?", 'gsc');
    ?>
</label>
		</p>

            <p><?php 
    _e("URL Label:", 'gsc');
    ?>
                    <input type="text" name="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[genesis_comment_form_args_fields_url_label]" value="<?php 
    echo esc_attr(gsc_get_option('genesis_comment_form_args_fields_url_label'));
    ?>
" size="27" /></p>

            <p><?php 
    _e("Reply Label:", 'gsc');
    ?>
                    <input type="text" name="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[genesis_comment_form_args_title_reply]" value="<?php 
    echo esc_attr(gsc_get_option('genesis_comment_form_args_title_reply'));
    ?>
" size="27" /></p>

            <p><?php 
    _e("Notes Before Comment:", 'gsc');
    ?>
                    <input type="text" name="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[genesis_comment_form_args_comment_notes_before]" value="<?php 
    echo esc_attr(gsc_get_option('genesis_comment_form_args_comment_notes_before'));
    ?>
" size="27" /></p>

            <p><?php 
    _e("Notes After Comment:", 'gsc');
    ?>
                    <input type="text" name="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[genesis_comment_form_args_comment_notes_after]" value="<?php 
    echo esc_attr(gsc_get_option('genesis_comment_form_args_comment_notes_after'));
    ?>
" size="27" /></p>

            <p><?php 
    _e("Submit Button Label:", 'gsc');
    ?>
                    <input type="text" name="<?php 
    echo GSC_SETTINGS_FIELD;
    ?>
[genesis_comment_form_args_label_submit]" value="<?php 
    echo esc_attr(gsc_get_option('genesis_comment_form_args_label_submit'));
    ?>
" size="27" /></p>

<?php 
}
Exemplo n.º 2
0
function gsc_comment_form_args($args)
{
    $commenter = wp_get_current_commenter();
    $req = get_option('require_name_email');
    $aria_req = $req && gsc_get_option('genesis_comment_form_args_fields_aria_display') ? ' aria-required="true"' : '';
    $args = array('fields' => array('author' => '<p class="comment-form-author">' . '<input id="author" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30" tabindex="1"' . $aria_req . ' />' . '<label for="author">' . esc_attr(gsc_get_option('genesis_comment_form_args_fields_author_label')) . '</label> ' . ($req ? '<span class="required">*</span>' : '') . '</p><!-- #form-section-author .form-section -->', 'email' => '<p class="comment-form-email">' . '<input id="email" name="email" type="text" value="' . esc_attr($commenter['comment_author_email']) . '" size="30" tabindex="2"' . $aria_req . ' />' . '<label for="email">' . esc_attr(gsc_get_option('genesis_comment_form_args_fields_email_label')) . '</label> ' . ($req ? '<span class="required">*</span>' : '') . '</p><!-- #form-section-email .form-section -->', 'url' => '<p class="comment-form-url">' . '<input id="url" name="url" type="text" value="' . esc_attr($commenter['comment_author_url']) . '" size="30" tabindex="3" />' . '<label for="url">' . esc_attr(gsc_get_option('genesis_comment_form_args_fields_url_label')) . '</label>' . '</p><!-- #form-section-url .form-section -->'), 'comment_field' => '<p class="comment-form-comment">' . '<textarea id="comment" name="comment" cols="45" rows="8" tabindex="4" aria-required="true"></textarea>' . '</p><!-- #form-section-comment .form-section -->', 'title_reply' => gsc_get_option('genesis_comment_form_args_title_reply'), 'comment_notes_before' => gsc_get_option('genesis_comment_form_args_comment_notes_before'), 'comment_notes_after' => gsc_get_option('genesis_comment_form_args_comment_notes_after'), 'label_submit' => esc_attr(gsc_get_option('genesis_comment_form_args_label_submit')));
    $args['fields']['author'] = gsc_get_option('genesis_comment_form_args_fields_author_display') ? $args['fields']['author'] : '';
    $args['fields']['email'] = gsc_get_option('genesis_comment_form_args_fields_email_display') ? $args['fields']['email'] : '';
    $args['fields']['url'] = gsc_get_option('genesis_comment_form_args_fields_url_display') ? $args['fields']['url'] : '';
    return $args;
}
/**
 * Pull an Simple Comments option from the database, echo value
 *
 * @since 0.1
 */
function gsc_option($hook = null, $field = null)
{
    echo gsc_get_option($hook, $field);
}