Recent Topics

1 Jul 12, 2006 17:38    

Shouldn't call_by_code return the result of the function it is calling....

If not then how do i call a function in my plugin (from outside my plugin, e.g. a skin) and get the functions returned value?

Here is the call_by_code function as 2 days ago;

	/**
	 * Call a specific plugin by its code.
	 *
	 * This will call the SkinTag event handler.
	 *
	 * @param string plugin code
	 * @param array Associative array of parameters (gets passed to the plugin)
	 * @return boolean
	 */
	function call_by_code( $code, $params = array() )
	{
		$Plugin = & $this->get_by_code( $code );

		if( ! $Plugin )
		{
			global $Debuglog;
			$Debuglog->add( 'No plugin available for code ['.$code.']!', array('plugins', 'error') );
			return false;
		}

		$this->call_method_if_active( $Plugin->ID, 'SkinTag', $params );

		return true;
	}


Form is loading...