<?php
class someClass {
public function __construct($options = null, $initialize = true, $error_messages = null, $path, $qnty) {
//construct what you see fit here....
}
//etc..
}
// Action listener
add_action(
\'action_name\',
create_function(\'\', "new someClass(implode(\',\',func_get_args()));"),
10,
5 // IMPORTANT, number of arguments your construct function accept
);
// Call the action
$options = "options";
$initialize = "initialize";
$error_messages = "error_messages";
$path = "path";
$qnty = "qnty";
do_action(\'action_name\', $options, $initialize, $error_messages, $path, $qnty);
?>