Title: [B2Template]Deprecated function attribute_escape/widget file
Last modified: August 20, 2016

---

# [B2Template]Deprecated function attribute_escape/widget file

 *  [Juliette Reinders Folmer](https://wordpress.org/support/users/jrf/)
 * (@jrf)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/b2templatedeprecated-function-attribute_escapewidget-file/)
 * Like my previous remark, some things I found. This time in the Widget file:
 * In function form() you use/advise the use of attribute_escape(). This function
   has been deprecated. One should now use esc_attr().
    On that note, you may also
   want to add esc_html() around the echo-ed non-html, non-attribute text elements
   both in the form() and the widget() functions. For those which also need translation,
   you could use esc_html__(). See the [Data validation page](http://codex.wordpress.org/Data_Validation)
   for more info.
 * In the function update(), you are missing the advised first line:
    `$instance
   = $old_instance;`
 * Hope this helps & keep up the good work!
 * [http://wordpress.org/extend/plugins/brolly-wordpress-plugin-template/](http://wordpress.org/extend/plugins/brolly-wordpress-plugin-template/)

The topic ‘[B2Template]Deprecated function attribute_escape/widget file’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/brolly-wordpress-plugin-template.
   svg)
 * [B2Template](https://wordpress.org/plugins/brolly-wordpress-plugin-template/)
 * [Support Threads](https://wordpress.org/support/plugin/brolly-wordpress-plugin-template/)
 * [Active Topics](https://wordpress.org/support/plugin/brolly-wordpress-plugin-template/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/brolly-wordpress-plugin-template/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/brolly-wordpress-plugin-template/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Juliette Reinders Folmer](https://wordpress.org/support/users/jrf/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/b2templatedeprecated-function-attribute_escapewidget-file/)
 * Status: not resolved