Make WordPress Core

Ticket #44354: 44354.diff

File 44354.diff, 2.0 KB (added by birgire, 7 years ago)
  • src/wp-admin/includes/user.php

    diff --git src/wp-admin/includes/user.php src/wp-admin/includes/user.php
    index fa868d9..d771f74 100644
    abstract class WP_Privacy_Requests_Table extends WP_List_Table { 
    10531053                        'created_timestamp' => __( 'Requested' ),
    10541054                        'next_steps'        => __( 'Next Steps' ),
    10551055                );
    1056                 return $columns;
     1056
     1057                /**
     1058                 * Filters the columns displayed in the Requests list table for a specific request type.
     1059                 *
     1060                 * The dynamic portion of the hook name, `$this->request_type`, refers to the request type.
     1061                 *
     1062                 * @since 5.0.0
     1063                 *
     1064                 * @param string[] $columns An associative array of column headings.
     1065                 */
     1066                return apply_filters( "manage_{$this->request_type}_columns", $columns );
    10571067        }
    10581068
    10591069        /**
    abstract class WP_Privacy_Requests_Table extends WP_List_Table { 
    13321342         *
    13331343         * @param WP_User_Request $item        Item being shown.
    13341344         * @param string          $column_name Name of column being shown.
    1335          * @return string Default column output.
    13361345         */
    13371346        public function column_default( $item, $column_name ) {
    1338                 $cell_value = $item->$column_name;
    1339 
    1340                 if ( in_array( $column_name, array( 'created_timestamp' ), true ) ) {
    1341                         return $this->get_timestamp_as_date( $cell_value );
    1342                 }
     1347                /**
     1348                 * Fires for each custom column of a specific request type in the Requests list table.
     1349                 *
     1350                 * The dynamic portion of the hook name, `$this->request_type`, refers to the request type.
     1351                 *
     1352                 * @since 5.0.0
     1353                 *
     1354                 * @param string          $column_name The name of the column to display.
     1355                 * @param WP_User_Request $item        The item being shown.
     1356                 */
     1357                do_action( "manage_{$this->request_type}_custom_column", $column_name, $item );
     1358        }
    13431359
    1344                 return $cell_value;
     1360        /**
     1361         * Created timestamp column. Overridden by children.
     1362         *
     1363         * @since 5.0.0
     1364         *
     1365         * @param WP_User_Request $item Item being shown.
     1366         * @return string Human readable date.
     1367         */
     1368        public function column_created_timestamp( $item ) {
     1369                return $this->get_timestamp_as_date( $item->created_timestamp );
    13451370        }
    13461371
    13471372        /**