$today ); } foreach ( self::keys() as $key ) { $saved[ $key ] = isset( $saved[ $key ] ) ? (int) $saved[ $key ] : 0; } return $saved; } /** * Increment a counter. * * @param string $key Counter key. */ public static function bump( $key ) { if ( ! in_array( $key, self::keys(), true ) ) { return; } $stats = self::today(); $stats[ $key ] = $stats[ $key ] + 1; update_option( self::OPTION, $stats, false ); } }