Browse files

updating readme

  • Loading branch information...
1 parent d1d66d6 commit 98f5bdc1a3bd317bcd3319e9c0703b29c04c2b72 @Emerson committed Sep 3, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0
@@ -130,12 +130,14 @@ Sanity takes away much of the pain associated with saving simple custom fields.
// Within your class...
// (the use of underscores is important within WordPress)
var $custom_fields = array('_color', '_year', '_etc');
// With your $custom_fields defined, you now need to render a view within your admin.
// Sanity takes care of populating the $this->data array with your custom_field info.
// Please note that it's important to have the Sanity Nonce field appear once within
// your edit screen, otherwise it will not save your custom fields.
<input type="text" name="_red" value="<?php $this->data['_red']?>" />
<?php sanity_nonce(); // outputs a hidden nonce field ?>

0 comments on commit 98f5bdc

Please sign in to comment.