2010-12-14, 04:41 AM
when a call to a plugin includes a variable as a paremter, such as $this, e.g:
is the object being passed ( $this - in the example) available to the corresponding function I have defined in the plugin as a passed parameter, as in:
is that how that works? And variables are passed by reference, right, so anything I do with my functions local parameter will change the original object passed, right?
sorry, I think I am answering my own question there - they are passed by value.
so, you must return the passed variable back.
$plugins->run_hooks_by_ref("datahandler_post_insert_thread_post", $this);
is the object being passed ( $this - in the example) available to the corresponding function I have defined in the plugin as a passed parameter, as in:
function myPlugin_thread_post($passedVar )
{
//$passedVar is the $this object?
}
is that how that works? And variables are passed by reference, right, so anything I do with my functions local parameter will change the original object passed, right?
sorry, I think I am answering my own question there - they are passed by value.
so, you must return the passed variable back.