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