From d6b44d93695fb131c03660ae4631712e46240caf Mon Sep 17 00:00:00 2001 From: shivapoudel Date: Wed, 4 Feb 2015 21:59:14 +0545 Subject: [PATCH] Docblocks cleanup for WC_Post_types --- includes/class-wc-post-types.php | 67 +++++++++++++++++--------------- 1 file changed, 35 insertions(+), 32 deletions(-) diff --git a/includes/class-wc-post-types.php b/includes/class-wc-post-types.php index 8110fc3083d..186d0fe0618 100644 --- a/includes/class-wc-post-types.php +++ b/includes/class-wc-post-types.php @@ -1,24 +1,27 @@ false, - 'show_ui' => false, - 'show_in_nav_menus' => false, - 'query_var' => is_admin(), - 'rewrite' => false, - 'public' => false - ) ) - ); + apply_filters( 'woocommerce_taxonomy_objects_product_type', array( 'product' ) ), + apply_filters( 'woocommerce_taxonomy_args_product_type', array( + 'hierarchical' => false, + 'show_ui' => false, + 'show_in_nav_menus' => false, + 'query_var' => is_admin(), + 'rewrite' => false, + 'public' => false + ) ) + ); register_taxonomy( 'product_cat', apply_filters( 'woocommerce_taxonomy_objects_product_cat', array( 'product' ) ), @@ -210,7 +213,7 @@ class WC_Post_types { } /** - * Register core post types + * Register core post types. */ public static function register_post_types() { if ( post_type_exists('product') ) { @@ -404,7 +407,7 @@ class WC_Post_types { } /** - * Register our custom post statuses, used for order status + * Register our custom post statuses, used for order status. */ public static function register_post_status() { register_post_status( 'wc-pending', array( @@ -466,13 +469,13 @@ class WC_Post_types { } /** - * Add Product Support to Jetpack Omnisearch - */ - public static function support_jetpack_omnisearch() { - if ( class_exists( 'Jetpack_Omnisearch_Posts' ) ) { - new Jetpack_Omnisearch_Posts( 'product' ); - } - } + * Add Product Support to Jetpack Omnisearch. + */ + public static function support_jetpack_omnisearch() { + if ( class_exists( 'Jetpack_Omnisearch_Posts' ) ) { + new Jetpack_Omnisearch_Posts( 'product' ); + } + } } WC_Post_types::init();