[wp-trac] [WordPress Trac] #43438: Add filters and Ajax support for personal data export
WordPress Trac
noreply at wordpress.org
Wed Mar 14 23:13:45 UTC 2018
#43438: Add filters and Ajax support for personal data export
----------------------------+------------------
Reporter: azaozz | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 5.0
Component: General | Version:
Severity: normal | Resolution:
Keywords: gdpr has-patch | Focuses:
----------------------------+------------------
Comment (by allendav):
Replying to [comment:18 azaozz]:
> Replying to [comment:15 allendav]:
>
> Yep, the screenshots look a lot better now, not even sure we need the
count after the different bits of data.
>
> Also thinking we can perhaps remove the "Provider" column. This is
showing the personal data for a user of a particular website. There is no
difference which plugin stores the data, the important part is that the
data is on the site and they get to see and download it.
Agreed.
>
> For getting only unique data from the comments query in 43438.3.diff I
think we can try something like:
>
> {{{
> $name = $url = $ip = $ua = array(); // we know the email is unique
> foreach ( $comments as $comment ) {
> if ( ! in_array( $comment->comment_author, $name ) ) {
> $name[] = $comment->comment_author;
> }
> if ( ! in_array( $comment->comment_author_url, $url ) ) {
> $url[] = $comment->comment_author_url;
> }
> .....
> }}}
>
> or alternatively just do:
> {{{
> foreach ( $comments as $comment ) {
> $name[ $comment->comment_author ] = 1;
> $url[ $comment->comment_author_url ] = 1;
> .....
> }
> $name = array_filter( array_keys( $name ) );
> ....
> }}}
>
> Maybe 10000 is too much but this way we can easily process 5000-6000
comment rows in one go and get only the unique data. The idea is to get
all of the user's comments at once and not have to merge these arrays
later in js.
Agreed. I am going to split out the comments into #43440 so we'll pick
this up over there.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43438#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list