/home/techb158/public_html/wp-admin/js
NameSizeModeActions
widgets/-0777rm
accordion.js29330666editdlrm
accordion.min.js7580666editdlrm
application-passwords.js63940666editdlrm
application-passwords.min.js30240666editdlrm
auth-app.js57960666editdlrm
auth-app.min.js20840666editdlrm
code-editor.js179630666editdlrm
code-editor.min.js35430666editdlrm
color-picker.js97680666editdlrm
color-picker.min.js34860666editdlrm
comment.js52050666editdlrm
comment.min.js20810666editdlrm
common.js704210666editdlrm
common.min.js262100666editdlrm
custom-background.js34350666editdlrm
custom-background.min.js12060666editdlrm
custom-header.js20230666editdlrm
customize-controls.js2959050666editdlrm
customize-controls.min.js1125380666editdlrm
customize-nav-menus.js1141340666editdlrm
customize-nav-menus.min.js482720666editdlrm
customize-widgets.js717270666editdlrm
customize-widgets.min.js280650666editdlrm
dashboard.js275620666editdlrm
dashboard.min.js87110666editdlrm
edit-comments.js381390666editdlrm
edit-comments.min.js155150666editdlrm
editor-expand.js426060666editdlrm
editor-expand.min.js134510666editdlrm
editor.js450550666editdlrm
editor.min.js130850666editdlrm
farbtastic.js78490666editdlrm
gallery.js55430666editdlrm
gallery.min.js37410666editdlrm
image-edit.js409360666editdlrm
image-edit.min.js155150666editdlrm
inline-edit-post.js206760666editdlrm
inline-edit-post.min.js95860666editdlrm
inline-edit-tax.js77970666editdlrm
inline-edit-tax.min.js29970666editdlrm
iris.min.js236430666editdlrm
language-chooser.js8900666editdlrm
language-chooser.min.js4230666editdlrm
link.js48730666editdlrm
link.min.js23190666editdlrm
media-gallery.js13030666editdlrm
media-gallery.min.js6110666editdlrm
media-upload.js34650666editdlrm
media-upload.min.js11520666editdlrm
media.js67650666editdlrm
media.min.js24390666editdlrm
nav-menu.js626170666editdlrm
nav-menu.min.js307850666editdlrm
password-strength-meter.js42360666editdlrm
password-strength-meter.min.js11230666editdlrm
password-toggle.js13390666editdlrm
password-toggle.min.js8470666editdlrm
plugin-install.js70860666editdlrm
plugin-install.min.js24030666editdlrm
post.js404940666editdlrm
post.min.js194150666editdlrm
postbox.js189370666editdlrm
postbox.min.js67610666editdlrm
privacy-tools.js111460666editdlrm
privacy-tools.min.js51890666editdlrm
revisions.js347290666editdlrm
revisions.min.js184010666editdlrm
set-post-thumbnail.js8760666editdlrm
set-post-thumbnail.min.js6200666editdlrm
site-health.js138800666editdlrm
site-health.min.js64740666editdlrm
site-icon.js68530666editdlrm
site-icon.min.js25320666editdlrm
svg-painter.js32800666editdlrm
svg-painter.min.js15670666editdlrm
tags-box.js111400666editdlrm
tags-box.min.js30770666editdlrm
tags-suggest.js57710666editdlrm
tags-suggest.min.js22690666editdlrm
tags.js78390666editdlrm
tags.min.js31110666editdlrm
theme-plugin-editor.js261760666editdlrm
theme-plugin-editor.min.js121040666editdlrm
theme.js573500666editdlrm
theme.min.js275300666editdlrm
updates.js1119990666editdlrm
updates.min.js484430666editdlrm
user-profile.js181610666editdlrm
user-profile.min.js79140666editdlrm
user-suggest.js23010666editdlrm
user-suggest.min.js6760666editdlrm
widgets.js230980666editdlrm
widgets.min.js126090666editdlrm
word-count.js76960666editdlrm
word-count.min.js15300666editdlrm
xfn.js7400666editdlrm
xfn.min.js4580666editdlrm
Edit: /home/techb158/public_html/wp-admin/js/word-count.js (7696B)
/** * Word or character counting functionality. Count words or characters in a * provided text string. * * @namespace wp.utils * * @since 2.6.0 * @output wp-admin/js/word-count.js */ ( function() { /** * Word counting utility * * @namespace wp.utils.wordcounter * @memberof wp.utils * * @class * * @param {Object} settings Optional. Key-value object containing overrides for * settings. * @param {RegExp} settings.HTMLRegExp Optional. Regular expression to find HTML elements. * @param {RegExp} settings.HTMLcommentRegExp Optional. Regular expression to find HTML comments. * @param {RegExp} settings.spaceRegExp Optional. Regular expression to find irregular space * characters. * @param {RegExp} settings.HTMLEntityRegExp Optional. Regular expression to find HTML entities. * @param {RegExp} settings.connectorRegExp Optional. Regular expression to find connectors that * split words. * @param {RegExp} settings.removeRegExp Optional. Regular expression to find remove unwanted * characters to reduce false-positives. * @param {RegExp} settings.astralRegExp Optional. Regular expression to find unwanted * characters when searching for non-words. * @param {RegExp} settings.wordsRegExp Optional. Regular expression to find words by spaces. * @param {RegExp} settings.characters_excluding_spacesRegExp Optional. Regular expression to find characters which * are non-spaces. * @param {RegExp} settings.characters_including_spacesRegExp Optional. Regular expression to find characters * including spaces. * @param {RegExp} settings.shortcodesRegExp Optional. Regular expression to find shortcodes. * @param {Object} settings.l10n Optional. Localization object containing specific * configuration for the current localization. * @param {string} settings.l10n.type Optional. Method of finding words to count. * @param {Array} settings.l10n.shortcodes Optional. Array of shortcodes that should be removed * from the text. * * @return {void} */ function WordCounter( settings ) { var key, shortcodes; // Apply provided settings to object settings. if ( settings ) { for ( key in settings ) { // Only apply valid settings. if ( settings.hasOwnProperty( key ) ) { this.settings[ key ] = settings[ key ]; } } } shortcodes = this.settings.l10n.shortcodes; // If there are any localization shortcodes, add this as type in the settings. if ( shortcodes && shortcodes.length ) { this.settings.shortcodesRegExp = new RegExp( '\\[\\/?(?:' + shortcodes.join( '|' ) + ')[^\\]]*?\\]', 'g' ); } } // Default settings. WordCounter.prototype.settings = { HTMLRegExp: /<\/?[a-z][^>]*?>/gi, HTMLcommentRegExp: //g, spaceRegExp: / | /gi, HTMLEntityRegExp: /&\S+?;/g, // \u2014 = em-dash. connectorRegExp: /--|\u2014/g, // Characters to be removed from input text. removeRegExp: new RegExp( [ '[', // Basic Latin (extract). '\u0021-\u0040\u005B-\u0060\u007B-\u007E', // Latin-1 Supplement (extract). '\u0080-\u00BF\u00D7\u00F7', /* * The following range consists of: * General Punctuation * Superscripts and Subscripts * Currency Symbols * Combining Diacritical Marks for Symbols * Letterlike Symbols * Number Forms * Arrows * Mathematical Operators * Miscellaneous Technical * Control Pictures * Optical Character Recognition * Enclosed Alphanumerics * Box Drawing * Block Elements * Geometric Shapes * Miscellaneous Symbols * Dingbats * Miscellaneous Mathematical Symbols-A * Supplemental Arrows-A * Braille Patterns * Supplemental Arrows-B * Miscellaneous Mathematical Symbols-B * Supplemental Mathematical Operators * Miscellaneous Symbols and Arrows */ '\u2000-\u2BFF', // Supplemental Punctuation. '\u2E00-\u2E7F', ']' ].join( '' ), 'g' ), // Remove UTF-16 surrogate points, see https://en.wikipedia.org/wiki/UTF-16#U.2BD800_to_U.2BDFFF astralRegExp: /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, wordsRegExp: /\S\s+/g, characters_excluding_spacesRegExp: /\S/g, /* * Match anything that is not a formatting character, excluding: * \f = form feed * \n = new line * \r = carriage return * \t = tab * \v = vertical tab * \u00AD = soft hyphen * \u2028 = line separator * \u2029 = paragraph separator */ characters_including_spacesRegExp: /[^\f\n\r\t\v\u00AD\u2028\u2029]/g, l10n: window.wordCountL10n || {} }; /** * Counts the number of words (or other specified type) in the specified text. * * @since 2.6.0 * * @memberof wp.utils.wordcounter * * @param {string} text Text to count elements in. * @param {string} type Optional. Specify type to use. * * @return {number} The number of items counted. */ WordCounter.prototype.count = function( text, type ) { var count = 0; // Use default type if none was provided. type = type || this.settings.l10n.type; // Sanitize type to one of three possibilities: 'words', 'characters_excluding_spaces' or 'characters_including_spaces'. if ( type !== 'characters_excluding_spaces' && type !== 'characters_including_spaces' ) { type = 'words'; } // If we have any text at all. if ( text ) { text = text + '\n'; // Replace all HTML with a new-line. text = text.replace( this.settings.HTMLRegExp, '\n' ); // Remove all HTML comments. text = text.replace( this.settings.HTMLcommentRegExp, '' ); // If a shortcode regular expression has been provided use it to remove shortcodes. if ( this.settings.shortcodesRegExp ) { text = text.replace( this.settings.shortcodesRegExp, '\n' ); } // Normalize non-breaking space to a normal space. text = text.replace( this.settings.spaceRegExp, ' ' ); if ( type === 'words' ) { // Remove HTML Entities. text = text.replace( this.settings.HTMLEntityRegExp, '' ); // Convert connectors to spaces to count attached text as words. text = text.replace( this.settings.connectorRegExp, ' ' ); // Remove unwanted characters. text = text.replace( this.settings.removeRegExp, '' ); } else { // Convert HTML Entities to "a". text = text.replace( this.settings.HTMLEntityRegExp, 'a' ); // Remove surrogate points. text = text.replace( this.settings.astralRegExp, 'a' ); } // Match with the selected type regular expression to count the items. text = text.match( this.settings[ type + 'RegExp' ] ); // If we have any matches, set the count to the number of items found. if ( text ) { count = text.length; } } return count; }; // Add the WordCounter to the WP Utils. window.wp = window.wp || {}; window.wp.utils = window.wp.utils || {}; window.wp.utils.WordCounter = WordCounter; } )();