setIcon('folder') ->make([ 'rewrite' => [ 'slug' => 'in/category', 'with_front' => false, 'hierarchical' => true, ], 'for' => [ 'product', 'service', ], ]) ->setAll([ 'show_directory', 'show_feed', ]); //$directory = $product_cat->getConfig('directory'); } function ami_product_cat_fields():void { if (!class_exists('JVBase\registrar\Registrar')) { return; } $product_cat = Registrar::getInstance('product_cat'); // $breadcrumbs = $product_cat->config('breadcrumbs'); $fields = $product_cat->fields(); $fields->addCommon('wiki'); } function ami_product_cat_schema():array { return [ 'name' => '{{post_title}}', ]; } function ami_product_cat_meta():array { return[ 'name' => '{{post_title}}', ]; } function ami_product_cat_archive(array $defaults):array { return array_merge($defaults, [ ]); } function ami_product_cat_reference_schema(array $defaults):array { return $defaults; } // //function ami_category():array //{ // return [ // 'singular' => 'Category', // 'plural' => 'Categories', // 'icon' => 'folder', // 'show_feed' => true, // 'show_directory' => true, // 'rewrite' => [ // 'slug' => 'in', // 'with_front' => false, // 'hierarchical' => true, // ], // 'hierarchical' => true, // 'for_content' => [ // 'product', // 'service', // ], // 'fields' => [ // 'term_name' => [ // 'label' => 'Name', // 'type' => 'text', // 'quickEdit' => true, // ], // 'common' => [ 'wiki' ] // ] // ]; //}