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

WordPress Trac noreply at wordpress.org
Mon Oct 16 20:54:51 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:  add-to-field-guide has-dev-note  |     Focuses:
---------------------------------------------+-----------------------------

Comment (by wpsunshine):

 Replying to [comment:65 azaozz]:
 > Replying to [comment:62 wpsunshine]:
 >
 > > An example is my Sunshine Photo Cart plugin which relies on each image
 having it's own attachment page
 >
 > This change will affect only new sites created with WP 6.4+. Perhaps add
 checking/resetting of the option to your plugin when updating it?

 That was the first thing I did when I saw this ticket :) But not every
 attachment on a website using my plugin needs it's own URL - only the ones
 in my plugin - and setting a global option will is still not helping a
 site like this.

 While I overall agree with the goal of this ticket to reduce the number of
 unnecessary URLs for attachments that definitely don't need one, there are
 many things in the WP ecosystem that do rely on attachment pages. Having a
 filter (which defaults to the option value) to allow/disallow on a ''per-
 attachment basis'' I think would make this an even better way to go about
 implementing this change instead of only a global option.

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


More information about the wp-trac mailing list