| @@ -1,8 +1,5 @@ | ||
| 1 | 1 | <?php |
| 2 | -/** | |
| 3 | - * @package Polylang | |
| 4 | - */ | |
| 5 | 2 | |
| 6 | 3 | /** |
| 7 | 4 | * Define wordpress.com VIP equivalent of uncached functions |
| 8 | 5 | * WordPress backward compatibility functions |
| @@ -21,25 +18,8 @@ | ||
| 21 | 18 | * @return WP_Post|array|null WP_Post (or array) on success, or null on failure. |
| 22 | 19 | */ |
| 23 | 20 | function wpcom_vip_get_page_by_title( $page_title, $output = OBJECT, $post_type = 'page' ) { |
| 24 | 21 | return get_page_by_title( $page_title, $output, $post_type ); // phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.get_page_by_title_get_page_by_title |
| 25 | - } | |
| 26 | -} | |
| 27 | - | |
| 28 | -if ( ! function_exists( 'wpcom_vip_get_page_by_path' ) ) { | |
| 29 | - /** | |
| 30 | - * Retrieves a page given its path. | |
| 31 | - * | |
| 32 | - * @since 2.8.3 | |
| 33 | - * | |
| 34 | - * @param string $page_path Page path. | |
| 35 | - * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to | |
| 36 | - * a WP_Post object, an associative array, or a numeric array, respectively. Default OBJECT. | |
| 37 | - * @param string|array $post_type Optional. Post type or array of post types. Default 'page'. | |
| 38 | - * @return WP_Post|array|null WP_Post (or array) on success, or null on failure. | |
| 39 | - */ | |
| 40 | - function wpcom_vip_get_page_by_path( $page_path, $output = OBJECT, $post_type = 'page' ) { | |
| 41 | - return get_page_by_path( $page_path, $output, $post_type ); // phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.get_page_by_path_get_page_by_path | |
| 42 | 22 | } |
| 43 | 23 | } |
| 44 | 24 | |
| 45 | 25 | if ( ! function_exists( 'wp_doing_ajax' ) ) { |