Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save feliciaceballos/52f2d3bbff615e0c602d5720899f93bf to your computer and use it in GitHub Desktop.
Save feliciaceballos/52f2d3bbff615e0c602d5720899f93bf to your computer and use it in GitHub Desktop.
Create the WPMU DEV Forminator Recent Submissions Dashboard Widget, Get Options
<?php
/**
* Get widget Options
*
* @param array $default
*
* @return array
*/
public function get_options( $default = array() ) {
//Fetch ALL dashboard widget options from the db...
$opts = get_option( 'dashboard_widget_options' );
//Get just our widget's options, or set default
$forminator_options = ( isset( $opts[ __CLASS__ ] ) ) ? $opts[ __CLASS__ ] : $default;
return $forminator_options;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment