My plugin i have many options. I use get_option and store it as an array so its easier to use.
function woomps_get_options() {
$options = array(
'sub01' => get_option(woomps_sub01),
'sub02' => get_option(woomps_sub02),
);
return $options;
}
This produces this notice for each line:
[TIME] PHP Notice: Use of undefined constant woomps_sub01 - assumed 'woomps_sub01' in "DOMAIN"\settings\options.php on line 9
I dont understand why i should define woomps_sub01 first or how i should define it. But my question is rather: Why is this not a correct way to get a WP option and what is the better way?