Contact
Contact
function save_seo_properties($post_id, $post_data)
{
// Get the submited form data
$post_data = array_merge($post_data, $this->CI->input->post('data'));
$post_type = (isset($post_data['post_type']) && !empty($post_data['post_type'])) ? $post_data['post_type'] : '';
$meta_title = (isset($post_data['meta_title']) && !empty($post_data['meta_title'])) ? $post_data['meta_title'] : '';
$meta_keyword = (isset($post_data['meta_keyword']) && !empty($post_data['meta_keyword'])) ? $post_data['meta_keyword'] : '';
$meta_description = (isset($post_data['meta_description']) && !empty($post_data['meta_description'])) ? $post_data['meta_description'] : '';
// Insert / Update submited form data into meta table
if (!empty($meta_title))
{
$this->CI->meta_model->update_meta($post_type, $post_id, 'meta_title', $meta_title);
}
if (!empty($meta_title))
{
$this->CI->meta_model->update_meta($post_type, $post_id, 'meta_keyword', $meta_keyword);
}
if (!empty($meta_title))
{
$this->CI->meta_model->update_meta($post_type, $post_id, 'meta_description', $meta_description);
}
}
{
// Get the submited form data
$post_data = array_merge($post_data, $this->CI->input->post('data'));
$post_type = (isset($post_data['post_type']) && !empty($post_data['post_type'])) ? $post_data['post_type'] : '';
$meta_title = (isset($post_data['meta_title']) && !empty($post_data['meta_title'])) ? $post_data['meta_title'] : '';
$meta_keyword = (isset($post_data['meta_keyword']) && !empty($post_data['meta_keyword'])) ? $post_data['meta_keyword'] : '';
$meta_description = (isset($post_data['meta_description']) && !empty($post_data['meta_description'])) ? $post_data['meta_description'] : '';
// Insert / Update submited form data into meta table
if (!empty($meta_title))
{
$this->CI->meta_model->update_meta($post_type, $post_id, 'meta_title', $meta_title);
}
if (!empty($meta_title))
{
$this->CI->meta_model->update_meta($post_type, $post_id, 'meta_keyword', $meta_keyword);
}
if (!empty($meta_title))
{
$this->CI->meta_model->update_meta($post_type, $post_id, 'meta_description', $meta_description);
}
}