PluginProbe
Assistant – Every Day Productivity Apps / 0.3.1
Assistant – Every Day Productivity Apps v0.3.1
1.5.5 trunk 0.1.0 0.2.0 0.2.1 0.2.2 0.3.0 0.3.1 0.4 0.4.1 0.4.2 0.5.0 0.5.1 0.6.0 0.7.0 0.7.0.2 0.7.0.3 0.7.0.4 0.7.0.5 0.7.0.6 0.7.0.7 0.7.0.8 0.7.0.9 0.7.1 1.0 All 71 releases
assistant / backend / src / PostTypes / NotationsPostType.php

NotationsPostType.php in Assistant – Every Day Productivity Apps 0.3.1, at backend/src/PostTypes/NotationsPostType.php

43 lines 880 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FL\Assistant\PostTypes;
4
5 use FL\Assistant\System\Contracts\PostTypeAbstract;
6 use FL\Assistant\Data\Repository\LabelsRepository;
7
8 /**
9 * Class NotationsPostType
10 * @package FL\Assistant\PostTypes
11 */
12 class NotationsPostType extends PostTypeAbstract {
13
14 protected $labels;
15
16 public function __construct( LabelsRepository $labels ) {
17 $this->labels = $labels;
18 }
19
20 /**
21 * @return void
22 */
23 public function register() {
24 register_post_type(
25 'fl_asst_notation', [
26 'label' => __( 'Assistant Notation', 'fl-assistant' ),
27 'public' => false,
28 ]
29 );
30
31 register_taxonomy(
32 'fl_asst_label', [ 'fl_asst_notation' ], [
33 'label' => _x( 'Label', 'Custom taxonomy label.', 'fl-assistant' ),
34 'hierarchical' => false,
35 'public' => false,
36 'show_admin_column' => false,
37 ]
38 );
39
40 $this->labels->save_defaults();
41 }
42 }
43