PluginProbe
Timetics – Appointment Booking Calendar & Scheduling / 1.0.64
Timetics – Appointment Booking Calendar & Scheduling v1.0.64
1.0.64 1.0.62 1.0.63 1.0.61 1.0.60 1.0.59 1.0.58 1.0.57 1.0.56 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.20 1.0.21 All 65 releases
timetics / vendor / themewinter / email-notification-sdk / src / Flow / FlowCPT.php

FlowCPT.php in Timetics – Appointment Booking Calendar & Scheduling 1.0.64, at vendor/themewinter/email-notification-sdk/src/Flow/FlowCPT.php

81 lines 3.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Ens\Flow;
3
4 use Ens\Config;
5 use Ens\Utils\Helpers;
6
7 /**
8 * Class FlowCPT
9 *
10 * @package Ens\Flow
11 *
12 * @since 1.0.0
13 */
14 class FlowCPT {
15
16 protected $identifier;
17
18 /**
19 * Register post type.
20 *
21 * @since 1.0.0
22 *
23 * @return void
24 */
25 public function register($identifier) {
26 $this->identifier = $identifier;
27 add_action( 'init', [$this, 'register_post_type'] );
28 }
29
30 /**
31 * Register post type.
32 *
33 * @since 1.0.0
34 *
35 * @return void
36 */
37 public function register_post_type() {
38 $plugin_name = Helpers::get_config_data( $this->identifier,'plugin_name' );
39 $prefix_for_cpt = Helpers::get_config_data( $this->identifier,'general_prefix' );
40 $text_domain = Helpers::get_config_data( $this->identifier,'text_domain' );
41
42 $labels = array(
43 'name' => __( $plugin_name . ' Notification Flow', $text_domain ),
44 'singular_name' => __( $plugin_name . ' Notification Flow', $text_domain ),
45 'menu_name' => __( $plugin_name . ' Notification Flow', $text_domain ),
46 'add_new' => __( 'Add New', $text_domain ),
47 'add_new_item' => __( 'Add New ' . $plugin_name . ' Notification Flow', $text_domain ),
48 'edit' => __( 'Edit', $text_domain ),
49 'edit_item' => __( 'Edit ' . $plugin_name . ' Notification Flow', $text_domain ),
50 'new_item' => __( 'New ' . $plugin_name . ' Notification Flow', $text_domain ),
51 'view' => __( 'View', $text_domain ),
52 'view_item' => __( 'View ' . $plugin_name . ' Notification Flow', $text_domain ),
53 'search_items' => __( 'Search ' . $plugin_name . ' Notification Flow', $text_domain ),
54 'not_found' => __( 'No ' . $plugin_name . ' notification flow found', $text_domain ),
55 'not_found' => __( 'No ' . $plugin_name . ' notification flow found', $text_domain ),
56 'not_found_in_trash' => __( 'No ' . $plugin_name . ' notification flow found in trash', $text_domain ),
57 'parent' => __( 'Parent ' . $plugin_name . ' notification flow', $text_domain ),
58 );
59
60 $args = array(
61 'labels' => $labels,
62 'public' => true,
63 'publicly_queryable' => true,
64 'show_ui' => true,
65 'show_in_menu' => false,
66 'query_var' => true,
67 'rewrite' => array( 'slug' => $prefix_for_cpt . '-flow' ),
68 'capability_type' => 'post',
69 'has_archive' => true,
70 'hierarchical' => false,
71 'menu_position' => null,
72 'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt' ),
73 );
74
75 register_post_type(
76 $prefix_for_cpt . '-flow',
77 $args
78 );
79 }
80 }
81