[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/js/dist/ -> wordcount.js (summary)

(no description)

File Size: 467 lines (18 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 16 functions

  __webpack_require__()
  getDefault()
  getModuleExports()
  stripTags()
  transposeAstralsToCountableChar()
  stripHTMLEntities()
  stripConnectors()
  stripRemovables()
  stripHTMLComments()
  stripShortcodes()
  stripSpaces()
  transposeHTMLEntitiesToCountableChars()
  loadSettings()
  countWords()
  countCharacters()
  count()

Functions
Functions that are not part of a class:

__webpack_require__(moduleId)   X-Ref
No description

getDefault()   X-Ref
No description

getModuleExports()   X-Ref
No description

stripTags(settings, text)   X-Ref
Replaces items matched in the regex with new line

param: {import('./index').WPWordCountSettings} settings The main settings object containing regular expressions
param: {string}                                text     The string being counted.
return: {string} The manipulated text.

transposeAstralsToCountableChar(settings, text)   X-Ref
Replaces items matched in the regex with character.

param: {import('./index').WPWordCountSettings} settings The main settings object containing regular expressions
param: {string}                                text     The string being counted.
return: {string} The manipulated text.

stripHTMLEntities(settings, text)   X-Ref
Removes items matched in the regex.

param: {import('./index').WPWordCountSettings} settings The main settings object containing regular expressions
param: {string}                                text     The string being counted.
return: {string} The manipulated text.

stripConnectors(settings, text)   X-Ref
Replaces items matched in the regex with spaces.

param: {import('./index').WPWordCountSettings} settings The main settings object containing regular expressions
param: {string}                                text     The string being counted.
return: {string} The manipulated text.

stripRemovables(settings, text)   X-Ref
Removes items matched in the regex.

param: {import('./index').WPWordCountSettings} settings The main settings object containing regular expressions
param: {string}                                text     The string being counted.
return: {string} The manipulated text.

stripHTMLComments(settings, text)   X-Ref
Removes items matched in the regex.

param: {import('./index').WPWordCountSettings} settings The main settings object containing regular expressions
param: {string}                                text     The string being counted.
return: {string} The manipulated text.

stripShortcodes(settings, text)   X-Ref
Replaces items matched in the regex with a new line.

param: {import('./index').WPWordCountSettings} settings The main settings object containing regular expressions
param: {string}                                text     The string being counted.
return: {string} The manipulated text.

stripSpaces(settings, text)   X-Ref
Replaces items matched in the regex with spaces.

param: {import('./index').WPWordCountSettings} settings The main settings object containing regular expressions
param: {string}                                text     The string being counted.
return: {string} The manipulated text.

transposeHTMLEntitiesToCountableChars(settings, text)   X-Ref
Replaces items matched in the regex with a single character.

param: {import('./index').WPWordCountSettings} settings The main settings object containing regular expressions
param: {string}                                text     The string being counted.
return: {string} The manipulated text.

loadSettings(type, userSettings)   X-Ref
Private function to manage the settings.

param: {WPWordCountStrategy}     type         The type of count to be done.
param: {WPWordCountUserSettings} userSettings Custom settings for the count.
return: {WPWordCountSettings} The combined settings object to be used.

countWords(text, regex, settings)   X-Ref
Count the words in text

param: {string}              text     The text being processed
param: {RegExp}              regex    The regular expression pattern being matched
param: {WPWordCountSettings} settings Settings object containing regular expressions for each strip function
return: {number} Count of words.

countCharacters(text, regex, settings)   X-Ref
Count the characters in text

param: {string}              text     The text being processed
param: {RegExp}              regex    The regular expression pattern being matched
param: {WPWordCountSettings} settings Settings object containing regular expressions for each strip function
return: {number} Count of characters.

count(text, type, userSettings)   X-Ref
Count some words.

param: {string}                  text         The text being processed
param: {WPWordCountStrategy}     type         The type of count. Accepts 'words', 'characters_excluding_spaces', or 'characters_including_spaces'.
param: {WPWordCountUserSettings} userSettings Custom settings object.
return: {number} The word or character count.



Generated : Mon Jan 18 08:20:02 2021 Cross-referenced by PHPXref