Equalized update_options() methods to remove warning
This commit is contained in:
parent
19644dd62b
commit
0c9e63b7ee
@ -81,10 +81,11 @@ class StatifyBlacklist {
|
||||
/**
|
||||
* Update options
|
||||
*
|
||||
* @param $options array New options to save
|
||||
* @since 1.0.0
|
||||
* @changed 1.1.1
|
||||
*/
|
||||
public static function update_options() {
|
||||
public static function update_options( $options = null ) {
|
||||
self::$_options = wp_parse_args(
|
||||
get_option( 'statify-blacklist' ),
|
||||
array(
|
||||
|
@ -12,10 +12,11 @@ class StatifyBlacklist_Admin extends StatifyBlacklist {
|
||||
/**
|
||||
* Update options
|
||||
*
|
||||
* @param $options array New options to save
|
||||
* @return mixed array of sanitized array on errors, FALSE if there were none
|
||||
* @since 1.1.1
|
||||
*/
|
||||
public static function update_options( $options ) {
|
||||
public static function update_options( $options = null ) {
|
||||
if ( isset( $options ) && current_user_can( 'manage_options' ) ) {
|
||||
/* Sanitize URLs and remove empty inputs */
|
||||
$givenReferer = $options['referer'];
|
||||
@ -35,7 +36,7 @@ class StatifyBlacklist_Admin extends StatifyBlacklist {
|
||||
}
|
||||
|
||||
/* Refresh options */
|
||||
parent::update_options();
|
||||
parent::update_options( $options );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user