WordPress.org

Plugin Directory

Changeset 337946


Ignore:
Timestamp:
01/27/11 20:05:44 (3 years ago)
Author:
JustinSainton
Message:

Rounding the bend on categories work...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-e-commerce/branches/3.8-development/wpsc-admin/includes/save-data.functions.php

    r337941 r337946  
    8282 */ 
    8383 
    84 function wpsc_custom_category_column_data(  $something, $column_name, $tag ) { 
     84function wpsc_custom_category_column_data( $string, $column_name, $tag ) { 
    8585   global $current_screen; 
    86      
    87     return '<img title="Drag to a new position" src="http://wpec.zaowebdesign.com/wp-content/plugins/wp-e-commerce/wpsc-core/images/no-image-uploaded.gif" alt="" width="38" height="38">'; 
     86 
     87   if(isset($cat['image'])){ 
     88      $image = "<img src=\"".WPSC_CATEGORY_URL.stripslashes($cat['image'])."\" title='".$cat['name']."' alt='".$cat['name']."' width='30' height='30' />"; 
     89    }else{ 
     90      $image = "<img src='".WPSC_CORE_IMAGES_URL."/no-image-uploaded.gif' title='".$cat['name']."' alt='".$cat['name']."' width='30' height='30' />"; 
     91    } 
     92 
     93    return $image; 
     94 
    8895} 
    8996/** 
     
    593600 * @return nothing 
    594601 */ 
    595 function wpsc_save_category_set($term_id) { 
     602function wpsc_save_category_set( $term_id ) { 
    596603    global $wpdb; 
    597604    if( !empty( $_POST ) ) { 
     
    628635           
    629636        /* add category code */ 
    630         if($_POST['submit_action'] == "add") { 
     637        if($_POST['action'] == "add_tag") { 
    631638            $name = $_POST['name'];          
    632639            $term = get_term_by('name', $name, 'wpsc_product_category', ARRAY_A); 
     
    692699         
    693700        /* edit category code */ 
    694         if(($_POST['submit_action'] == "edit") && is_numeric($_POST['category_id'])) { 
    695             $category_id = absint($_POST['category_id']); 
     701        if( ( $_POST['action'] == "editedtag" ) && is_numeric( $_POST['tag_ID'] ) ) { 
     702            $category_id = absint($_POST['tag_ID']); 
    696703             
    697704            $name = $_POST['name']; 
Note: See TracChangeset for help on using the changeset viewer.