![]() |
I have a twitter widget that uses class-snoopy.php which is now deprecated and I receive this message:
Notice: class-snoopy.php is deprecated since version 3.0! Use wp-includes/http.php instead.So, I have updated the include to include http.php instead but I then get the error of: Fatal error: Class 'Snoopy' not found in /home/path/to/backend/widgets/twitter.php on line 28So, here is the area of code affected: Line 28: Obviously I'm using snoopy to fetch the tweets but since it is now changed to use http.php, I need to update this, but what to? Solution - 1since class Snoopy is deprecated and you should use WP Http, you won't be able to do a 'new Snoopy' without including the snoopy class. You need to do a "new WP_Http"... Here is a good blog post about using the WP Http API - [[LINK href="http://planetozh.com/blog/2009/08/how-to-make-http-requests-with-wordpress/"]]http://planetozh.com/blog/2009/08/how-to-make-http-requests-with-wordpress/[[/LINK]] Solution - 2Hi, WordPress 3.x update: you now need to explicitly include the class if you intend to use it, that is start by adding the following lines: Please follow 2 steps: Step1: if you don't include,please add code Step2: Change this code: To code: If this solutions is not ok . Please send email to me: [email protected] Cheers. |
Wordpress |
Type: | Code Example |
Category: | Coding |
Sub Category: | Code Example |
Uploaded by: | Admin |
Views: | 7 |