Last active
October 29, 2018 21:43
-
-
Save feliciaceballos/52f2d3bbff615e0c602d5720899f93bf to your computer and use it in GitHub Desktop.
Create the WPMU DEV Forminator Recent Submissions Dashboard Widget, Get Options
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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