Conditions | 6 |
Paths | 7 |
Total Lines | 23 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
36 | protected function task( $item ) { |
||
37 | if ( ! $item || empty( $item['task'] ) ) { |
||
38 | return false; |
||
39 | } |
||
40 | |||
41 | $process_count = 0; |
||
42 | $process_limit = 20; |
||
43 | |||
44 | switch ( $item['task'] ) { |
||
45 | case 'trash_pending_posts': |
||
46 | $process_count = GeoDir_Privacy::trash_pending_posts( $process_limit ); |
||
47 | break; |
||
48 | case 'anonymize_published_posts': |
||
49 | $process_count = GeoDir_Privacy::anonymize_published_posts( $process_limit ); |
||
50 | break; |
||
51 | } |
||
52 | |||
53 | if ( $process_limit === $process_count ) { |
||
54 | return $item; |
||
55 | } |
||
56 | |||
57 | return false; |
||
58 | } |
||
59 | } |
||
60 |