How to take WordPress plugin options from a json file?

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')       
    );
}

Read More

}

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

Related posts

Leave a Reply