Changeset 43077 for branches/4.9/src/wp-includes/comment.php
- Timestamp:
- 05/02/2018 12:11:50 AM (7 years ago)
- Location:
- branches/4.9
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.9
-
branches/4.9/src/wp-includes/comment.php
r43076 r43077 3148 3148 3149 3149 /** 3150 * Registers the personal data exporter for comments 3151 * 3152 * @param array $exporters An array of personal data exporters. 3153 * @return array An array of personal data exporters. 3150 * Registers the personal data exporter for comments. 3151 * 3152 * @since 4.9.6 3153 * 3154 * @param array $exporters An array of personal data exporters. 3155 * @return array $exporters An array of personal data exporters. 3154 3156 */ 3155 3157 function wp_register_comment_personal_data_exporter( $exporters ) { … … 3165 3167 * Finds and exports personal data associated with an email address from the comments table. 3166 3168 * 3167 * @param string $email_address The comment author email address. 3168 * @param int $page Comment page. 3169 * @return array An array of personal data. 3169 * @since 4.9.6 3170 * 3171 * @param string $email_address The comment author email address. 3172 * @param int $page Comment page. 3173 * @return array $return An array of personal data. 3170 3174 */ 3171 3175 function wp_comments_personal_data_exporter( $email_address, $page = 1 ) { 3172 3176 3173 // Technically, strtolower isn't necessary since get_comments will match email insensitive 3174 // But it is a good example for plugin developers whose targets might not be as generous 3175 $email_address = trim( strtolower( $email_address ) ); 3176 3177 // Limit us to 500 comments at a time to avoid timing out 3177 // Limit us to 500 comments at a time to avoid timing out. 3178 3178 $number = 500; 3179 $page = (int) $page;3179 $page = (int) $page; 3180 3180 3181 3181 $data_to_export = array(); … … 3208 3208 $value = ''; 3209 3209 3210 switch ( $key ) {3210 switch ( $key ) { 3211 3211 case 'comment_author': 3212 3212 case 'comment_author_email': … … 3228 3228 3229 3229 if ( ! empty( $value ) ) { 3230 $comment_data_to_export[] = array( 'name' => $name, 'value' => $value ); 3230 $comment_data_to_export[] = array( 3231 'name' => $name, 3232 'value' => $value, 3233 ); 3231 3234 } 3232 3235 }
Note: See TracChangeset
for help on using the changeset viewer.