get_id(), $setting->get_title(), array( $this, 'display_meta_box' ), $post_type, 'normal', 'default', $setting->get_groups() ); } } /** * Saving meta data from custom fields in post edit page. * * @param int $post_id Post id. */ public function save_post( $post_id ) { if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { return; } if ( wp_is_post_autosave( $post_id ) || wp_is_post_revision( $post_id ) ) { return; } if ( ! filter_input( INPUT_POST, SCF_Config::NAME, FILTER_DEFAULT, FILTER_REQUIRE_ARRAY ) ) { return; } $this->save( filter_input_array( INPUT_POST ), get_post( $post_id ) ); } }