I need to load and save plugin options values from a json file.
Actually, my plugin init is:
class GSCL_dashboard_widget {
const wid = 'GSCL_dashboard_widget';
public static function init() {
self::update_dashboard_widget_options(
self::wid,
array(
'qty' => 25,
),
true
);
wp_add_dashboard_widget(
self::wid,
__( 'GSCL Dashboard Widget', 'nouveau' ),
array('GSCL_dashboard_widget','widget'),
array('GSCL_dashboard_widget','config')
);
}
…
}
How can I use a JSON file in place of the array ?
There is a way using some WordPress API or I have to write all the code ?
Thanks