[wp-trac] [WordPress Trac] #57913: Attachment pages need to have an "on" toggle

WordPress Trac noreply at wordpress.org
Fri Sep 22 00:02:44 UTC 2023


#57913: Attachment pages need to have an "on" toggle
-------------------------------------------------+-------------------------
 Reporter:  joostdevalk                          |       Owner:
                                                 |  SergeyBiryukov
     Type:  enhancement                          |      Status:  closed
 Priority:  normal                               |   Milestone:  6.4
Component:  Media                                |     Version:
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch needs-docs needs-testing   |     Focuses:
  has-testing-info                               |
-------------------------------------------------+-------------------------
Changes (by SergeyBiryukov):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"56657" 56657]:
 {{{
 #!CommitTicketReference repository="" revision="56657"
 Media: Disable attachment pages for new installations.

 WordPress creates attachment pages by default for every attachment
 uploaded. On the vast majority of sites, these attachment pages don't
 contain any meaningful information. They do however exist, get indexed by
 search engines, and sometimes even rank in search results, leading to bad
 results for users and site owners.

 This commit introduces a `wp_attachment_pages_enabled` database option to
 control the attachment pages behavior:

 * On existing sites, the option is set to `1` on upgrade, so that
 attachment pages continue to work as is.
 * For new sites, the option is set to to `0` by default, which means
 attachment pages are redirected to the attachment URL.
 * Sites that want to enable or disable the attachment pages can set the
 option to `1` or `0`, respectively.

 Follow-up to [2958], [3303], [7149], [34690].

 Props aristath, poena, afercia, joostdevalk, jonoaldersonwp, azaozz,
 johnbillion, joedolson, basiliskan, audrasjb, davelo, rilwis, manfcarlo,
 tyxla, garrett-eclipse, seedsca, eatingrules, matveb, antpb, zodiac1978,
 oglekler, zunaid321, costdev, SergeyBiryukov.
 Fixes #57913.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57913#comment:47>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list