Ticket #44075: 44075.diff
File 44075.diff, 7.1 KB (added by , 7 years ago) |
---|
-
src/wp-admin/includes/user.php
587 587 * @access private 588 588 * 589 589 * @param int $request_id Request ID. 590 * @return bool|WP_Error 590 * @return bool|WP_Error Returns true/false based on the success of sending the email, or a WP_Error object. 591 591 */ 592 592 function _wp_privacy_resend_request( $request_id ) { 593 593 $request_id = absint( $request_id ); … … 754 754 function _wp_personal_data_cleanup_requests() { 755 755 /** This filter is documented in wp-includes/user.php */ 756 756 $expires = (int) apply_filters( 'user_request_key_expiration', DAY_IN_SECONDS ); 757 757 758 $requests_query = new WP_Query( array( 758 759 'post_type' => 'user_request', 759 760 'posts_per_page' => -1, … … 1011 1012 1012 1013 /** 1013 1014 * WP_Privacy_Requests_Table class. 1015 * 1016 * @since 4.9.6 1014 1017 */ 1015 1018 abstract class WP_Privacy_Requests_Table extends WP_List_Table { 1016 1019 … … 1017 1020 /** 1018 1021 * Action name for the requests this table will work with. Classes 1019 1022 * which inherit from WP_Privacy_Requests_Table should define this. 1020 * e.g. 'export_personal_data'1021 1023 * 1024 * Example: 'export_personal_data'. 1025 * 1022 1026 * @since 4.9.6 1023 1027 * 1024 1028 * @var string $request_type Name of action. … … 1039 1043 * 1040 1044 * @since 4.9.6 1041 1045 * 1042 * @ paramarray Array of columns.1046 * @return array Array of columns. 1043 1047 */ 1044 1048 public function get_columns() { 1045 1049 $columns = array( … … 1057 1061 * 1058 1062 * @since 4.9.6 1059 1063 * 1060 * @return array 1064 * @return array Default sortable columns. 1061 1065 */ 1062 1066 protected function get_sortable_columns() { 1063 1067 return array(); … … 1068 1072 * 1069 1073 * @since 4.9.6 1070 1074 * 1071 * @return string 1075 * @return string Default primary column name. 1072 1076 */ 1073 1077 protected function get_default_primary_column_name() { 1074 1078 return 'email'; … … 1112 1116 } 1113 1117 1114 1118 /** 1115 * Get an associative array ( id => link ) with the list 1116 * of views available on this table. 1119 * Get an associative array ( id => link ) with the list of views available on this table. 1117 1120 * 1118 1121 * @since 4.9.6 1119 1122 * 1120 * @return array 1123 * @return array Associative array of views in the format of $view_name => $view_markup. 1121 1124 */ 1122 1125 protected function get_views() { 1123 1126 $current_status = isset( $_REQUEST['filter-status'] ) ? sanitize_text_field( $_REQUEST['filter-status'] ) : ''; … … 1142 1145 * 1143 1146 * @since 4.9.6 1144 1147 * 1145 * @return array 1148 * @return array List of bulk actions. 1146 1149 */ 1147 1150 protected function get_bulk_actions() { 1148 1151 return array( … … 1256 1259 * @since 4.9.6 1257 1260 * 1258 1261 * @param WP_User_Request $item Item being shown. 1259 * @return string 1262 * @return string Checkbox column markup. 1260 1263 */ 1261 1264 public function column_cb( $item ) { 1262 1265 return sprintf( '<input type="checkbox" name="request_id[]" value="%1$s" /><span class="spinner"></span>', esc_attr( $item->ID ) ); … … 1268 1271 * @since 4.9.6 1269 1272 * 1270 1273 * @param WP_User_Request $item Item being shown. 1271 * @return string 1274 * @return string Status column markup. 1272 1275 */ 1273 1276 public function column_status( $item ) { 1274 1277 $status = get_post_status( $item->ID ); … … 1305 1308 * @since 4.9.6 1306 1309 * 1307 1310 * @param int $timestamp Event timestamp. 1308 * @return string 1311 * @return string Human readable date. 1309 1312 */ 1310 1313 protected function get_timestamp_as_date( $timestamp ) { 1311 1314 if ( empty( $timestamp ) ) { … … 1327 1330 * 1328 1331 * @since 4.9.6 1329 1332 * 1330 * @param WP_User_Request $item 1333 * @param WP_User_Request $item Item being shown. 1331 1334 * @param string $column_name Name of column being shown. 1332 * @return string 1335 * @return string Default column output. 1333 1336 */ 1334 1337 public function column_default( $item, $column_name ) { 1335 1338 $cell_value = $item->$column_name; … … 1342 1345 } 1343 1346 1344 1347 /** 1345 * Actions column. Overrid en by children.1348 * Actions column. Overridden by children. 1346 1349 * 1347 1350 * @since 4.9.6 1348 1351 * 1349 1352 * @param WP_User_Request $item Item being shown. 1350 * @return string 1353 * @return string Email column markup. 1351 1354 */ 1352 1355 public function column_email( $item ) { 1353 1356 return sprintf( '<a href="%1$s">%2$s</a> %3$s', esc_url( 'mailto:' . $item->email ), $item->email, $this->row_actions( array() ) ); … … 1354 1357 } 1355 1358 1356 1359 /** 1357 * Next steps column. Overrid en by children.1360 * Next steps column. Overridden by children. 1358 1361 * 1359 1362 * @since 4.9.6 1360 1363 * … … 1363 1366 public function column_next_steps( $item ) {} 1364 1367 1365 1368 /** 1366 * Generates content for a single row of the table 1369 * Generates content for a single row of the table, 1367 1370 * 1368 1371 * @since 4.9.6 1369 1372 * 1370 * @param WP_User_Request $item The current item 1373 * @param WP_User_Request $item The current item. 1371 1374 */ 1372 1375 public function single_row( $item ) { 1373 1376 $status = $item->status; … … 1378 1381 } 1379 1382 1380 1383 /** 1381 * Embed scripts used to perform actions. Overrid en by children.1384 * Embed scripts used to perform actions. Overridden by children. 1382 1385 * 1383 1386 * @since 4.9.6 1384 1387 */ … … 1415 1418 * @since 4.9.6 1416 1419 * 1417 1420 * @param WP_User_Request $item Item being shown. 1418 * @return string 1421 * @return string Email column markup. 1419 1422 */ 1420 1423 public function column_email( $item ) { 1421 1424 $exporters = apply_filters( 'wp_privacy_personal_data_exporters', array() ); … … 1444 1447 } 1445 1448 1446 1449 /** 1447 * Next steps column.1450 * Displays the next steps column. 1448 1451 * 1449 1452 * @since 4.9.6 1450 1453 * … … 1495 1498 /** 1496 1499 * WP_Privacy_Data_Removal_Requests_Table class. 1497 1500 * 1498 1501 * @since 4.9.6 1499 1502 */ 1500 1503 class WP_Privacy_Data_Removal_Requests_Table extends WP_Privacy_Requests_Table { 1501 1504 /** … … 1522 1525 * @since 4.9.6 1523 1526 * 1524 1527 * @param WP_User_Request $item Item being shown. 1525 * @return string 1528 * @return string Email column markup. 1526 1529 */ 1527 1530 public function column_email( $item ) { 1528 1531 $row_actions = array(); -
src/wp-includes/user.php
2816 2816 * @since 4.9.6 2817 2817 * @access private 2818 2818 * 2819 * @return array 2819 * @return array List of core privacy action types. 2820 2820 */ 2821 2821 function _wp_privacy_action_request_types() { 2822 2822 return array( … … 3281 3281 * @since 4.9.6 3282 3282 * 3283 3283 * @param string $action_name Action name of the request. 3284 * @return string 3284 * @return string Human readable action name. 3285 3285 */ 3286 3286 function wp_user_request_action_description( $action_name ) { 3287 3287 switch ( $action_name ) { … … 3407 3407 * @param array $email_data { 3408 3408 * Data relating to the account action email. 3409 3409 * 3410 * @type WP_User_Request $request User request object.3410 * @type WP_User_Request $request User request object. 3411 3411 * @type string $email The email address this is being sent to. 3412 3412 * @type string $description Description of the action being performed so the user knows what the email is for. 3413 3413 * @type string $confirm_url The link to click on to confirm the account action. … … 3452 3452 } 3453 3453 3454 3454 /** 3455 * Val date a user request by comparing the key with the request's key.3455 * Validate a user request by comparing the key with the request's key. 3456 3456 * 3457 3457 * @since 4.9.6 3458 3458 *