From 18e8376c8a07c598607f9532c4b650b6e609d666 Mon Sep 17 00:00:00 2001 From: david Date: Tue, 19 Jul 2011 19:07:21 +0000 Subject: [PATCH] Ocultados campos especiales de los productos (stock, peso, proveedor, etc) git-svn-id: https://192.168.0.254/svn/Proyectos.OriginalHouse_Web/trunk@57 54e8636e-a86c-764f-903d-b964358a1ae2 --- .../ProductCustomPostType.class.php | 16 ++-- .../ProductCustomFieldsMetabox.class.php | 85 ++++++++++--------- 2 files changed, 56 insertions(+), 45 deletions(-) diff --git a/src/wp-content/plugins/thecartpress/customposttypes/ProductCustomPostType.class.php b/src/wp-content/plugins/thecartpress/customposttypes/ProductCustomPostType.class.php index d41f880..bc3aba4 100644 --- a/src/wp-content/plugins/thecartpress/customposttypes/ProductCustomPostType.class.php +++ b/src/wp-content/plugins/thecartpress/customposttypes/ProductCustomPostType.class.php @@ -53,7 +53,7 @@ class ProductCustomPostType { 'capability_type' => 'post', 'hierarchical' => false, //allways false 'query_var' => true, - 'supports' => array( 'title', 'excerpt', 'editor', 'thumbnail'), + 'supports' => array( 'title', /*'excerpt',*/ 'editor', 'thumbnail'), 'taxonomies' => array( ProductCustomPostType::$PRODUCT_CATEGORY ), // Permalinks format 'rewrite' => array( 'slug' => isset( $thecartpress->settings['product_rewrite'] ) ? $thecartpress->settings['product_rewrite'] : 'products' ), 'has_archive' => isset( $thecartpress->settings['product_rewrite'] ) && $thecartpress->settings['product_rewrite'] != '' ? $thecartpress->settings['product_rewrite'] : 'products', @@ -84,14 +84,14 @@ class ProductCustomPostType { 'rewrite' => array('slug' => isset( $thecartpress->settings['category_rewrite'] ) ? $thecartpress->settings['category_rewrite'] : 'product_category' ), //false ); register_taxonomy( ProductCustomPostType::$PRODUCT_CATEGORY, ProductCustomPostType::$PRODUCT, $register ); - register_taxonomy( ProductCustomPostType::$PRODUCT_TAG, ProductCustomPostType::$PRODUCT, array( + /*register_taxonomy( ProductCustomPostType::$PRODUCT_TAG, ProductCustomPostType::$PRODUCT, array( 'public' => true, 'hierarchical' => false, 'query_var' => true, 'rewrite' => array('slug' => isset( $thecartpress->settings['tag_rewrite'] ) ? $thecartpress->settings['tag_rewrite'] : 'product_tag' ), //false 'label' => __( 'Products Tags', 'tcp' ), - ) ); - register_taxonomy( ProductCustomPostType::$SUPPLIER_TAG, ProductCustomPostType::$PRODUCT, array( + ) );*/ + /*register_taxonomy( ProductCustomPostType::$SUPPLIER_TAG, ProductCustomPostType::$PRODUCT, array( 'hierarchical' => true, 'query_var' => true, 'rewrite' => array('slug' => isset( $thecartpress->settings['supplier_rewrite'] ) ? $thecartpress->settings['supplier_rewrite'] : 'product_supplier' ), //false @@ -105,7 +105,7 @@ class ProductCustomPostType { 'add_new_item' => __( 'Add New Suppliers', 'tcp' ), 'new_item_name' => __( 'New Suppliers Name', 'tcp' ), ), - ) ); + ) );*/ if ( is_admin() ) { add_action( 'manage_posts_custom_column', array( $this, 'managePostCustomColumns' ) ); @@ -114,7 +114,7 @@ class ProductCustomPostType { add_filter( 'request', array( $this, 'request' ) ); //TODO 3.1 add_filter( 'posts_orderby', array( $this, 'defaultPostOrder' ) ); //for quick edit - add_action('quick_edit_custom_box', array( $this, 'quickEditCustomBox' ), 10, 2 ); + //add_action('quick_edit_custom_box', array( $this, 'quickEditCustomBox' ), 10, 2 ); } } @@ -236,12 +236,14 @@ class ProductCustomPostType { 'show_count' => true, 'hide_empty' => true, ) );?> -