PluginProbe ʕ •ᴥ•ʔ
Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress / 4.17.0
Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress v4.17.0
4.17.0 4.16.19 4.16.18 4.16.17 4.16.16 trunk 1.0 1.0.1 1.0.2 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.5a 1.1.6 1.1.7 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.4 1.4.1 1.4.2 1.5 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.7 1.7.1 1.7.2 1.8 1.8.1 1.8.10 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9 1.9.1 1.9.10 1.9.11 1.9.12 1.9.13 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.1.9 2.2.10 2.2.11 2.2.12 2.2.13 2.2.14 2.2.15 2.2.16 2.2.2 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 3.0 3.1 3.1.1 3.1.10 3.1.11 3.1.12 3.1.13 3.1.14 3.1.15 3.1.16 3.1.17 3.1.18 3.1.19 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.10 3.2.11 3.2.12 3.2.13 3.2.14 3.2.15 3.2.16 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 4.0.0 4.0.1 4.0.2 4.0.3 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4 4.10.0 4.10.1 4.10.2 4.10.3 4.11.0 4.12.0 4.13.0 4.13.1 4.13.2 4.13.3 4.13.4 4.14.0 4.14.1 4.14.2 4.14.3 4.14.4 4.15.0 4.15.1 4.15.10 4.15.11 4.15.12 4.15.13 4.15.14 4.15.15 4.15.16 4.15.17 4.15.18 4.15.19 4.15.2 4.15.20 4.15.20.1 4.15.21 4.15.22 4.15.23 4.15.24 4.15.25 4.15.3 4.15.4 4.15.5 4.15.6 4.15.7 4.15.8 4.15.9 4.16.0 4.16.1 4.16.10 4.16.11 4.16.12 4.16.13 4.16.14 4.16.15 4.16.2 4.16.3 4.16.4 4.16.5 4.16.6 4.16.7 4.16.8 4.16.9 4.2.0 4.3.0 4.3.1 4.3.2 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.5.3 4.5.4 4.5.5 4.6.0 4.7.0 4.8.0 4.9.0
wp-user-avatar / assets / js / pp-wp-editor.js
wp-user-avatar / assets / js Last commit date
admin 2 months ago builder 2 months ago stripe 2 months ago admin.js 2 months ago checkout-fields-manager.js 2 months ago checkout.js 4 days ago clipboard.min.js 2 months ago content-control.js 2 months ago create-form.js 2 months ago frontend.js 2 months ago frontend.min.js 4 days ago index.php 2 months ago jcarousel.min.js 2 months ago jquery.blockUI.js 2 months ago mailoptin.js 2 months ago member-directory.js 2 months ago member-directory.min.js 2 months ago pp-wp-editor.js 2 months ago
pp-wp-editor.js
193 lines
1 jQuery.fn.pp_wp_editor = function (options) {
2
3 var default_options,
4 id_regexp = new RegExp('ppWPEditor', 'g');
5
6 if (typeof tinyMCEPreInit === 'undefined' || typeof QTags === 'undefined' || typeof ppWPEditor_globals === 'undefined') {
7 console.warn('js_wp_editor( $settings ); must be loaded');
8 return this;
9 }
10
11 default_options = {
12 'mode': 'html',
13 'mceInit': {
14 "theme": "modern",
15 "skin": "lightgray",
16 "language": "en",
17 "formats": {
18 "alignleft": [
19 {
20 "selector": "p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",
21 "styles": {"textAlign": "left"},
22 "deep": false,
23 "remove": "none"
24 },
25 {
26 "selector": "img,table,dl.wp-caption",
27 "classes": ["alignleft"],
28 "deep": false,
29 "remove": "none"
30 }
31 ],
32 "aligncenter": [
33 {
34 "selector": "p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",
35 "styles": {"textAlign": "center"},
36 "deep": false,
37 "remove": "none"
38 },
39 {
40 "selector": "img,table,dl.wp-caption",
41 "classes": ["aligncenter"],
42 "deep": false,
43 "remove": "none"
44 }
45 ],
46 "alignright": [
47 {
48 "selector": "p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",
49 "styles": {"textAlign": "right"},
50 "deep": false,
51 "remove": "none"
52 },
53 {
54 "selector": "img,table,dl.wp-caption",
55 "classes": ["alignright"],
56 "deep": false,
57 "remove": "none"
58 }
59 ],
60 "strikethrough": {"inline": "del", "deep": true, "split": true}
61 },
62 "relative_urls": false,
63 "remove_script_host": false,
64 "convert_urls": false,
65 "browser_spellcheck": true,
66 "fix_list_elements": true,
67 "entities": "38,amp,60,lt,62,gt",
68 "entity_encoding": "raw",
69 "keep_styles": false,
70 "paste_webkit_styles": "font-weight font-style color",
71 "preview_styles": "font-family font-size font-weight font-style text-decoration text-transform",
72 "wpeditimage_disable_captions": false,
73 "wpeditimage_html5_captions": false,
74 "plugins": "charmap,hr,media,paste,tabfocus,textcolor,fullscreen,wordpress,wpeditimage,wpgallery,wplink,wpdialogs,wpview,image",
75 "content_css": ppWPEditor_globals.includes_url + "css/dashicons.css?ver=3.9," + ppWPEditor_globals.includes_url + "js/mediaelement/mediaelementplayer.min.css?ver=3.9," + ppWPEditor_globals.includes_url + "js/mediaelement/wp-mediaelement.css?ver=3.9," + ppWPEditor_globals.includes_url + "js/tinymce/skins/wordpress/wp-content.css?ver=3.9",
76 "selector": "#ppWPEditor",
77 "resize": "vertical",
78 "menubar": false,
79 "toolbar1": "bold,italic,strikethrough,bullist,numlist,blockquote,hr,alignleft,aligncenter,alignright,link,unlink,wp_more,spellchecker,fullscreen,wp_adv",
80 "toolbar2": "formatselect,underline,alignjustify,forecolor,pastetext,removeformat,charmap,outdent,indent,undo,redo,wp_help",
81 "toolbar3": "",
82 "toolbar4": "",
83 "tabfocus_elements": ":prev,:next",
84 "body_class": "ppWPEditor",
85 'branding': false,
86 // ensure paragraphs are wrapped in <p> and the indent makes the paragraphs to be in new line instead of
87 // <p>ss</p><p>kk</p>
88 "wpautop": false,
89 "indent": true
90 }
91 };
92
93 if (tinyMCEPreInit.mceInit.ppWPEditor) {
94 default_options.mceInit = tinyMCEPreInit.mceInit.ppWPEditor;
95 }
96
97 options = jQuery.extend(true, {}, default_options, options);
98
99 return this.each(function () {
100 var $this = jQuery(this),
101 current_id = $this.attr('id'),
102 temp = {};
103
104 if (tinyMCE.editors[current_id] !== undefined) {
105 tinyMCE.remove(tinymce.editors[current_id]);
106 }
107
108 if (!$this.is('textarea')) {
109 console.warn('Element must be a textarea');
110 if ($this.closest('.wp-editor-wrap').length) {
111 temp.editor_wrap = $this.closest('.wp-editor-wrap');
112 temp.field_parent = temp.editor_wrap.parent();
113
114 temp.editor_wrap.before($this.clone());
115 temp.editor_wrap.remove();
116
117 $this = temp.field_parent.find('textarea[id="' + current_id + '"]');
118 }
119 }
120
121 $this.addClass('wp-editor-area').show();
122
123
124 jQuery.each(options.mceInit, function (key, value) {
125 if (jQuery.type(value) === 'string') {
126 options.mceInit[key] = value.replace(id_regexp, current_id);
127 }
128 });
129
130 options.mode = options.mode === 'tmce' ? 'tmce' : 'html';
131
132 tinyMCEPreInit.mceInit[current_id] = options.mceInit;
133
134 var wrap = jQuery('<div id="wp-' + current_id + '-wrap" class="wp-core-ui wp-editor-wrap ' + options.mode + '-active" />'),
135 editor_tools = jQuery('<div id="wp-' + current_id + '-editor-tools" class="wp-editor-tools hide-if-no-js" />'),
136 editor_tabs = jQuery('<div class="wp-editor-tabs" />'),
137 switch_editor_html = jQuery('<a id="' + current_id + '-html" class="wp-switch-editor switch-html" data-wp-editor-id="' + current_id + '">' + ppWPEditor_globals.wpeditor_texttab_label + '</a>'),
138 switch_editor_tmce = jQuery('<a id="' + current_id + '-tmce" class="wp-switch-editor switch-tmce" data-wp-editor-id="' + current_id + '">' + ppWPEditor_globals.wpeditor_visualtab_label + '</a>'),
139 media_buttons = jQuery('<div id="wp-' + current_id + '-media-buttons" class="wp-media-buttons" />'),
140 insert_media_button = jQuery('<a href="#" id="insert-media-button" class="button insert-media add_media" data-editor="' + current_id + '" title="' + ppWPEditor_globals.wpeditor_addmedia_label + '"><span class="wp-media-buttons-icon"></span>' + ppWPEditor_globals.wpeditor_addmedia_label + '</a>'),
141 editor_container = jQuery('<div id="wp-' + current_id + '-editor-container" class="wp-editor-container" />'),
142 content_css = false;
143
144 insert_media_button.appendTo(media_buttons);
145 media_buttons.appendTo(editor_tools);
146
147 switch_editor_tmce.appendTo(editor_tabs);
148 switch_editor_html.appendTo(editor_tabs);
149 editor_tabs.appendTo(editor_tools);
150
151 editor_tools.appendTo(wrap);
152 editor_container.appendTo(wrap);
153
154 editor_container.append($this.clone().addClass('wp-editor-area'));
155
156 if (content_css !== false)
157 jQuery.each(content_css, function () {
158 if (!jQuery('link[href="' + this + '"]').length)
159 $this.before('<link rel="stylesheet" type="text/css" href="' + this + '">');
160 });
161
162 $this.before('<link rel="stylesheet" id="editor-buttons-css" href="' + ppWPEditor_globals.includes_url + 'css/editor.css" type="text/css" media="all">');
163
164 $this.before(wrap);
165 $this.remove();
166
167 new QTags(current_id);
168 QTags._buttonsInit();
169 switchEditors.go(current_id, options.mode);
170
171 jQuery('.insert-media', wrap).on('click', function (event) {
172 var elem = jQuery(event.currentTarget),
173 options = {
174 frame: 'post',
175 state: 'insert',
176 title: wp.media.view.l10n.addMedia,
177 multiple: true
178 };
179
180 event.preventDefault();
181
182 elem.trigger('blur');
183
184 if (elem.hasClass('gallery')) {
185 options.state = 'gallery';
186 options.title = wp.media.view.l10n.createGalleryTitle;
187 }
188
189 wp.media.editor.open(current_id, options);
190 });
191
192 });
193 };