[wp-trac] [WordPress Trac] #54185: Cannot have `%s` in default string for `get_theme_mod`

WordPress Trac noreply at wordpress.org
Sun Sep 26 02:04:39 UTC 2021


#54185: Cannot have `%s` in default string for `get_theme_mod`
--------------------------+-------------------------------
 Reporter:  jqz           |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Customize     |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  coding-standards
--------------------------+-------------------------------

Comment (by jqz):

 A typical example would be a setting which allows a CSS length value, with
 a default like `100%`.  Previously we could provide `100%%` as the
 `$default` to `get_theme_mod()`, knowing that the function's behaviour was
 consistent.  Now we would need to test the WordPress version to determine
 if this bug is present.  And as stated above, some scenarios can't now be
 catered for at all.

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


More information about the wp-trac mailing list