[wp-trac] [WordPress Trac] #54797: Allow languages path in register_block_type

WordPress Trac noreply at wordpress.org
Fri Feb 11 10:50:58 UTC 2022


#54797: Allow languages path in register_block_type
--------------------------------------+-----------------------
 Reporter:  Rahe                      |       Owner:  gziolo
     Type:  defect (bug)              |      Status:  assigned
 Priority:  normal                    |   Milestone:  6.0
Component:  I18N                      |     Version:  5.9
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-----------------------

Comment (by gziolo):

 I considered `ltrim('./', $path);` as a first option, but the way it works
 is a bit confusing. It removes all matching characters from the beginning
 of the string rather than the exact match we want here `./`. Example:
 `./../file.js` becomes `file.js`when you run the following code:

 {{{#!php
 <?php
 echo ltrim( './../file.js', './');
 }}}

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


More information about the wp-trac mailing list