Custom Post Type Object – Undefined Variables
Looks like some minor confusion here and syntax issues. Bad: You’re including the $ sign when setting property values. // Set Variables $this->$post_type_name = strtolower( str_replace( ‘ ‘,’_’, $name) ); $this->$post_type_args = $args; $this->$post_type_lables = $labels; Good: Omit the $ once you’ve declared them. // Set Variables $this->post_type_name = strtolower( str_replace( ‘ ‘,’_’, $name) ); … Read more