Hey, i'm trying to retrieve one of the settings in my plugin and i'm getting this;
Fatal error: Call to a member function on a non-object in D:\Work\Site\b2evolution\blogs\plugins\lightality_plugin\_lightality.plugin.php on line 99
Line 99 is;
if( $this->UserSettings->get('AntiSpamOption') == 'NoWebsite' )
Here is my GetDefaultSettings function if it helps;
function GetDefaultSettings()
{
$Settings = array(
'AntiSpamOption' => array(
'label' => T_('AntiSpam Option'),
'note' => T_('Which method of antispam protection would you like to enable?'),
'type' => 'select',
'defaultvalue' => 'None',
'options' => array( 'None' => T_('None'), 'NoWebsite' => T_('No Website') ),
),
);
return $Settings;
}
Can anyone help with this?
-balupton
UserSettings get instantiated from the data provided by GetDefaultUserSettings(), not GetDefaultSettings() (which provides the meta data for Settings).
Simple, but I'll look into documenting it better.. :)