-
-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃挕 Disable attachment pages for new ClassicPress installations. #1434
Comments
There is already a "hidden" option to disable attachment pages completely, although it is not listed in the Admin. Run this code once from your functions.php: Or go to Once disabled all attachments will be shown in the browser using To implement this for everyone, adding a simple checkbox in |
Yes, I'm aware of all that. The point of opening this ticket is as a reminder to make things user-friendly. PR #1436 does the bulk of the work.
PR #1437 achieves that. |
If this hidden option exists (which I didn't know about - I'm going to turn off attachments right away), why not make it visible on the media option page with a toggle? |
In any case, I would like to point out that https://make.wordpress.org/core/2023/10/16/changes-to-attachment-pages/ |
Thank you, that is backported in #1436 that's not already merged. |
Context
I always disable attachment pages (using Greg Schoppe's code at https://gschoppe.com/wordpress/disable-attachment-pages/).
WordPress has now caught on. See https://core.trac.wordpress.org/ticket/57913 But they messed up the implementation, so there are several changesets to get it done properly:
https://core.trac.wordpress.org/changeset/56657
https://core.trac.wordpress.org/changeset/56658
https://core.trac.wordpress.org/changeset/56711
https://core.trac.wordpress.org/changeset/57357
https://core.trac.wordpress.org/changeset/57358
Possible implementation
Presumably this can be done by using the above changesets.
Will you be able to help with the implementation?
I don't know how to implement multiple changesets. But I can help test the solution.
Unlike WP, I'd also like to see us add a toggle or checkbox somewhere, so that a site administrator can easily disable attachment pages on old sites and enable such pages on new sites. But I think that belongs in a separate PR.
The text was updated successfully, but these errors were encountered: