PluginProbe
Polylang / 2.0.12
Polylang v2.0.12
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 / functions-wpcom-vip.php

functions-wpcom-vip.php in Polylang 2.0.12, at include/functions-wpcom-vip.php

30 lines 860 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Define wordpress.com VIP equivalent of uncached functions
5 */
6
7 if ( ! function_exists( 'wpcom_vip_get_page_by_title' ) ) {
8 function wpcom_vip_get_page_by_title( $page_title, $output = OBJECT, $post_type = 'page' ) {
9 return get_page_by_title( $page_title, $output, $post_type );
10 }
11 }
12
13 if ( ! function_exists( 'wpcom_vip_get_category_by_slug' ) ) {
14 function wpcom_vip_get_category_by_slug( $slug ) {
15 return get_category_by_slug( $slug );
16 }
17 }
18
19 if ( ! function_exists( 'wpcom_vip_get_term_by' ) ) {
20 function wpcom_vip_get_term_by( $field, $value, $taxonomy = '', $output = OBJECT, $filter = 'raw' ) {
21 return get_term_by( $field, $value, $taxonomy, $output, $filter );
22 }
23 }
24
25 if ( ! function_exists( 'wpcom_vip_get_term_link' ) ) {
26 function wpcom_vip_get_term_link( $term, $taxonomy = '' ) {
27 return get_term_link( $term, $taxonomy );
28 }
29 }
30