[wp-trac] [WordPress Trac] #23012: Refresh the code for the default widgets

WordPress Trac noreply at wordpress.org
Thu Aug 20 19:15:06 UTC 2015


#23012: Refresh the code for the default widgets
--------------------------------------+------------------------
 Reporter:  Viper007Bond              |       Owner:  chriscct7
     Type:  enhancement               |      Status:  accepted
 Priority:  normal                    |   Milestone:  4.4
Component:  Widgets                   |     Version:  3.5
 Severity:  normal                    |  Resolution:
 Keywords:  dev-feedback needs-patch  |     Focuses:
--------------------------------------+------------------------
Description changed by westonruter:

Old description:

> The default widgets serve as examples for many people to make new
> widgets. We should make sure they're up to date in terms of coding
> standards and best practices. There's many places where this is not the
> case.
>
> A few examples:
>
> * `$instance['text'] = stripslashes( wp_filter_post_kses(
> addslashes($new_instance['text']) ) );`
> * `$text = esc_textarea($instance['text']);` rather than at output
>
> Also tons and tons of formatting issues.
>
> I'll volunteer to take this on.

New description:

 The default widgets serve as examples for many people to make new widgets.
 We should make sure they're up to date in terms of coding standards and
 best practices. There's many places where this is not the case.

 A few examples:

 * `$instance['text'] = stripslashes( wp_filter_post_kses(
 addslashes($new_instance['text']) ) );`
 * `$text = esc_textarea($instance['text']);` rather than at output
 (implement late-escaping of echo'ed variables)

 Also tons and tons of formatting issues.

 I'll volunteer to take this on.

--

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


More information about the wp-trac mailing list