PluginProbe
Translate and boost SEO – Automatic AI translation – wpLingua / 2.16.8
Translate and boost SEO – Automatic AI translation – wpLingua v2.16.8
2.16.8 2.16.7 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 All 113 releases
← All changes | inc/dom/mode-list.php +9 -5 2.12.22.16.8 View file →
@@ -26,10 +26,14 @@
26 26 /**
27 27 * Add body class : wplingua-list
28 28 */
29 29
30 - foreach ( $dom->find( 'body[class]' ) as $element ) {
31 - $element->class = $element->class . ' wplingua-list';
30 + foreach ( $dom->find( 'body' ) as $element ) {
31 + if ( ! empty( $element->class ) ) {
32 + $element->class = $element->class . ' wplingua-list';
33 + } else {
34 + $element->class = 'wplingua-list';
35 + }
32 36 }
33 37
34 38 /**
35 39 * Add list assets
@@ -60,9 +64,9 @@
60 64 $language_current_id = $args['language_target'];
61 65 $languages_target = wplng_get_languages_target();
62 66
63 67 if ( empty( $languages_target ) ) {
64 - return '';
68 + return $dom;
65 69 }
66 70
67 71 $class = wplng_get_switcher_class(
68 72 array(
@@ -328,9 +332,9 @@
328 332
329 333 $html .= '<div id="wplng-modal-items">';
330 334
331 335 $html .= '<p id="wplng-modal-no-item-found" style="display: none;">';
332 - $html .= esc_html( 'No translation found.', 'wplingua' );
336 + $html .= esc_html__( 'No translation found.', 'wplingua' );
333 337 $html .= '</p>'; // End #wplng-modal-no-item-found
334 338
335 339 foreach ( $translations as $key => $translation ) {
336 340
@@ -374,9 +378,9 @@
374 378 $html .= ' title="' . esc_attr__( 'Edit this translation', 'wplingua' ) . '"';
375 379 $html .= ' data-wplng-post="' . esc_attr( $translation['post_id'] ) . '"';
376 380 $html .= ' class="wplng-button-icon wplng-edit-link"';
377 381 $html .= '>';
378 - $html .= '<span class="dashicons dashicons-edit"></span></a>';
382 + $html .= '<span class="dashicons dashicons-edit"></span>';
379 383 $html .= '</a>';
380 384
381 385 $html .= '</div>'; // End .wplng-item-edit
382 386 $html .= '</div>'; // End .wplng-item-main