HEX
Server: nginx/1.27.1
System: Linux in-4 5.15.0-131-generic #141-Ubuntu SMP Fri Jan 10 21:18:28 UTC 2025 x86_64
User: ilikadirect (1186)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
Upload Files
File: /storage/v6964/testingff/public_html/fdfctr/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 );
                    flush_rewrite_rules();
                } 
            );
        // }
    }

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