setIcon('offer') ->make([ 'rewrite' => [ 'slug' => 'offers', 'with_front' => false, ], 'taxonomies' => [ 'city', 'offer_for', ], ]) ->setAll([ 'show_directory', 'hide_single', 'redirect_to_author', 'favouritable', 'karma', 'show_feed' ]) ->setIntegration('facebook') ->setIntegration('instagram'); //$directory = $offer->getConfig('directory'); } function aei_offer_fields():void { if (!class_exists('JVBase\registrar\Registrar')) { return; } $offer = Registrar::getInstance('offer'); // $breadcrumbs = $offer->config('breadcrumbs'); // $breadcrumbs->setCrumb('section'); $fields = $offer->fields(); $fields->modifyField('post_thumbnail', 'label', 'Main Image'); $fields->modifyField('post_content', 'label', 'Notes (optional)'); $fields->addField('gallery', [ 'type' => 'upload', 'label' => 'Additional Images', ]); $fields->addField('referral_code', [ 'type' => 'text', 'label' => 'Referral Code', 'hint' => 'Some sort of tracking code to gauge how well it\'s working' ]); $fields->addField('url', [ 'type' => 'url', 'label' => 'Target URL', 'hint' => 'Where you want folks to be directed to.' ]); $fields->addField('offer_for', [ 'type' => 'selector', 'subtype' => 'taxonomy', 'taxonomy' => 'offer_for', 'label' => 'Offer for', ]); } function aei_offer_schema():array { return [ 'type' => 'JVBase\managers\SEO\render\Thing\Intangible\Offer', 'name' => '{{post_title}} | by our supporter {{post_author.name}}', ]; } function aei_offer_meta():array { return[ 'name' => '{{post_title}} | by {{post_author.name}} {{post_author.city}} Offer Artist', 'description' => '{{style}} {{colour}} {{theme}} offer in {{post_author.city}}.', ]; } function aei_offer_archive(array $defaults):array { return array_merge($defaults, [ 'name' => 'Edmonton\'s Best Offers', 'description' => 'Offers in Edmonton, Alberta.' ]); } function aei_offer_reference_schema(array $defaults):array { return $defaults; }