[wp-trac] [WordPress Trac] #49484: Add option 'OR' to wp_sprintf()

WordPress Trac noreply at wordpress.org
Thu Feb 20 16:59:16 UTC 2020


#49484: Add option 'OR' to wp_sprintf()
-----------------------------+-----------------------------
 Reporter:  pedromendonca    |      Owner:  (none)
     Type:  feature request  |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  I18N             |    Version:
 Severity:  normal           |   Keywords:
  Focuses:                   |
-----------------------------+-----------------------------
 The result of a this function is filtered by wp_sprintf_l() with ' and '
 type delimiters.

 Would it be awesome to include a third optional argument, a delimiter type
 ' or ', keeping the default ' and ' for backward compatibility.


 Current use:
 {{{wp_sprintf( '%s: %l', __( 'Some cool numbers' ), array( 1, 5, 10, 15 )
 );}}}

 Output:
 ''Some cool numbers: 1, 5, 10, and 15''


 Example of use:
 {{{wp_sprintf( '%s: %l', __( 'Some cool numbers' ), array( 1, 5, 10, 15 ),
 'OR' );}}}

 Optional output:
 ''Some cool numbers: 1, 5, 10, **or** 15''

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49484>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list