Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialLucien HAMM
20,120 PointsCode challenge step 4 [Wordpress Plugins - Widgets]
Hello, I have a problem with the challenge after the video "How to create WordPress Widgets".
I always type this in the function widget() :
extract( $args );
$title = apply_filters( "widget_title", $instance["title"] );
And I always have the message :
The first thing inside the widget method, use the extract function to make $args into local variables.
How can I do ? Thanks.
2 Answers
Mikhail Semenov
1,055 PointsI am not sure but I think you're not creating a local version of a $args variable
Lucien HAMM
20,120 PointsI tried to assign a variable like
$args = extract($args);
`
But it doesn't work either.