| 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 |
// Wordpress |
| 37 |
'#wpadminbar', |
| 38 |
'.wp-embed-share-input', |
| 39 |
'[aria-label="HTML"]', |
| 40 |
'#media-views-js-extra', |
| 41 |
'#wp-api-request-js-extra', |
| 42 |
'body#error-page', |
| 43 |
'.wp-die-message', |
| 44 |
|
| 45 |
// wpLingua |
| 46 |
'link[hreflang]', |
| 47 |
'.wplng-switcher', |
| 48 |
'.wplingua-menu', |
| 49 |
'#wplng-modal-edit-container', |
| 50 |
|
| 51 |
// Comment |
| 52 |
'.comment-content', |
| 53 |
'.comment-author', |
| 54 |
'.comment_postinfo .fn', |
| 55 |
|
| 56 |
// Author name |
| 57 |
'.author.vcard', |
| 58 |
'.entry-author .fn', |
| 59 |
|
| 60 |
// Plugin: Query Monitor |
| 61 |
'#query-monitor', |
| 62 |
'#query-monitor-main', |
| 63 |
|
| 64 |
// Plugin: SecuPress |
| 65 |
'#secupress-donttranslate', |
| 66 |
|
| 67 |
// Plugin: Debug Bar |
| 68 |
'#querylist', |
| 69 |
|
| 70 |
// Plugin: Google Site Kit |
| 71 |
'#googlesitekit-base-data-js-extra', |
| 72 |
|
| 73 |
// Plugin: Smash Balloon - Social photo feed |
| 74 |
'#sb_instagram', |
| 75 |
|
| 76 |
// Plugin: Complianz GDPR |
| 77 |
'.cookies-per-purpose .name', |
| 78 |
|
| 79 |
// Plugin: SEOPress |
| 80 |
'#seopress-metabox-js-extra', |
| 81 |
|
| 82 |
// Plugin: WooCommerce |
| 83 |
'.woocommerce-Price-amount', |
| 84 |
); |
| 85 |
} |
| 86 |
|
| 87 |
|
| 88 |
/** |
| 89 |
* Get selectors of excluded elements in visual editor |
| 90 |
* |
| 91 |
* @return array |
| 92 |
*/ |
| 93 |
function wplng_data_excluded_editor_link() { |
| 94 |
return apply_filters( |
| 95 |
'wplng_excluded_editor_link', |
| 96 |
array( |
| 97 |
'textarea', |
| 98 |
'pre', |
| 99 |
'option', |
| 100 |
) |
| 101 |
); |
| 102 |
} |
| 103 |
|
| 104 |
|
| 105 |
/** |
| 106 |
* Get selectors of excluded nodes text |
| 107 |
* |
| 108 |
* @return array |
| 109 |
*/ |
| 110 |
function wplng_data_excluded_node_text() { |
| 111 |
return apply_filters( |
| 112 |
'wplng_excluded_node_text', |
| 113 |
array( |
| 114 |
'style', |
| 115 |
'svg', |
| 116 |
'canvas', |
| 117 |
'link', |
| 118 |
'script', |
| 119 |
'code', |
| 120 |
|
| 121 |
// Plugin: Contact Form 7 |
| 122 |
'.wpcf7-textarea', |
| 123 |
) |
| 124 |
); |
| 125 |
} |
| 126 |
|