PluginProbe
Translate and Go multilingual – Automatic AI translation – wpLingua / 2.13.0
Translate and Go multilingual – Automatic AI translation – wpLingua v2.13.0
2.16.6 2.16.5 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 All 111 releases
wplingua / data / node.php

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

149 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 }
92
93
94 /**
95 * Get selectors of excluded elements in visual editor
96 *
97 * @return array
98 */
99 function wplng_data_excluded_editor_link() {
100 global $wplng_data_excluded_editor_link;
101
102 if ( null !== $wplng_data_excluded_editor_link ) {
103 return $wplng_data_excluded_editor_link;
104 }
105
106 $wplng_data_excluded_editor_link = apply_filters(
107 'wplng_excluded_editor_link',
108 array(
109 'textarea',
110 'pre',
111 'option',
112 )
113 );
114
115 return $wplng_data_excluded_editor_link;
116 }
117
118
119 /**
120 * Get selectors of excluded nodes text
121 * Exclude the node content, not the attributes (title, href, ...)
122 *
123 * @return array
124 */
125 function wplng_data_excluded_node_text() {
126 global $wplng_data_excluded_node_text;
127
128 if ( null !== $wplng_data_excluded_node_text ) {
129 return $wplng_data_excluded_node_text;
130 }
131
132 $wplng_data_excluded_node_text = apply_filters(
133 'wplng_excluded_node_text',
134 array(
135 'style',
136 'svg',
137 'canvas',
138 'link',
139 'script',
140 'code',
141
142 // Plugin: Contact Form 7
143 '.wpcf7-textarea',
144 )
145 );
146
147 return $wplng_data_excluded_node_text;
148 }
149