PHP 8.2.31
Preview: cpt.php Size: 390 B
//home/nshryvcy/radiantskinclinics.org/wp-content/plugins/metform/base/cpt.php

<?php
namespace MetForm\Base;
defined( 'ABSPATH' ) || exit;

abstract Class Cpt{

    public function __construct() {
        
        $name = $this->get_name();
        $args = $this->post_type();

        add_action('init',function() use($name,$args) {
            register_post_type( $name, $args );
        });  
    }

    public abstract function post_type();

}

Directory Contents

Dirs: 0 × Files: 4

Name Size Perms Modified Actions
1.04 KB lrw-r--r-- 2020-08-19 11:58:10
Edit Download
589 B lrw-r--r-- 2020-03-04 18:44:26
Edit Download
390 B lrw-r--r-- 2023-01-08 15:19:54
Edit Download
7.96 KB lrw-r--r-- 2026-06-09 12:11:42
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).