Skip to content

Instantly share code, notes, and snippets.

@wpscholar
Created August 9, 2014 12:52
Show Gist options
  • Save wpscholar/6dd286bffb5a98ce99e6 to your computer and use it in GitHub Desktop.
Save wpscholar/6dd286bffb5a98ce99e6 to your computer and use it in GitHub Desktop.
Sanitize url example
<?php
$url = esc_url_raw( $_POST['url'] );
update_post_meta( get_the_ID(), 'url', $url );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment