Exemplo n.º 1
0
 public function _action_term_edit($term_id, $tt_id, $taxonomy)
 {
     if (!isset($_POST['action']) || !isset($_POST['taxonomy'])) {
         return;
         // this is not real term form submit, abort save
     }
     $old_values = (array) fw_get_db_term_option($term_id, $taxonomy);
     fw_set_db_term_option($term_id, $taxonomy, null, array_merge($old_values, fw_get_options_values_from_input(fw()->theme->get_taxonomy_options($taxonomy))));
     do_action('fw_save_term_options', $term_id, $taxonomy, $old_values);
 }
Exemplo n.º 2
0
 public function _action_term_edit($term_id, $tt_id, $taxonomy)
 {
     if (!isset($_POST['action']) || !isset($_POST['taxonomy'])) {
         return;
         // this is not real term form submit, abort save
     }
     fw_set_db_term_option($term_id, $taxonomy, null, fw_get_options_values_from_input(fw()->theme->get_taxonomy_options($taxonomy)));
 }
Exemplo n.º 3
0
 public function _action_term_edit($term_id, $tt_id, $taxonomy)
 {
     if (isset($_POST['action']) && 'editedtag' === $_POST['action'] && isset($_POST['taxonomy']) && ($taxonomy = get_taxonomy($_POST['taxonomy'])) && current_user_can($taxonomy->cap->edit_terms)) {
         /* ok */
     } else {
         return;
     }
     if (intval(FW_Request::POST('tag_ID')) != $term_id) {
         // the $_POST values belongs to another term, do not save them into this one
         return;
     }
     $options = fw()->theme->get_taxonomy_options($taxonomy->name);
     if (empty($options)) {
         return;
     }
     $old_values = (array) fw_get_db_term_option($term_id, $taxonomy->name);
     fw_set_db_term_option($term_id, $taxonomy->name, null, fw_get_options_values_from_input($options));
     do_action('fw_save_term_options', $term_id, $taxonomy->name, $old_values);
 }
Exemplo n.º 4
-1
 public function _action_term_edit($term_id, $tt_id, $taxonomy)
 {
     if (!isset($_POST['action']) || !isset($_POST['taxonomy'])) {
         return;
         // this is not real term form submit, abort save
     }
     if (intval(FW_Request::POST('tag_ID')) != $term_id) {
         // the $_POST values belongs to another term, do not save them into this one
         return;
     }
     $old_values = (array) fw_get_db_term_option($term_id, $taxonomy);
     fw_set_db_term_option($term_id, $taxonomy, null, fw_get_options_values_from_input(fw()->theme->get_taxonomy_options($taxonomy)));
     do_action('fw_save_term_options', $term_id, $taxonomy, $old_values);
 }