PluginProbe
Translate and Go multilingual – Automatic AI translation – wpLingua / 2.15.2
Translate and Go multilingual – Automatic AI translation – wpLingua v2.15.2
2.16.4 2.16.3 2.16.2 2.16.1 2.16.0 2.15.2 2.15.1 2.15.0 2.14.3 2.14.2 2.14.1 2.14.0 2.13.1 2.13.0 2.12.3 2.12.2 2.12.1 trunk 1.0.3 1.0.4 1.0.5 1.1.0 1.1.1 1.2.0 1.2.1 All 109 releases
wplingua / data / node.php

node.php in Translate and Go multilingual – Automatic AI translation – wpLingua 2.15.2, at data/node.php

152 lines 2.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // If this file is called directly, abort.
4 if ( ! defined( 'WPINC' ) ) {
5 die;
6 }
7
8
9 /**
10 * Get selectors of excluded elements
11 *
12 * @return array
13 */
14 function wplng_data_excluded_selector_default() {
15 return array(
16 // Default nodes
17 'style',
18 'svg',
19 'canvas',
20 'address',
21 'iframe',
22 'code',
23 'xml',
24
25 // Link tag
26 'link[rel="EditURI"]',
27 'link[title="oEmbed (JSON)"]',
28 'link[title="oEmbed (XML)"]',
29 'link[title="JSON"]',
30 'link[type="application/rss+xml"]',
31
32 // Default class
33 '.no-translate',
34 '.notranslate',
35
36 // wpLingua
37 '#wplingua-load-in-progress-data',
38
39 // Wordpress
40 '#wpadminbar',
41 '.wp-embed-share-input',
42 '[aria-label="HTML"]',
43 '#media-views-js-extra',
44 '#wp-api-request-js-extra',
45 'body#error-page',
46 '.wp-die-message',
47
48 // wpLingua
49 'link[hreflang]',
50 '.wplng-switcher',
51 '.wplingua-menu',
52 '#wplng-modal-edit-container',
53
54 // Comment
55 '.comment-content',
56 '.comment-author',
57 '.comment_postinfo .fn',
58
59 // Author name
60 '.author.vcard',
61 '.entry-author .fn',
62
63 // Plugin: Query Monitor
64 '#query-monitor',
65 '#query-monitor-main',
66
67 // Plugin: SecuPress
68 '#secupress-donttranslate',
69
70 // Plugin: Debug Bar
71 '#querylist',
72
73 // Plugin: Google Site Kit
74 '#googlesitekit-base-data-js-extra',
75
76 // Plugin: Smash Balloon - Social photo feed
77 '#sb_instagram',
78
79 // Plugin: Complianz GDPR
80 '.cookies-per-purpose .name',
81
82 // Plugin: SEOPress
83 '#seopress-metabox-js-extra',
84
85 // Plugin: WooCommerce
86 '.woocommerce-Price-amount',
87
88 // Plugin: events-calendar-pro
89 '.tribe-event-date-start',
90
91 // Plugin: top-10
92 'tptn_counter',
93 );
94 }
95
96
97 /**
98 * Get selectors of excluded elements in visual editor
99 *
100 * @return array
101 */
102 function wplng_data_excluded_editor_link() {
103 global $wplng_data_excluded_editor_link;
104
105 if ( null !== $wplng_data_excluded_editor_link ) {
106 return $wplng_data_excluded_editor_link;
107 }
108
109 $wplng_data_excluded_editor_link = apply_filters(
110 'wplng_excluded_editor_link',
111 array(
112 'textarea',
113 'pre',
114 'option',
115 )
116 );
117
118 return $wplng_data_excluded_editor_link;
119 }
120
121
122 /**
123 * Get selectors of excluded nodes text
124 * Exclude the node content, not the attributes (title, href, ...)
125 *
126 * @return array
127 */
128 function wplng_data_excluded_node_text() {
129 global $wplng_data_excluded_node_text;
130
131 if ( null !== $wplng_data_excluded_node_text ) {
132 return $wplng_data_excluded_node_text;
133 }
134
135 $wplng_data_excluded_node_text = apply_filters(
136 'wplng_excluded_node_text',
137 array(
138 'style',
139 'svg',
140 'canvas',
141 'link',
142 'script',
143 'code',
144
145 // Plugin: Contact Form 7
146 '.wpcf7-textarea',
147 )
148 );
149
150 return $wplng_data_excluded_node_text;
151 }
152