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 trialJason Moore
Courses Plus Student 10,297 PointsQuestion regarding task 4 out of 5.
Please let me know if I am doing something wrong. It is asking me to use wp_remote_get to get the json_feed_url and assign it to a variable named json_feed. This sounds simple enough, so I am assuming I am making a simple error.
<?php
function my_plugin_get_profile($my_plugin_username){
$json_feed_url = 'http://myapi.net/' . $my_plugin_username . '.json';
$args = array('timeout' => 120);
$json_feed = $wp_remote_get( $json_feed_url, $args );
}
?>
Hopefully I used Markdown properly, if not please see the php code and let me know if the $json_feed variable is correct. Thanks.
2 Answers
Richard Duncan
5,568 PointsDrop the $ from the front of your function call.
Jason Moore
Courses Plus Student 10,297 PointsDuh...I knew it something dumb! Thanks.
Richard Duncan
5,568 PointsNo problem! been there myself.