Ejemplo n.º 1
0
 /**
  * Save the results from the term edit page
  *
  * @global $post
  * @param string $term_id
  */
 function edit_terms($term_id)
 {
     if (isset($_POST['action']) && $_POST['action'] == 'add-tag') {
         $nonce_action = 'associated_icon-new';
     } else {
         $nonce_action = 'associated_icon-' . $term_id;
     }
     if (isset($_POST['_associated_icon_nonce']) && wp_verify_nonce($_POST['_associated_icon_nonce'], $nonce_action)) {
         $taxonomy = $_REQUEST['taxonomy'];
         largo_update_term_meta($taxonomy, $term_id, 'associated_icon_uid', $_POST['associated_icon']);
     }
 }
Ejemplo n.º 2
0
 /**
  * Save the results from the term edit page
  */
 function edit_terms($term_id)
 {
     if (isset($_POST['action']) && $_POST['action'] == 'add-tag') {
         $nonce_action = 'custom_sidebar-new';
     } else {
         $nonce_action = 'custom_sidebar-' . $term_id;
     }
     if (isset($_POST['_custom_sidebar_nonce']) && wp_verify_nonce($_POST['_custom_sidebar_nonce'], $nonce_action)) {
         $taxonomy = $_REQUEST['taxonomy'];
         largo_update_term_meta($taxonomy, $term_id, 'custom_sidebar', $_POST['custom_sidebar']);
     }
 }