jchristopher / attachments

[WordPress Plugin] Attachments allows you to simply append any number of items from your WordPress Media Library to Posts, Pages, and Custom Post Types
wordpress.org/extend/plugins/attachments/
GNU General Public License v2.0
241 stars 78 forks source link

title default doesn't work: field html uses language strings instead of pure strings #186

Open wdfee opened 5 years ago

wdfee commented 5 years ago

Hi, when adding a file, the predefined title is not adapted to the generated field html, if the site language is not English. The cause is in the html( $default ) function of echt field type. The $field->default is passed with the localization function ecs_attr_e(), so the data-default value turns into "Titel" in German, for example. This doesn't work. Solution is to just change all esc_attr_e() calls inside the html() function into echo esc_attr() in each /classes/fields/class.field.{type}.php