-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtemplate-tags.php
37 lines (34 loc) · 941 Bytes
/
template-tags.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
* Contains template tag functions for other plugins/themes to use
*
* @package Multilingual WP
* @author Nikola Nikolov <[email protected]>
* @copyright Copyleft (ɔ) 2012-2013, Nikola Nikolov
* @license {@link http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3}
* @since 0.1
*/
/**
* Gives access to the plugin instance
*
* @global Multilingual_WP $GLOBALS['Multilingual_WP']
*/
function &_mlwp() {
return $GLOBALS['Multilingual_WP'];
}
/**
* Renders a language switcher
*
* @uses Multilingual_WP::build_lang_switcher()
*/
function mlwp_lang_switcher( $options = array() ) {
return $GLOBALS['Multilingual_WP']->build_lang_switcher( $options );
}
/**
* Converts a URL to the current/specified language
*
* @uses Multilingual_WP::convert_URL()
*/
function mlwp_convert_URL( $url = '', $lang = '', $force = false ) {
return $GLOBALS['Multilingual_WP']->convert_URL( $url, $lang );
}