HEX
Server: nginx/1.24.0
System: Linux webserver-one 6.8.0-101-generic #101-Ubuntu SMP PREEMPT_DYNAMIC Mon Feb 9 10:15:05 UTC 2026 x86_64
User: www-data (33)
PHP: 8.4.18
Disabled: NONE
Upload Files
File: /srv/www/event-csmcri/wp-content/plugins/wp-event-solution/base/cpt.php
<?php

namespace Etn\Base;

defined( 'ABSPATH' ) || exit;

/**
 * Cpt Abstract Class.
 * Cpt Abstract class for custom post type of Builders.
 *
 * @since 1.0.0
 */
abstract class Cpt {

    /**
     * __construct function
     * @since 1.0.0
     */
    public function __construct() {

        $name = $this->get_name();
        $args = $this->post_type();

        // if( $this->create_cpt() ){
            add_action( 'init', 
                function () use ( $name, $args ) {
                    register_post_type( $name, $args );
                } 
            );
        // }
    }

    public abstract function get_name();
    public abstract function post_type();
}