$unique_id, 'product_desc'=>$product_desc, 'product_name'=>$product_name, 'item_id'=>$item_id, 'html'=>$html); $sql_data = array('%s','%s','%s'); $wpdb->insert( WPEJUNKIE_HTML_CODE_TABLE, $sql, $sql_data); return $wpdb->insert_id; } /********************************** ******* Update Item ***********************************/ //Updae the item function wpejunkie_item_update($unique_id){ global $wpdb; $product_name=esc_html($_REQUEST['product_name']); $product_desc=esc_html($_REQUEST['product_desc']); $item_id=esc_html($_REQUEST['item_id']); $html=esc_html($_REQUEST['html']); $wpdb->update(WPEJUNKIE_HTML_CODE_TABLE, array('product_name'=>$product_name, 'product_desc'=>$product_desc, 'html'=>$html), array( 'unique_id' => $unique_id ) ); return $unique_id; } /********************************** ******* Show Items Form ***********************************/ function wpejunkie_item_update_form($id = ''){ wp_tiny_mce( false , // true makes the editor "teeny" array( "editor_selector" => "theEditor"//This is the class name of your text field ) ); global $wpdb; $update_item = false; if ($_REQUEST['unique_id'] !='' || $id !=''){ $update_item = 'true'; $sql = "SELECT * FROM " . WPEJUNKIE_HTML_CODE_TABLE . " WHERE " . ($_REQUEST['unique_id'] == "" ? "id = '" . $id . "'" : "unique_id = '" . $_REQUEST['unique_id'] . "'"); $wpdb->query($sql); if ($wpdb->num_rows > 0 && $update_item = 'true') $items = $wpdb->get_results($sql); } ?>

    • ' . __('If you do not have an E-junkie.com account, please sign up here.', 'wpejunkie') . '

      ' : '';?>

      E-junkie


      item_id =='' ? '' : ''; ?>


      item_id); ?>


      OPTIONAL: Paste Add to Cart button codes from E-junkie Admin here, if you want to use that instead of the basic Add to Cart button normally generated for this product. This is ONLY required for products using Variants/Variations or a Suggested Price.', 'event_espresso'); ?>


      [button_image], [ejunkie_id], [product_name], [product_description], [item_id]
      ( .)

      product_desc =='' ? '' : stripslashes_deep(html_entity_decode($items[0]->product_desc)), $id = 'product_desc', $prev_id = 'title', $media_buttons = true, $tab_index = 3); ?>
       
    unique_id . '">' : ''; ?> />