PluginProbe
Polylang / 0.5
Polylang v0.5
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
polylang / include / api.php

api.php in Polylang 0.5, at include/api.php

28 lines 759 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // template tag: displays the language switcher
4 function pll_the_languages($args = '') {
5 global $polylang;
6 return $polylang->the_languages($args);
7 }
8
9 // among the post and its translations, returns the id of the post which is in the language represented by $slug
10 function pll_get_post($post_id, $slug) {
11 global $polylang;
12 return $polylang->get_post($post_id, $slug);
13 }
14
15 // among the term and its translations, returns the id of the term which is in the language represented by $slug
16 function pll_get_term($term_id, $slug) {
17 global $polylang;
18 return $polylang->get_term($term_id, $slug);
19 }
20
21 // acts as is_front_page but knows about translated front page
22 function pll_is_front_page() {
23 global $polylang;
24 return $polylang->is_front_page();
25 }
26
27 ?>
28