# wplingua/1.0.4/inc/shortcode.php

Translate and Go multilingual – Automatic AI translation – wpLingua, version 1.0.4. 53 lines.

- Page: https://pluginprobe.com/plugins/wplingua/1.0.4/code/inc/shortcode.php
- Raw: https://pluginprobe.com/plugins/wplingua/1.0.4/raw/inc/shortcode.php
- Modified: 2024-02-04T17:31:40+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wplingua/1.0.4/code/inc/shortcode.php#L10-L20`.

```php
<?php

// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
	die;
}


/**
 * wpLingua Shortcode : [wplng_notranslate]
 *
 * @param array $atts
 * @param string $content
 * @return string
 */
function wplng_shortcode_notranslate( $atts, $content ) {

	$html  = '<span class="notranslate">';
	$html .= wp_kses_post( $content );
	$html .= '</span>';

	return $html;
}


/**
 * wpLingua Shortcode : [wplng_switcher]
 *
 * @param array $atts
 * @return string
 */
function wplng_shortcode_switcher( $atts ) {

	$attributes = shortcode_atts(
		array(
			'insert' => false,
			'style'  => false,
			'title'  => false,
			'theme'  => false,
			'flags'  => false,
			'class'  => false,
		), $atts
	);

	if ( ! empty( $attributes['class'] ) ) {
		$attributes['class'] .= ' insert-shortcode';
	} else {
		$attributes['class'] = 'insert-shortcode';
	}

	return wplng_get_switcher_html( $attributes );
}

```
