Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
50.00% |
1 / 2 |
|
50.00% |
1 / 2 |
CRAP | |
0.00% |
0 / 1 |
| Super_Cache_Tracking | |
50.00% |
1 / 2 |
|
50.00% |
1 / 2 |
2.50 | |
0.00% |
0 / 1 |
| setup | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| track_move_to_wpsc | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace Automattic\Jetpack_Boost\Lib; |
| 4 | |
| 5 | class Super_Cache_Tracking { |
| 6 | public static function setup() { |
| 7 | add_action( 'jb_cache_moved_to_wpsc', array( __CLASS__, 'track_move_to_wpsc' ) ); |
| 8 | } |
| 9 | |
| 10 | /** |
| 11 | * Track when site owner moves cache to WPSC. |
| 12 | */ |
| 13 | public static function track_move_to_wpsc() { |
| 14 | Analytics::record_user_event( 'moved_cache_to_wpsc' ); |
| 15 | } |
| 16 | } |