[wp-trac] [WordPress Trac] #33306: Only Query for author ID if user is member of blog
WordPress Trac
noreply at wordpress.org
Fri Apr 5 15:29:59 UTC 2024
#33306: Only Query for author ID if user is member of blog
------------------------------------------+--------------------------------
Reporter: sboisvert | Owner: (none)
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: Query | Version: 4.3
Severity: normal | Resolution: wontfix
Keywords: needs-patch needs-unit-tests | Focuses: multisite,
| performance
------------------------------------------+--------------------------------
Changes (by pbearne):
* status: new => closed
* resolution: => wontfix
Comment:
this code got moved to link-template.php
src/wp-includes/link-template.php:1913
{{{#!php
<?php
foreach ( $private_states as $state ) {
if ( current_user_can( $read_private_cap ) ) {
$where .= $wpdb->prepare( ' OR
p.post_status = %s', $state );
} else {
$where .= $wpdb->prepare( ' OR
(p.post_author = %d AND p.post_status = %s)', $user_id, $state );
}
}
}}}
Can similar code changed so closing as won't fix
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33306#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list