Skip to content

Instantly share code, notes, and snippets.

@eto4detak
Last active July 13, 2019 10:57
Show Gist options
  • Save eto4detak/6672d549324a4a0f1f2d8a64e3dfa6e6 to your computer and use it in GitHub Desktop.
Save eto4detak/6672d549324a4a0f1f2d8a64e3dfa6e6 to your computer and use it in GitHub Desktop.
wp php validate
<?php
if (!empty($_POST['submit']) && $_POST['submit'] == 'up_settings' && isset($_POST['settings'])) {
$fields = array_diff($_POST['settings'], array(''));
foreach ($fields as $key => $value) {
self::update_general_settings($key, $value);
}
}
wp_nonce_field( 'wpestate_regular_search', 'wpestate_regular_search_nonce' );
?>
<div class="col-md-6" style="display: none">
<input type="text" id="check_in" class="form-control" name="apartment-number" placeholder="<?php esc_html_e('Apartment number','wprentals');?>" value="<?php if(isset( $_GET['apartment-number'] )){echo wp_kses ( esc_attr($_GET['apartment-number']),$allowed_html);}?>" >
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment