| @@ 191-208 (lines=18) @@ | ||
| 188 | ||
| 189 | $events = array(); |
|
| 190 | ||
| 191 | foreach ( $terms as $term ) { |
|
| 192 | ||
| 193 | // Double check our set user meta value |
|
| 194 | if ( '__test__' != get_term_meta( $term->term_id, 'dummypress_test_data', true ) && '__test__' != get_term_meta( $term->term_id, 'evans_test_content', true ) ) { |
|
| 195 | continue; |
|
| 196 | } |
|
| 197 | ||
| 198 | $events[] = array( |
|
| 199 | 'action' => 'deleted', |
|
| 200 | 'oid' => $term->term_id, |
|
| 201 | 'type' => $slug, |
|
| 202 | 'link' => '' |
|
| 203 | ); |
|
| 204 | ||
| 205 | // Delete our term |
|
| 206 | wp_delete_term( $term->term_id, $slug ); |
|
| 207 | ||
| 208 | } |
|
| 209 | ||
| 210 | $taxonomy = get_taxonomy( $slug ); |
|
| 211 | ||
| @@ 251-273 (lines=23) @@ | ||
| 248 | ||
| 249 | $events = array(); |
|
| 250 | ||
| 251 | foreach ( $users as $user ) { |
|
| 252 | ||
| 253 | // Make sure we can't delete ourselves by accident |
|
| 254 | if ( $user->ID == get_current_user_id() ) { |
|
| 255 | continue; |
|
| 256 | } |
|
| 257 | ||
| 258 | // Double check our set user meta value |
|
| 259 | if ( '__test__' != get_user_meta( $user->ID, 'dummypress_test_data', true ) && '__test__' != get_user_meta( $user->ID, 'evans_test_content', true ) ) { |
|
| 260 | continue; |
|
| 261 | } |
|
| 262 | ||
| 263 | $events[] = array( |
|
| 264 | 'action' => 'deleted', |
|
| 265 | 'oid' => $user->ID, |
|
| 266 | 'type' => $slug, |
|
| 267 | 'link' => '' |
|
| 268 | ); |
|
| 269 | ||
| 270 | // Force delete the user |
|
| 271 | wp_delete_user( $user->ID ); |
|
| 272 | ||
| 273 | } |
|
| 274 | ||
| 275 | $events[] = array( |
|
| 276 | 'action' => 'general', |
|