Created
January 20, 2015 16:15
-
-
Save danpastori/ee6546b7f45a2d7088ae to your computer and use it in GitHub Desktop.
Custom field save
This file contains hidden or 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
function page_save( $post_id ){ | |
if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return; | |
if( isset( $_POST['pre-content-text'] ) ){ | |
update_post_meta( $post_id, 'pre-content-text', $_POST['pre-content-text'] ); | |
} | |
if( isset( $_POST['post-content-text'] ) ){ | |
update_post_meta( $post_id, 'post-content-text', $_POST['post-content-text'] ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment