#34387 closed enhancement (wontfix)
New function: `the_theme_mod()`
| Reported by: | sebastian.pisula | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Themes | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
For example:
<img src="<?php the_theme_mod( 'logo' ); ?>" alt=""/>
OR
<div><?php the_theme_mod( 'copyright_text' ); ?></div>
Attachments (1)
Change History (6)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
You should always escape your output, which is not possible with a generic
the_theme_modfunction.I suggest using something like
echo esc_url( get_theme_mod( 'logo' ) )andecho esc_html( get_theme_mod( 'copyright_text' ) )instead.