From 070c9cae859c6addc25f3573732564e29539dd0d Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Fri, 28 Jul 2023 10:34:10 +0200 Subject: [PATCH] small improvements --- includes/activity/class-base-object.php | 6 ++++-- includes/collection/class-followers.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/activity/class-base-object.php b/includes/activity/class-base-object.php index 8ed6699..bfac562 100644 --- a/includes/activity/class-base-object.php +++ b/includes/activity/class-base-object.php @@ -601,8 +601,10 @@ class Base_Object { */ public function from_array( $array ) { foreach ( $array as $key => $value ) { - $key = camel_to_snake_case( $key ); - $this->set( $key, $value ); + if ( $value ) { + $key = camel_to_snake_case( $key ); + $this->set( $key, $value ); + } } } diff --git a/includes/collection/class-followers.php b/includes/collection/class-followers.php index ccc76ce..f28a17a 100644 --- a/includes/collection/class-followers.php +++ b/includes/collection/class-followers.php @@ -450,7 +450,7 @@ class Followers { * * @return mixed The Term list of Followers, the format depends on $output. */ - public static function get_outdated_followers( $number = 50, $older_than = 604800 ) { + public static function get_outdated_followers( $number = 50, $older_than = 86400 ) { $args = array( 'post_type' => self::POST_TYPE, 'posts_per_page' => $number,