Make WordPress Core

Ticket #44075: 44075.diff

File 44075.diff, 7.1 KB (added by desrosj, 7 years ago)
  • src/wp-admin/includes/user.php

     
    587587 * @access private
    588588 *
    589589 * @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.
    591591 */
    592592function _wp_privacy_resend_request( $request_id ) {
    593593        $request_id = absint( $request_id );
     
    754754function _wp_personal_data_cleanup_requests() {
    755755        /** This filter is documented in wp-includes/user.php */
    756756        $expires        = (int) apply_filters( 'user_request_key_expiration', DAY_IN_SECONDS );
     757
    757758        $requests_query = new WP_Query( array(
    758759                'post_type'      => 'user_request',
    759760                'posts_per_page' => -1,
     
    10111012
    10121013/**
    10131014 * WP_Privacy_Requests_Table class.
     1015 *
     1016 * @since 4.9.6
    10141017 */
    10151018abstract class WP_Privacy_Requests_Table extends WP_List_Table {
    10161019
     
    10171020        /**
    10181021         * Action name for the requests this table will work with. Classes
    10191022         * which inherit from WP_Privacy_Requests_Table should define this.
    1020          * e.g. 'export_personal_data'
    10211023         *
     1024         * Example: 'export_personal_data'.
     1025         *
    10221026         * @since 4.9.6
    10231027         *
    10241028         * @var string $request_type Name of action.
     
    10391043         *
    10401044         * @since 4.9.6
    10411045         *
    1042          * @param array Array of columns.
     1046         * @return array Array of columns.
    10431047         */
    10441048        public function get_columns() {
    10451049                $columns = array(
     
    10571061         *
    10581062         * @since 4.9.6
    10591063         *
    1060          * @return array
     1064         * @return array Default sortable columns.
    10611065         */
    10621066        protected function get_sortable_columns() {
    10631067                return array();
     
    10681072         *
    10691073         * @since 4.9.6
    10701074         *
    1071          * @return string
     1075         * @return string Default primary column name.
    10721076         */
    10731077        protected function get_default_primary_column_name() {
    10741078                return 'email';
     
    11121116        }
    11131117
    11141118        /**
    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.
    11171120         *
    11181121         * @since 4.9.6
    11191122         *
    1120          * @return array
     1123         * @return array Associative array of views in the format of $view_name => $view_markup.
    11211124         */
    11221125        protected function get_views() {
    11231126                $current_status = isset( $_REQUEST['filter-status'] ) ? sanitize_text_field( $_REQUEST['filter-status'] ) : '';
     
    11421145         *
    11431146         * @since 4.9.6
    11441147         *
    1145          * @return array
     1148         * @return array List of bulk actions.
    11461149         */
    11471150        protected function get_bulk_actions() {
    11481151                return array(
     
    12561259         * @since 4.9.6
    12571260         *
    12581261         * @param WP_User_Request $item Item being shown.
    1259          * @return string
     1262         * @return string Checkbox column markup.
    12601263         */
    12611264        public function column_cb( $item ) {
    12621265                return sprintf( '<input type="checkbox" name="request_id[]" value="%1$s" /><span class="spinner"></span>', esc_attr( $item->ID ) );
     
    12681271         * @since 4.9.6
    12691272         *
    12701273         * @param WP_User_Request $item Item being shown.
    1271          * @return string
     1274         * @return string Status column markup.
    12721275         */
    12731276        public function column_status( $item ) {
    12741277                $status        = get_post_status( $item->ID );
     
    13051308         * @since 4.9.6
    13061309         *
    13071310         * @param int $timestamp Event timestamp.
    1308          * @return string
     1311         * @return string Human readable date.
    13091312         */
    13101313        protected function get_timestamp_as_date( $timestamp ) {
    13111314                if ( empty( $timestamp ) ) {
     
    13271330         *
    13281331         * @since 4.9.6
    13291332         *
    1330          * @param WP_User_Request $item         Item being shown.
     1333         * @param WP_User_Request $item        Item being shown.
    13311334         * @param string          $column_name Name of column being shown.
    1332          * @return string
     1335         * @return string Default column output.
    13331336         */
    13341337        public function column_default( $item, $column_name ) {
    13351338                $cell_value = $item->$column_name;
     
    13421345        }
    13431346
    13441347        /**
    1345          * Actions column. Overriden by children.
     1348         * Actions column. Overridden by children.
    13461349         *
    13471350         * @since 4.9.6
    13481351         *
    13491352         * @param WP_User_Request $item Item being shown.
    1350          * @return string
     1353         * @return string Email column markup.
    13511354         */
    13521355        public function column_email( $item ) {
    13531356                return sprintf( '<a href="%1$s">%2$s</a> %3$s', esc_url( 'mailto:' . $item->email ), $item->email, $this->row_actions( array() ) );
     
    13541357        }
    13551358
    13561359        /**
    1357          * Next steps column. Overriden by children.
     1360         * Next steps column. Overridden by children.
    13581361         *
    13591362         * @since 4.9.6
    13601363         *
     
    13631366        public function column_next_steps( $item ) {}
    13641367
    13651368        /**
    1366          * Generates content for a single row of the table
     1369         * Generates content for a single row of the table,
    13671370         *
    13681371         * @since 4.9.6
    13691372         *
    1370          * @param WP_User_Request $item The current item
     1373         * @param WP_User_Request $item The current item.
    13711374         */
    13721375        public function single_row( $item ) {
    13731376                $status = $item->status;
     
    13781381        }
    13791382
    13801383        /**
    1381          * Embed scripts used to perform actions. Overriden by children.
     1384         * Embed scripts used to perform actions. Overridden by children.
    13821385         *
    13831386         * @since 4.9.6
    13841387         */
     
    14151418         * @since 4.9.6
    14161419         *
    14171420         * @param WP_User_Request $item Item being shown.
    1418          * @return string
     1421         * @return string Email column markup.
    14191422         */
    14201423        public function column_email( $item ) {
    14211424                $exporters       = apply_filters( 'wp_privacy_personal_data_exporters', array() );
     
    14441447        }
    14451448
    14461449        /**
    1447          * Next steps column.
     1450         * Displays the next steps column.
    14481451         *
    14491452         * @since 4.9.6
    14501453         *
     
    14951498/**
    14961499 * WP_Privacy_Data_Removal_Requests_Table class.
    14971500 *
    1498         * @since 4.9.6
     1501 * @since 4.9.6
    14991502 */
    15001503class WP_Privacy_Data_Removal_Requests_Table extends WP_Privacy_Requests_Table {
    15011504        /**
     
    15221525         * @since 4.9.6
    15231526         *
    15241527         * @param WP_User_Request $item Item being shown.
    1525          * @return string
     1528         * @return string Email column markup.
    15261529         */
    15271530        public function column_email( $item ) {
    15281531                $row_actions = array();
  • src/wp-includes/user.php

     
    28162816 * @since 4.9.6
    28172817 * @access private
    28182818 *
    2819  * @return array
     2819 * @return array List of core privacy action types.
    28202820 */
    28212821function _wp_privacy_action_request_types() {
    28222822        return array(
     
    32813281 * @since 4.9.6
    32823282 *
    32833283 * @param string $action_name Action name of the request.
    3284  * @return string
     3284 * @return string Human readable action name.
    32853285 */
    32863286function wp_user_request_action_description( $action_name ) {
    32873287        switch ( $action_name ) {
     
    34073407         * @param array  $email_data {
    34083408         *     Data relating to the account action email.
    34093409         *
    3410          *     @type WP_User_Request $request User request object.
     3410         *     @type WP_User_Request $request     User request object.
    34113411         *     @type string          $email       The email address this is being sent to.
    34123412         *     @type string          $description Description of the action being performed so the user knows what the email is for.
    34133413         *     @type string          $confirm_url The link to click on to confirm the account action.
     
    34523452}
    34533453
    34543454/**
    3455  * Valdate 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.
    34563456 *
    34573457 * @since 4.9.6
    34583458 *