# spinupwp/1.6/functions.php

SpinupWP, version 1.6. 41 lines.

- Page: https://pluginprobe.com/plugins/spinupwp/1.6/code/functions.php
- Raw: https://pluginprobe.com/plugins/spinupwp/1.6/raw/functions.php
- Modified: 2019-05-16T18:26:52+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/spinupwp/1.6/code/functions.php#L10-L20`.

```php
<?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 );
    }
}
```
