golden hour
/home/godaofbq/dev.hyperredbed.com/wp-content/plugins/shopengine/trunk/base
⬆️ Go Up
Upload
File/Folder
Size
Actions
api.php
1.01 KB
Del
OK
common.php
647 B
Del
OK
cpt.php
586 B
Del
OK
list-model.php
3.61 KB
Del
OK
widget-config.php
870 B
Del
OK
widget.php
1.75 KB
Del
OK
Edit: cpt.php
<?php namespace ShopEngine\Base; defined('ABSPATH') || exit; /** * Cpt Abstract Class. * Cpt Abstract class for custom post type of Builders. * * @since 1.0.0 */ abstract class Cpt { abstract public function post_type(); abstract public function get_name(); /** * __construct function * @since 1.0.0 */ public function __construct() { // get custom post type name $name = $this->get_name(); $args = $this->post_type(); // register custom post type add_action('init', function() use ($name, $args) { register_post_type($name, $args); }); } }
Save