Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Created February 4, 2012 17:49
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 jchristopher/1739167 to your computer and use it in GitHub Desktop.
Save jchristopher/1739167 to your computer and use it in GitHub Desktop.
The update() for our Image of the Month Widget
<?php
function update( $new_instance, $old_instance )
{
$instance = $old_instance;
$instance['headline'] = strip_tags( $new_instance['headline'] );
$instance[$this->image_field] = intval( strip_tags( $new_instance[$this->image_field] ) );
$instance['blurb'] = strip_tags( $new_instance['blurb'] );
return $instance;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment