WordPress.org

Plugin Directory

Changeset 338024


Ignore:
Timestamp:
01/28/11 01:19:18 (3 years ago)
Author:
JustinSainton
Message:

Hopefully fixes quick edit issue for 3.0

Location:
wp-e-commerce/branches/3.8-development/wpsc-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-e-commerce/branches/3.8-development/wpsc-admin/display-items.page.php

    r334402 r338024  
    318318add_filter( 'manage_edit-wpsc-product_sortable_columns', 'wpsc_additional_sortable_column_names' ); 
    319319add_filter( 'manage_edit-wpsc-product_columns', 'wpsc_additional_column_names' ); 
     320add_filter( 'manage_wpsc-product_posts_columns', 'wpsc_additional_column_names' ); 
    320321add_filter( 'posts_orderby', 'wpsc_column_sql_orderby', 10, 2 ); 
    321322 
  • wp-e-commerce/branches/3.8-development/wpsc-admin/includes/save-data.functions.php

    r338015 r338024  
    604604    global $wpdb; 
    605605    if( !empty( $_POST ) ) { 
    606  
    607606        /* Image Processing Code*/ 
    608607        if( ( $_FILES['image'] != null ) && preg_match( "/\.(gif|jp(e)*g|png){1}$/i", $_FILES['image']['name'] ) ) { 
     
    631630                $name = $_POST['name']; 
    632631 
    633                 if( get_term_by( 'name', $name, 'wpsc_product_category', ARRAY_A ) ) 
     632                if( get_term_by( 'name', $name, 'wpsc_product_category', ARRAY_A ) ) { 
     633 
     634                    $category_id= $term['term_id']; 
     635                    $category = get_term_by('id', $category_id, 'wpsc_product_category'); 
     636                    $url_name=$category->slug; 
     637 
    634638                    //Term exists 
    635639                    wp_update_term($category_id, 'wpsc_product_category', array( 
    636640                    'name' => $name , 'parent' => $parent_category 
    637641                )); 
    638                 $term = wp_insert_term( $name, 'wpsc_product_category',array('parent' => $parent_category)); 
     642                } else { 
     643                    //Term does not exist 
     644 
     645                    $term = wp_insert_term( $name, 'wpsc_product_category',array('parent' => $parent_category)); 
     646                } 
    639647 
    640648                if (is_wp_error($term)) { 
     
    643651                        return; 
    644652                } 
    645                 $category_id= $term['term_id']; 
    646                 $category = get_term_by('id', $category_id, 'wpsc_product_category'); 
    647                 $url_name=$category->slug; 
    648653         
    649654        /* edit category code */ 
Note: See TracChangeset for help on using the changeset viewer.