• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Yoast / wordpress-seo / 6987097851

25 Nov 2023 04:49AM UTC coverage: 49.206% (-0.1%) from 49.302%
6987097851

push

github

web-flow
Merge pull request #20878 from Yoast/JRF/ghactions-minor-tweak

GH Actions: update a few links in inline comments

15305 of 31104 relevant lines covered (49.21%)

4.03 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/admin/statistics/class-statistics-integration.php
1
<?php
2
/**
3
 * WPSEO plugin file.
4
 *
5
 * @package WPSEO\Admin\Statistics
6
 */
7

8
/**
9
 * Class WPSEO_Statistic_Integration.
10
 */
11
class WPSEO_Statistic_Integration implements WPSEO_WordPress_Integration {
12

13
        /**
14
         * Adds hooks to clear the cache.
15
         *
16
         * @return void
17
         */
18
        public function register_hooks() {
×
19
                add_action( 'wp_insert_post', [ $this, 'clear_cache' ] );
×
20
                add_action( 'delete_post', [ $this, 'clear_cache' ] );
×
21
        }
22

23
        /**
24
         * Clears the dashboard widget items cache.
25
         *
26
         * @return void
27
         */
28
        public function clear_cache() {
×
29
                // Bail if this is a multisite installation and the site has been switched.
30
                if ( is_multisite() && ms_is_switched() ) {
×
31
                        return;
×
32
                }
33

34
                delete_transient( WPSEO_Statistics_Service::CACHE_TRANSIENT_KEY );
×
35
        }
36
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc