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

WordPress Trac noreply at wordpress.org
Thu Mar 16 21:02:58 UTC 2023


#57913: Attachment pages need to have an "on" toggle
-----------------------------------+------------------------------
 Reporter:  joostdevalk            |       Owner:  (none)
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  Awaiting Review
Component:  Media                  |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  2nd-opinion has-patch  |     Focuses:
-----------------------------------+------------------------------

Comment (by eatingrules):

 I appreciate @seedsca's concerns -- it's a good idea for us to get outside
 our developer "bubble" whenever we can. How can we learn if there are
 valuable use cases we're not considering?

 But @SergeyBiryukov's latest workflow seems like an improvement -- since
 any sites that are currently using them should keep working okay. (And
 this is more aligned philosophically with @joostdevalk 's initial
 proposal, so it's backwards-compatible.)

 > Yeah, that could be implemented if that's the consensus here:
 > * Keep the upgrade routine from the previous iteration of the PR, which
 would set an option, e.g. `wp_attachment_pages_enabled` (to follow the
 `link_manager_enabled` precedent), so that existing sites don't need to do
 anything to keep the current behavior.
 > * For new sites, set the `wp_attachment_pages_enabled` to `0` by
 default.
 > * Older sites that want to disable the attachment pages can also set the
 option to `0`.
 > * If either of these two values is truthy, keep attachment pages as is:
 >  * `current_theme_supports( 'attachment-pages' )`
 >  * `get_option( 'wp_attachment_pages_enabled' )`
 > * Otherwise, redirect to the attachment URL.

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


More information about the wp-trac mailing list