PluginProbe
Assistant – Every Day Productivity Apps / trunk
Assistant – Every Day Productivity Apps vtrunk
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 trunk, at backend/src/PostTypes/NotationsPostType.php

48 lines 1.0 KB
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 use FL\Assistant\Helpers\BeaverBuilderHelper;
8
9 /**
10 * Class NotationsPostType
11 * @package FL\Assistant\PostTypes
12 */
13 class NotationsPostType extends PostTypeAbstract {
14
15 protected $labels;
16
17 public function __construct( LabelsRepository $labels ) {
18 $this->labels = $labels;
19 }
20
21 /**
22 * @return void
23 */
24 public function register() {
25 if ( BeaverBuilderHelper::is_assistant_extension() ) {
26 return;
27 }
28
29 register_post_type(
30 'fl_asst_notation', [
31 'label' => __( 'Assistant Notation', 'assistant' ),
32 'public' => false,
33 ]
34 );
35
36 register_taxonomy(
37 'fl_asst_label', [ 'fl_asst_notation' ], [
38 'label' => _x( 'Label', 'Custom taxonomy label.', 'assistant' ),
39 'hierarchical' => false,
40 'public' => false,
41 'show_admin_column' => false,
42 ]
43 );
44
45 $this->labels->save_defaults();
46 }
47 }
48