I have declared a private variable to hold a custom post type arguments array. I can't understabd why when I try to activate the plugin I get always this error: Constant expression contains invalid operations
.
Is there a fix?
code example
<?php
class CustomPostType {
public $services = array( ... );
public function init()
{
register_post_type( 'services', $this->services );
}
}
?>