This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$html_class = sanitize_html_class( $_POST['html_class'] ); | |
update_post_meta( get_the_ID(), 'html_class', $html_class ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$message = wp_kses_post( $_POST['message'] ); | |
update_post_meta( get_the_ID(), 'message', $message ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$excerpt = wp_kses_post( balanceTags( substr( $_POST['content'], 0, 300 ), true ) ); | |
update_post_meta( get_the_ID(), 'excerpt', $excerpt ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
register_meta( 'post', 'email', 'is_email' ); | |
update_post_meta( get_the_ID(), 'email', $_POST['email'] ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$postal_code = $_POST['postal_code']; | |
if ( preg_match( '/[0-9]{5}/', $postal_code ) ) { | |
update_post_meta( get_the_ID(), 'postal_code', $postal_code ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$postal_code = preg_replace( '/[^0-9]/', '', $_POST['postal_code'] ); | |
update_post_meta( get_the_ID(), 'postal_code', $postal_code ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="<?php echo esc_attr( $_POST['layout'] ); ?>"> | |
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy... | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input name="s" placeholder="<?php esc_attr_e( 'Search', 'textdomain' ); ?>" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1><?php echo esc_html( $title ); ?></h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<label> | |
<span><?php _e( 'Label', 'textdomain' ); ?></span> | |
<textarea name="message"><?php echo esc_textarea( $_POST['message'] ); ?></textarea> | |
</label> |