Created
June 13, 2012 13:44
-
-
Save billerickson/2924155 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Hidden fields on media uploader | |
* | |
* @param $post array, the post data for database | |
* @param $attachment array, attachment fields from $_POST form | |
* @return $post array, modified post data | |
*/ | |
function be_attachment_hidden_field_save( $post, $attachment ) { | |
update_post_meta( $post['ID'], 'be_show_this', 'true' ); | |
return $post; | |
} | |
add_filter( 'attachment_fields_to_save', 'be_attachment_hidden_field_save', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment