You’re writing a pretty big list for something that could be pretty easy replaced by a short one-liner:
extract( array_map( 'esc_attr', $instance ), EXTR_SKIP );. This way you run
esc_attr()on every item of the array and afterwards extract every
$instance-item into it’s own variable exactly named like the ones in your array. Double values will be skipped using
EXTR_SKIP, but you can take a look at the alternatives on php.net.
- The topic ‘[Plugin: Quick Post Widget] `form` function could be much easier’ is closed to new replies.