| | |
| | | <?php |
| | | // /taxonomies/goal.php |
| | | function altr_goal():array |
| | | |
| | | use JVBase\registrar\Registrar; |
| | | if (!defined('ABSPATH')) { |
| | | exit; |
| | | } |
| | | |
| | | add_action('jvbDefineRegistrar', 'altr_goal'); |
| | | add_action('jvbDefineRegistrarFields', 'altr_goal_fields'); |
| | | |
| | | add_action('plugins_loaded', 'altr_goal',1); |
| | | //Add fields later so we can verify taxonomies/post types exist |
| | | add_action('plugins_loaded', 'altr_goal_fields', 2); |
| | | |
| | | add_filter('altr_GoalSchemaDefault', 'altr_goal_schema'); |
| | | add_filter('altr_GoalMetaDefault', 'altr_goal_meta'); |
| | | add_filter('altr_GoalArchiveDefault', 'altr_goal_archive'); |
| | | |
| | | function altr_goal(){ |
| | | if (!class_exists('JVBase\registrar\Registrar')) { |
| | | return; |
| | | } |
| | | $goal = Registrar::forTerm('goal', 'Goal', 'Goals') |
| | | ->setIcon('crosshair') |
| | | ->make([ |
| | | 'rewrite' => [ |
| | | 'slug' => 'before-and-after/by/goal', |
| | | 'with_front' => false, |
| | | 'hierarchical' => true |
| | | ], |
| | | 'description' => 'Complete tattoo removal or fading for a cover up tattoo (or unknown)', |
| | | 'hierarchical' => true, |
| | | 'for' => [ |
| | | 'progress', |
| | | ], |
| | | ]) |
| | | ->setAll([ |
| | | 'show_directory', |
| | | 'show_feed', |
| | | ]); |
| | | |
| | | //$directory = $goal->getConfig('directory'); |
| | | |
| | | } |
| | | |
| | | function altr_goal_fields():void |
| | | { |
| | | if (!class_exists('JVBase\registrar\Registrar')) { |
| | | return; |
| | | } |
| | | $goal = Registrar::getInstance('goal'); |
| | | |
| | | $fields = $goal->fields(); |
| | | $fields->addCommon('wiki'); |
| | | } |
| | | |
| | | function altr_goal_schema():array |
| | | { |
| | | return [ |
| | | 'singular' => 'Goal', |
| | | 'plural' => 'Goals', |
| | | 'icon' => 'crosshair', |
| | | 'description' => [ |
| | | 'Complete tattoo removal or fading for a cover up tattoo (or unknown)' |
| | | ], |
| | | 'show_feed' => true, |
| | | 'rewrite' => [ |
| | | 'slug' => 'goal', |
| | | 'with_front' => false, |
| | | ], |
| | | 'for_content' => [ |
| | | 'progress', |
| | | ], |
| | | 'fields' => [ |
| | | 'term_name' => [ |
| | | 'label' => 'Name', |
| | | 'type' => 'text', |
| | | 'quickEdit' => true, |
| | | ], |
| | | 'common' => [ 'wiki' ] |
| | | ] |
| | | 'name' => '{{name}} Laser Tattoo Removal Before & Afters', |
| | | ]; |
| | | } |
| | | |
| | | function altr_goal_meta():array |
| | | { |
| | | return[ |
| | | 'name' => '{{name}} – Before & After Laser Tattoo Removal', |
| | | 'description' => 'Before and after results for clients seeking {{term_name}}. See how PicoWay laser technology delivers results in Edmonton.', |
| | | ]; |
| | | } |
| | | |
| | | function altr_goal_archive(array $defaults):array |
| | | { |
| | | return array_merge($defaults, [ |
| | | 'name' => '{{name}} – Laser Tattoo Removal Results', |
| | | ]); |
| | | } |
| | | |
| | | function altr_goal_reference_schema(array $defaults):array |
| | | { |
| | | return $defaults; |
| | | } |
| | | |
| | | // |
| | | //function altr_goal():array |
| | | //{ |
| | | // return [ |
| | | // 'singular' => 'Goal', |
| | | // 'plural' => 'Goals', |
| | | // 'icon' => 'crosshair', |
| | | // 'description' => [ |
| | | // 'Complete tattoo removal or fading for a cover up tattoo (or unknown)' |
| | | // ], |
| | | // 'show_feed' => true, |
| | | // 'show_directory'=> true, |
| | | // 'rewrite' => [ |
| | | // 'slug' => 'before-and-after/by/goal', |
| | | // 'with_front' => false, |
| | | // ], |
| | | // 'for_content' => [ |
| | | // 'progress', |
| | | // ], |
| | | // 'seo' => [ |
| | | // 'meta' => [ |
| | | // 'title' => '{{term_name}} – Before & After Laser Tattoo Removal', |
| | | // 'description' => 'Before and after results for clients seeking {{term_name}}. See how PicoWay laser technology delivers results in Edmonton.', |
| | | // ], |
| | | // 'schema' => [ |
| | | // 'type' => 'CollectionPage', |
| | | // 'name' => '{{term_name}} Before & Afters', |
| | | // ], |
| | | // 'archive' => [ |
| | | // 'type' => 'CollectionPage', |
| | | // 'name' => '{{term_name}} – Laser Tattoo Removal Results', |
| | | // ], |
| | | // ], |
| | | // 'fields' => [ |
| | | // 'term_name' => [ |
| | | // 'label' => 'Name', |
| | | // 'type' => 'text', |
| | | // 'quickEdit' => true, |
| | | // ], |
| | | // 'common' => [ 'wiki' ] |
| | | // ] |
| | | // ]; |
| | | //} |