Changeset 42987 for trunk/src/wp-includes/comment.php
- Timestamp:
- 04/18/2018 10:54:23 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment.php
r42888 r42987 3277 3277 3278 3278 /** 3279 * Registers the personal data exporter for comments 3280 * 3281 * @param array $exporters An array of personal data exporters. 3282 * @return array An array of personal data exporters. 3279 * Registers the personal data exporter for comments. 3280 * 3281 * @since 4.9.6 3282 * 3283 * @param array $exporters An array of personal data exporters. 3284 * @return array $exporters An array of personal data exporters. 3283 3285 */ 3284 3286 function wp_register_comment_personal_data_exporter( $exporters ) { … … 3294 3296 * Finds and exports personal data associated with an email address from the comments table. 3295 3297 * 3296 * @param string $email_address The comment author email address. 3297 * @param int $page Comment page. 3298 * @return array An array of personal data. 3298 * @since 4.9.6 3299 * 3300 * @param string $email_address The comment author email address. 3301 * @param int $page Comment page. 3302 * @return array $return An array of personal data. 3299 3303 */ 3300 3304 function wp_comments_personal_data_exporter( $email_address, $page = 1 ) { 3301 3305 3302 // Technically, strtolower isn't necessary since get_comments will match email insensitive 3303 // But it is a good example for plugin developers whose targets might not be as generous 3304 $email_address = trim( strtolower( $email_address ) ); 3305 3306 // Limit us to 500 comments at a time to avoid timing out 3306 // Limit us to 500 comments at a time to avoid timing out. 3307 3307 $number = 500; 3308 $page = (int) $page;3308 $page = (int) $page; 3309 3309 3310 3310 $data_to_export = array(); … … 3337 3337 $value = ''; 3338 3338 3339 switch ( $key ) {3339 switch ( $key ) { 3340 3340 case 'comment_author': 3341 3341 case 'comment_author_email': … … 3357 3357 3358 3358 if ( ! empty( $value ) ) { 3359 $comment_data_to_export[] = array( 'name' => $name, 'value' => $value ); 3359 $comment_data_to_export[] = array( 3360 'name' => $name, 3361 'value' => $value, 3362 ); 3360 3363 } 3361 3364 }
Note: See TracChangeset
for help on using the changeset viewer.