[wp-trac] [WordPress Trac] #57913: Attachment pages need to have an "on" toggle
WordPress Trac
noreply at wordpress.org
Fri Sep 22 00:01:14 UTC 2023
#57913: Attachment pages need to have an "on" toggle
-------------------------------------------------+-------------------------
Reporter: joostdevalk | Owner:
| SergeyBiryukov
Type: enhancement | Status: accepted
Priority: normal | Milestone: 6.4
Component: Media | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-docs needs-testing | Focuses:
has-testing-info |
-------------------------------------------------+-------------------------
Comment (by SergeyBiryukov):
To summarize a bit, I believe all the feedback above has been addressed.
The current implementation is along the lines of comment:18, minus the
unnecessary `add_theme_support()` feature, as per comment:24:
* An upgrade routine sets the `wp_attachment_pages_enabled` option to `1`,
so that existing sites don't need to do anything to keep the current
behavior. This follows the `link_manager_enabled` precedent.
* For new sites, `wp_attachment_pages_enabled` is set to to `0` by
default.
* Older sites that want to disable the attachment pages can also set the
option to `0`.
* If `get_option( 'wp_attachment_pages_enabled' )` returns a truthy value,
attachment pages work as is.
* Otherwise, attachment pages are redirected to the attachment URL.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57913#comment:46>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list