1 | <?php |
||
12 | class Delete{ |
||
13 | |||
14 | /** |
||
15 | * Delete all test content created ever. |
||
16 | * |
||
17 | * @access private |
||
18 | */ |
||
19 | public function delete_all_test_data(){ |
||
44 | |||
45 | /** |
||
46 | * Delete test data terms. |
||
47 | * |
||
48 | * This function will search for all terms of a particular taxonomy ($slug) |
||
49 | * and delete them all using a particular term_meta flag that we set when creating |
||
50 | * the posts. Validates the user first. |
||
51 | * |
||
52 | * @see WP_Query, wp_delete_post |
||
53 | * |
||
54 | * @param string $data Information about the type. |
||
55 | */ |
||
56 | public function delete_objects( $data ){ |
||
75 | |||
76 | |||
77 | /** |
||
78 | * Run some checks to make sure that our user is allowed to delete data. |
||
79 | * |
||
80 | * @see is_user_logged_in, current_user_can |
||
81 | */ |
||
82 | public function user_can_delete(){ |
||
98 | |||
99 | |||
100 | } |
||
101 |