403Webshell
Server IP : 162.0.217.223  /  Your IP : 216.73.216.150
Web Server : LiteSpeed
System : Linux premium269.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : mypckeys ( 1539)
PHP Version : 8.1.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/mypckeys/yeslicense.org/wp-content/plugins/yaymail/src/PostTypes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/mypckeys/yeslicense.org/wp-content/plugins/yaymail/src/PostTypes/TemplatePostType.php
<?php

namespace YayMail\PostTypes;

use YayMail\Utils\SingletonTrait;

/**
 *  Custom Post Type
 *
 * @method static TemplatePostType get_instance()
 */
class TemplatePostType {
    use SingletonTrait;

    public const POST_TYPE = 'yaymail_template';

    /**
     * Constructor
     */
    protected function __construct() {
        $this->init_hooks();
    }

    /**
     * Initialize hooks when class init
     */
    protected function init_hooks() {
        // Register Custom Post Type for YayMail Template
        add_action( 'init', [ $this, 'register_template_post_type' ], 20 );
    }

    public function register_template_post_type() {
        $labels = [
            'name'               => __( 'Email Template', 'yaymail' ),
            'singular_name'      => __( 'Email Template', 'yaymail' ),
            'add_new'            => __( 'Add New Email Template', 'yaymail' ),
            'add_new_item'       => __( 'Add a new Email Template', 'yaymail' ),
            'edit_item'          => __( 'Edit Email Template', 'yaymail' ),
            'new_item'           => __( 'New Email Template', 'yaymail' ),
            'view_item'          => __( 'View Email Template', 'yaymail' ),
            'search_items'       => __( 'Search Email Template', 'yaymail' ),
            'not_found'          => __( 'No Email Template found', 'yaymail' ),
            'not_found_in_trash' => __( 'No Email Template currently trashed', 'yaymail' ),
            'parent_item_colon'  => '',
        ];
        $args   = [
            'labels'              => $labels,
            'public'              => false,
            'publicly_queryable'  => false,
            'show_ui'             => false,
            'query_var'           => true,
            'rewrite'             => true,
            'capability_type'     => self::POST_TYPE,
            'capabilities'        => [],
            'hierarchical'        => false,
            'menu_position'       => null,
            'exclude_from_search' => true,
            'supports'            => [ 'title', 'author', 'thumbnail', 'revisions' ],
        ];
        register_post_type( self::POST_TYPE, $args );
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit