??????????????
??????????????
??????????????
??????????????
Warning : Undefined variable $auth in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
Warning : Trying to access array offset on value of type null in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
??????????????
??????????????
??????????????
??????????????
File Manager
✏️ Edit File: /home/mklsvubc/orkenoil.kz/wp-admin/js/word-count.js
⬅ Kembali
/**
* 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: /<!--[\s\S]*?-->/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;
} )();
Nama
Tipe
Ukuran
Diubah
Aksi
📁 widgets
dir
—
2026-02-12 18:42
📜 accordion.js
js
2.9 KB
2024-10-13 18:09
📜 accordion.min.js
js
758 B
2025-02-06 16:27
📜 application-passwords.js
js
6.2 KB
2023-09-17 21:51
📜 application-passwords.min.js
js
3 KB
2025-02-06 16:27
📜 auth-app.js
js
5.7 KB
2021-02-23 18:45
📜 auth-app.min.js
js
2 KB
2025-02-06 16:27
📜 code-editor.js
js
17.5 KB
2026-05-19 11:24
📜 code-editor.min.js
js
3.5 KB
2026-05-19 11:24
📜 color-picker.js
js
9.5 KB
2021-03-18 18:01
📜 color-picker.min.js
js
3.4 KB
2025-02-06 16:27
📜 comment.js
js
2.9 KB
2024-02-11 18:14
📜 comment.min.js
js
1.3 KB
2022-04-08 19:07
📜 common.js
js
61.3 KB
2026-02-27 22:57
📜 common.min.js
js
23.2 KB
2026-02-27 22:57
📜 custom-background.js
js
3.4 KB
2021-03-18 18:01
📜 custom-background.min.js
js
1.2 KB
2025-02-06 16:27
📜 custom-header.js
js
2 KB
2021-02-23 18:45
📜 customize-controls.js
js
288.4 KB
2025-09-19 18:57
📜 customize-controls.min.js
js
109.7 KB
2025-09-19 18:57
📜 customize-nav-menus.js
js
111.5 KB
2025-09-30 15:28
📜 customize-nav-menus.min.js
js
47.1 KB
2025-09-30 15:28
📜 customize-widgets.js
js
70 KB
2024-06-21 17:17
📜 customize-widgets.min.js
js
27.4 KB
2025-02-06 16:27
📜 dashboard.js
js
27 KB
2025-03-16 18:40
📜 dashboard.min.js
js
8.7 KB
2025-03-16 18:40
📜 edit-comments.js
js
37.2 KB
2026-05-08 01:21
📜 edit-comments.min.js
js
15.2 KB
2026-05-08 01:21
📜 editor-expand.js
js
41.6 KB
2024-04-12 16:47
📜 editor-expand.min.js
js
13.1 KB
2025-02-06 16:27
📜 editor.js
js
44 KB
2025-09-28 22:40
📜 editor.min.js
js
12.8 KB
2025-09-28 22:40
📜 farbtastic.js
js
7.7 KB
2023-07-17 21:03
📜 gallery.js
js
5.4 KB
2023-10-09 20:31
📜 gallery.min.js
js
3.7 KB
2023-10-09 20:31
📜 image-edit.js
js
40 KB
2024-08-28 15:45
📜 image-edit.min.js
js
15.2 KB
2025-02-06 16:27
📜 inline-edit-post.js
js
20.2 KB
2026-05-08 14:59
📜 inline-edit-post.min.js
js
9.4 KB
2026-05-08 14:59
📜 inline-edit-tax.js
js
7.6 KB
2021-03-18 18:01
📜 inline-edit-tax.min.js
js
2.9 KB
2025-02-06 16:27
📜 iris.min.js
js
23.1 KB
2021-11-03 18:40
📜 language-chooser.js
js
890 B
2021-02-23 18:45
📜 language-chooser.min.js
js
423 B
2021-02-23 18:45
📜 link.js
js
4.8 KB
2026-02-27 21:49
📜 link.min.js
js
2.3 KB
2026-02-27 21:49
📜 media-gallery.js
js
1.3 KB
2021-02-23 18:45
📜 media-gallery.min.js
js
611 B
2022-04-08 19:07
📜 media-upload.js
js
3.4 KB
2021-01-22 11:32
📜 media-upload.min.js
js
1.1 KB
2025-02-06 16:27
📜 media.js
js
6.6 KB
2024-10-07 01:49
📜 media.min.js
js
2.4 KB
2025-02-06 16:27
📜 nav-menu.js
js
61.1 KB
2025-10-20 19:31
📜 nav-menu.min.js
js
30.1 KB
2025-10-20 19:31
📜 password-strength-meter.js
js
4.1 KB
2021-01-22 11:32
📜 password-strength-meter.min.js
js
1.1 KB
2025-02-06 16:27
📜 password-toggle.js
js
1.3 KB
2023-06-23 22:09
📜 password-toggle.min.js
js
847 B
2025-02-06 16:27
📜 plugin-install.js
js
6.9 KB
2021-03-18 18:01
📜 plugin-install.min.js
js
2.3 KB
2023-02-02 15:36
📜 post.js
js
39.5 KB
2026-04-27 01:24
📜 post.min.js
js
19 KB
2026-04-27 01:24
📜 postbox.js
js
18.5 KB
2025-03-16 18:40
📜 postbox.min.js
js
6.6 KB
2025-03-16 18:40
📜 privacy-tools.js
js
10.7 KB
2024-06-21 17:17
📜 privacy-tools.min.js
js
5 KB
2024-06-21 17:17
📜 revisions.js
js
33.9 KB
2024-10-13 19:49
📜 revisions.min.js
js
18 KB
2025-02-06 16:27
📜 set-post-thumbnail.js
js
876 B
2020-07-07 17:55
📜 set-post-thumbnail.min.js
js
620 B
2020-07-07 17:55
📜 site-health.js
js
13.6 KB
2026-02-11 20:10
📜 site-health.min.js
js
6.3 KB
2026-02-11 20:10
📜 site-icon.js
js
6.1 KB
2024-08-23 21:47
📜 site-icon.min.js
js
2.2 KB
2025-02-06 16:27
📜 svg-painter.js
js
3.2 KB
2024-09-07 21:44
📜 svg-painter.min.js
js
1.5 KB
2025-02-06 16:27
📜 tags-box.js
js
10.9 KB
2021-03-18 18:01
📜 tags-box.min.js
js
3 KB
2025-02-06 16:27
📜 tags-suggest.js
js
5.6 KB
2024-02-18 21:16
📜 tags-suggest.min.js
js
2.2 KB
2025-02-06 16:27
📜 tags.js
js
6 KB
2025-09-01 20:22
📜 tags.min.js
js
2.4 KB
2025-09-01 20:22
📜 theme-plugin-editor.js
js
25.6 KB
2026-02-04 06:03
📜 theme-plugin-editor.min.js
js
11.8 KB
2026-02-04 06:03
📜 theme.js
js
54.9 KB
2025-09-28 22:40
📜 theme.min.js
js
26.5 KB
2025-09-28 22:40
📜 updates.js
js
109.4 KB
2025-10-21 10:01
📜 updates.min.js
js
47.3 KB
2025-10-21 10:01
📜 user-profile.js
js
17.9 KB
2025-10-20 18:49
📜 user-profile.min.js
js
7.8 KB
2025-10-20 18:49
📜 user-suggest.js
js
2.2 KB
2021-03-18 18:01
📜 user-suggest.min.js
js
676 B
2025-02-06 16:27
📜 widgets.js
js
22.6 KB
2021-03-18 18:01
📜 widgets.min.js
js
12.3 KB
2025-02-06 16:27
📜 word-count.js
js
7.5 KB
2020-07-27 22:35
📜 word-count.min.js
js
1.5 KB
2025-02-06 16:27
📜 xfn.js
js
740 B
2021-03-18 18:01
📜 xfn.min.js
js
458 B
2021-03-18 18:01