forked from spinupwp/spinupwp-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
41 lines (37 loc) · 888 Bytes
/
functions.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
38
39
40
41
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! function_exists( 'spinupwp_purge_site' ) ) {
/**
* Purge the entire SpinupWP page cache.
*
* @return bool
*/
function spinupwp_purge_site() {
return spinupwp()->cache->purge_page_cache();
}
}
if ( ! function_exists( 'spinupwp_purge_post' ) ) {
/**
* Purge a single post from the SpinupWP page cache.
*
* @param \WP_Post $post
* @return bool
*/
function spinupwp_purge_post( $post ) {
return spinupwp()->cache->purge_post( $post );
}
}
if ( ! function_exists( 'spinupwp_purge_url' ) ) {
/**
* Purge a single URL from the SpinupWP page cache.
*
* @param string $url
* @return bool
*/
function spinupwp_purge_url( $url ) {
return spinupwp()->cache->purge_url( $url );
}
}