The problem you're encountering is because you can't initialize class properties by calling other functions.
Initializing a property to a default value like this:
class SomeClass{
...
private $myProp0 = array(); //OK
private $myProp1 = array('foo' => 'bar', 'foooo' => 'baaar'); //OK
private $myProp2 = null; //OK
private $myProp3 = 10; //OK
private $myProp4 = "something"; //OK
private $myProp5 = __('translate me') // NOT OK
...
}
To initialize your property with some other value (e.g. by calling some other function) you must set it in the constructor of your class.
Something like this should work:
function someFunction($x, $y){
return "mouahahaha";
}
class SomeClass{
private $something = array();
public function __construct(){
$this->something = array(
'somekey1' => 'foobar',
'somekey2' => someFunction("foo", "bar"),
);
}
}
In other words , You need to move your array initialization from the class body to a constructor.
Putting that example to your own code :
class o99_custom_fields {
/**
* @var string $prefix The prefix for storing custom fields in the postmeta table
*/
var $prefix = 'o99_';
/**
* @var array $customFields Defines the custom fields available
*/
private $customFields = array();
/**
* PHP 4 Compatible Constructor
*/
function o99_custom_fields() { $this->__construct(); }
/**
* PHP 5 Constructor
*/
public function __construct() {
$this->customFields = array(
array(
"name" => "some_name",
"title" => __("some Title","text_domain"),// NO ERROR NOW
"description" => "Some Desctiption Text",
"type" => "k_upload",
"scope" => array( "post" ),
"capability" => "edit_post"
),
);
// Do your other construct things
} // END __construct