[wp-trac] [WordPress Trac] #47466: Add a comment to .htaccess markers, labelling inserted strings as read-only/ dynamic

WordPress Trac noreply at wordpress.org
Fri Jun 7 16:19:33 UTC 2019


#47466: Add a comment to .htaccess markers, labelling inserted strings as read-
only/ dynamic
----------------------------------------+---------------------
 Reporter:  bradleyt                    |       Owner:  (none)
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  5.3
Component:  Rewrite Rules               |     Version:
 Severity:  minor                       |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:  docs
----------------------------------------+---------------------
Changes (by bradleyt):

 * keywords:  needs-patch => has-patch needs-unit-tests


Comment:

 In `47466.diff` is an initial implementation of this feature. A few notes:

  - I could not find any tests relating to `insert_with_markers` - I assume
 some will need writing before this is merged, but I'm unclear in what file
 these should go in within the tests directory
  - I've introduced a filter `insert_with_markers_inline_instructions`,
 which will allow for any plugins using `insert_with_markers` to provide
 marker-specific instructions. This will also allow hosting companies to
 modify the WordPress text to match any environment-specific restrictions
 or help they want to provide
  - Given that the .htaccess file directives are server-side and specified
 in English I've intentionally not passed these instructions through `__()`
  - `$instructions_markers` is prepended to `$insertion` so that the
 `$existing_lines === $insertion` logic evaluates to true (therefore
 meaning that changes to the instructions are reflected in the .htaccess
 file next time the rewrite_rules are flushed)

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


More information about the wp-trac mailing list