Ablauf-Timestamp) und raeumt abgelaufene dabei gleich auf. */ public static function all() { $muted = get_option( self::OPTION_KEY, array() ); if ( ! is_array( $muted ) ) { return array(); } $now = time(); $active = array(); $changed = false; foreach ( $muted as $plugin_file => $expires ) { if ( (int) $expires > $now ) { $active[ $plugin_file ] = (int) $expires; } else { $changed = true; } } if ( $changed ) { update_option( self::OPTION_KEY, $active, false ); } return $active; } public static function mute( $plugin_file, $days ) { $days = max( 1, min( 365, (int) $days ) ); $all = get_option( self::OPTION_KEY, array() ); if ( ! is_array( $all ) ) { $all = array(); } $all[ sanitize_text_field( $plugin_file ) ] = time() + ( $days * DAY_IN_SECONDS ); update_option( self::OPTION_KEY, $all, false ); } public static function unmute( $plugin_file ) { $all = get_option( self::OPTION_KEY, array() ); if ( ! is_array( $all ) ) { return; } unset( $all[ sanitize_text_field( $plugin_file ) ] ); update_option( self::OPTION_KEY, $all, false ); } }