fix(01-01): correct CPT registration hook timing
- CPT init hook was being added from within parent init hook - Changed to call register_post_type() directly from main init - Removed redundant hook from CPT constructor - Fixes CPT not registering on plugin activation
This commit is contained in:
@@ -65,8 +65,9 @@ class Umzugsliste {
|
||||
* Initialize plugin components
|
||||
*/
|
||||
public function init() {
|
||||
// Initialize CPT
|
||||
Umzugsliste_CPT::get_instance();
|
||||
// Initialize and register CPT
|
||||
$cpt = Umzugsliste_CPT::get_instance();
|
||||
$cpt->register_post_type();
|
||||
|
||||
// Initialize admin menu
|
||||
if ( is_admin() ) {
|
||||
|
||||
Reference in New Issue
Block a user