Skip to content

Instantly share code, notes, and snippets.

@wpscholar
Created August 9, 2014 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wpscholar/6c9d8f32f7e627f62d2a to your computer and use it in GitHub Desktop.
Save wpscholar/6c9d8f32f7e627f62d2a to your computer and use it in GitHub Desktop.
Sanitize HTML class example
<?php
$html_class = sanitize_html_class( $_POST['html_class'] );
update_post_meta( get_the_ID(), 'html_class', $html_class );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment