: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* Checks if notices should be shown.
public static function hide_notices() {
$trigger_code = self::get_trigger_code();
self::last_dismissed() && strtotime( self::last_dismissed() . ' +2 weeks' ) > time(),
return in_array( true, $conditions );
* Gets the last dismissed date.
public static function last_dismissed() {
$user_id = get_current_user_id();
return get_user_meta( $user_id, '_pum_reviews_last_dismissed', true );
* Sort array by priority value
public static function sort_by_priority( $a, $b ) {
if ( ! isset( $a['pri'] ) || ! isset( $b['pri'] ) || $a['pri'] === $b['pri'] ) {
return ( $a['pri'] < $b['pri'] ) ? - 1 : 1;
* Sort array in reverse by priority value
public static function rsort_by_priority( $a, $b ) {
if ( ! isset( $a['pri'] ) || ! isset( $b['pri'] ) || $a['pri'] === $b['pri'] ) {
return ( $a['pri'] < $b['pri'] ) ? 1 : - 1;
PUM_Modules_Reviews::init();