PluginProbe
Translate and Go multilingual – Automatic AI translation – wpLingua / 1.0.3
Translate and Go multilingual – Automatic AI translation – wpLingua v1.0.3
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 1.1.0 All 112 releases
wplingua / inc / shortcode.php

shortcode.php in Translate and Go multilingual – Automatic AI translation – wpLingua 1.0.3, at inc/shortcode.php

53 lines 963 B
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 * wpLingua Shortcode : [wplng_notranslate]
11 *
12 * @param array $atts
13 * @param string $content
14 * @return string
15 */
16 function wplng_shortcode_notranslate( $atts, $content ) {
17
18 $html = '<span class="notranslate">';
19 $html .= wp_kses_post( $content );
20 $html .= '</span>';
21
22 return $html;
23 }
24
25
26 /**
27 * wpLingua Shortcode : [wplng_switcher]
28 *
29 * @param array $atts
30 * @return string
31 */
32 function wplng_shortcode_switcher( $atts ) {
33
34 $attributes = shortcode_atts(
35 array(
36 'insert' => false,
37 'style' => false,
38 'title' => false,
39 'theme' => false,
40 'flags' => false,
41 'class' => false,
42 ), $atts
43 );
44
45 if ( ! empty( $attributes['class'] ) ) {
46 $attributes['class'] .= ' insert-shortcode';
47 } else {
48 $attributes['class'] = 'insert-shortcode';
49 }
50
51 return wplng_get_switcher_html( $attributes );
52 }
53