[ Index ]

PHP Cross Reference of WordPress

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

return: {number} Count of words.
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

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

return: {number} Count of characters.
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

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

return: {number} The word or character count.
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.



Generated: Sun Aug 1 01:00:05 2021 Cross-referenced by PHPXref 0.7.1