diff options
Diffstat (limited to 'engine/classes/ElggPlugin.php')
| -rw-r--r-- | engine/classes/ElggPlugin.php | 22 | 
1 files changed, 11 insertions, 11 deletions
| diff --git a/engine/classes/ElggPlugin.php b/engine/classes/ElggPlugin.php index 4aee1e898..c4d6ec034 100644 --- a/engine/classes/ElggPlugin.php +++ b/engine/classes/ElggPlugin.php @@ -264,8 +264,6 @@ class ElggPlugin extends ElggObject {  	/**  	 * Returns a plugin setting  	 * -	 * @todo These need to be namespaced -	 *  	 * @param string $name The setting name  	 * @return mixed  	 */ @@ -318,7 +316,6 @@ class ElggPlugin extends ElggObject {  	 * Set a plugin setting for the plugin  	 *  	 * @todo This will only work once the plugin has a GUID. -	 * @todo These need to be namespaced.  	 *  	 * @param string $name  The name to set  	 * @param string $value The value to set @@ -329,13 +326,6 @@ class ElggPlugin extends ElggObject {  		if (!$this->guid) {  			return false;  		} -		// Hook to validate setting -		$value = elgg_trigger_plugin_hook('setting', 'plugin', array( -			'plugin_id' => $this->pluginID, -			'plugin' => $this, -			'name' => $name, -			'value' => $value -		), $value);  		return $this->set($name, $value);  	} @@ -902,7 +892,9 @@ class ElggPlugin extends ElggObject {  	}  	/** -	 * Save a value to private settings. +	 * Save a value as private setting or attribute. +	 * +	 * Attributes include title and description.  	 *  	 * @param string $name  Name  	 * @param mixed  $value Value @@ -920,6 +912,14 @@ class ElggPlugin extends ElggObject {  			return true;  		} else { +			// Hook to validate setting +			$value = elgg_trigger_plugin_hook('setting', 'plugin', array( +				'plugin_id' => $this->pluginID, +				'plugin' => $this, +				'name' => $name, +				'value' => $value +			), $value); +  			return $this->setPrivateSetting($name, $value);  		}  	} | 
