| @@ -7,8 +7,10 @@ | ||
| 7 | 7 | * @author Tobias Bäthge |
| 8 | 8 | * @since 1.0.0 |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | +declare(strict_types=1); | |
| 12 | + | |
| 11 | 13 | // Prohibit direct script loading. |
| 12 | 14 | defined( 'ABSPATH' ) || die( 'No direct script access allowed!' ); |
| 13 | 15 | |
| 14 | 16 | /** |
| @@ -146,9 +148,9 @@ | ||
| 146 | 148 | $table = array( |
| 147 | 149 | 'id' => $table_id, |
| 148 | 150 | 'name' => $post->post_title, |
| 149 | 151 | 'description' => $post->post_excerpt, |
| 150 | - 'author' => $post->post_author, | |
| 152 | + 'author' => (int) $post->post_author, | |
| 151 | 153 | // 'created' => $post->post_date, |
| 152 | 154 | 'last_modified' => $post->post_modified, |
| 153 | 155 | ); |
| 154 | 156 | |
| @@ -626,8 +628,15 @@ | ||
| 626 | 628 | foreach ( $cache_flush_hooks as $cache_flush_hook ) { |
| 627 | 629 | do_action( $cache_flush_hook ); |
| 628 | 630 | } |
| 629 | 631 | |
| 632 | + // Cloudflare APO. | |
| 633 | + if ( class_exists( '\Cloudflare\APO\WordPress\Hooks' ) ) { | |
| 634 | + $_cloudflare = new \Cloudflare\APO\WordPress\Hooks(); | |
| 635 | + if ( is_callable( array( $_cloudflare, 'purgeCacheEverything' ) ) ) { | |
| 636 | + $_cloudflare->purgeCacheEverything(); | |
| 637 | + } | |
| 638 | + } | |
| 630 | 639 | // Kinsta. |
| 631 | 640 | if ( isset( $GLOBALS['kinsta_cache'] ) && ! empty( $GLOBALS['kinsta_cache']->kinsta_cache_purge ) && is_callable( array( $GLOBALS['kinsta_cache']->kinsta_cache_purge, 'purge_complete_caches' ) ) ) { |
| 632 | 641 | $GLOBALS['kinsta_cache']->kinsta_cache_purge->purge_complete_caches(); // @phpstan-ignore method.nonObject |
| 633 | 642 | } |