function save_contact_meta_form($post_id) { // verify the nonce if (!wp_verify_nonce($_POST['dbd_contact_nonce'], $this->nonce_action)) { return $post_id; } // verify the user if (!current_user_can('edit_dbd_post', $post_id)) { return $post_id; } // save the contact data to meta fields dbd_utilities::save_meta_field($post_id, 'contact_name', '_dbd_name'); dbd_utilities::save_meta_field($post_id, 'contact_phone', '_dbd_phone'); dbd_utilities::save_meta_field($post_id, 'contact_email', '_dbd_email'); dbd_utilities::save_meta_field($post_id, 'contact_website', '_dbd_website'); dbd_utilities::save_meta_field($post_id, 'contact_facebook', '_dbd_facebook'); return $post_id; }
function save_location_meta_form($post_id) { // verify the nonce if (!wp_verify_nonce($_POST['dbd_loc_nonce'], $this->nonce_action)) { return $post_id; } // verify the user if (!current_user_can('edit_dbd_post', $post_id)) { return $post_id; } // save the location data to meta fields dbd_utilities::save_meta_field($post_id, 'loc_address1', '_dbd_address1'); dbd_utilities::save_meta_field($post_id, 'loc_address2', '_dbd_address2'); dbd_utilities::save_meta_field($post_id, 'loc_city', '_dbd_city'); dbd_utilities::save_meta_field($post_id, 'loc_state', '_dbd_state'); dbd_utilities::save_meta_field($post_id, 'loc_postalcode', '_dbd_postalcode'); dbd_utilities::save_meta_field($post_id, 'loc_lat', '_dbd_lat'); dbd_utilities::save_meta_field($post_id, 'loc_lng', '_dbd_lng'); return $post_id; }