i have a setup like
function form($instance) {
$defaults = array(
'title' => 'Recent Products',
'number_products' => 3
);
$instance = wp_parse_args($instance, $defaults);
but my title is ok but number_products always does not show. i debuged in netbeans and found that form() is run 2 times and 1st time, variables look like
$instance = array(0)
// after wp_parse_args,
$instance = array('title' => 'Recent Products', 'number_products' => 3);
on 2nd run of wp_parse_args
, i dont know why it runs the 2nd time,
$instance = array('title' => 'Recent Products', 'number_products' => null);
// after wp_parse_args
$instance = array('title' => 'Recent Products', 'number_products' => null);
i dont really know whats happening ... can some1 enlighten me?