I'm trying to access widget information saved in the wp_options table.
I printed it out:
add_filter('the_content', function(){
$res = get_option('widget_my_widget');
print_r($res);
});
And it outputted this:
Array ( [2] => Array ( [title] => asian kung-fu generation [description] => awesome band ) [_multiwidget] => 1 )
My question: is the data always stored at index 2? If not, how can I access the data without worrying if it gives me the correct one or not?