Skip to content

Commit

Permalink
Remove average reading rate setting
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed Aug 19, 2022
1 parent 53d49d2 commit a9a92f8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/block-library/src/post-time-to-read/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@ import {
} from '@wordpress/block-editor';
import { createBlock, getDefaultBlockName } from '@wordpress/blocks';
import { store as editorStore } from '@wordpress/editor';
// eslint-disable-next-line no-unused-vars
import { createInterpolateElement } from '@wordpress/element';
import { _x, _n, __, sprintf } from '@wordpress/i18n';
import { count as wordCount } from '@wordpress/wordcount';
import { createInterpolateElement } from '@wordpress/element';

/**
* Average reading rate - based on average taken from
* https://irisreading.com/average-reading-speed-in-various-languages/
* (Characters/minute used for Chinese rather than words).
*
* @type {number} A rough estimate of the average reading rate across multiple languages.
*/
const AVERAGE_READING_RATE = 189;

Expand Down Expand Up @@ -56,6 +53,7 @@ function PostTimeToReadEdit( {
* Do not translate into your own language.
*/
const wordCountType = _x( 'words', 'Word count type. Do not translate!' );

// eslint-disable-next-line no-unused-vars
const minutesToRead = Math.round(
wordCount( content, wordCountType ) / AVERAGE_READING_RATE
Expand Down

0 comments on commit a9a92f8

Please sign in to comment.