Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metabox and other functions for subhead #19

Merged
merged 10 commits into from
Jun 3, 2020
Prev Previous commit
visually hide the label for the form, correct misconceptions about wh…
…at isn't allowed in this meta field
benlk committed Jun 3, 2020
commit 9c9338ed10146adb4b7c823e5018fb29937ad303
6 changes: 3 additions & 3 deletions library/metabox-subhead.php
Original file line number Diff line number Diff line change
@@ -33,14 +33,14 @@ function subtitle_meta_box_display() {
$values = get_post_custom( $post->ID );
wp_nonce_field( 'subtitle_meta_box_nonce', 'subtitle_meta_box_nonce' );
?>
<label for="subtitle"><?php esc_html_e( 'Subtitle', 'largo' ); ?></label>
<label for="subtitle" class="screen-reader-text"><?php esc_html_e( 'Subtitle', 'largo' ); ?></label>
<textarea name="subtitle" id="subtitle" class="widefat" rows="2" cols="20"><?php
// PHP open/close are at the textarea boundary so we don't prepend/append this with tabs.
if ( isset( $values['subtitle'] ) ) {
echo wp_kses_post( $values['subtitle'][0] );
echo sanitize_text_field( $values['subtitle'][0] );
}
?></textarea>
<p><small><?php esc_html_e( 'HTML tags that are allowed in posts are allowed in this area.', 'largo' ); ?></small></p>
<p><small><?php esc_html_e( 'Plain text is allowed in the post subtitle.', 'largo' ); ?></small></p>
<?php
}