Permalink
Browse files

Re-add the deprecated get_/set_favicon()

These shouldn't have been removed without deprecating them. Instead, use
an external service to handle all of that for us, and throw deprecated
errors when people try to use them.
  • Loading branch information...
rmccue committed Oct 29, 2012
1 parent ca0ad5e commit 800aada04b36d76c1f727131f45c21d3b7512b78
Showing with 30 additions and 0 deletions.
  1. +30 −0 library/SimplePie.php
View
@@ -2911,6 +2911,36 @@ public function get_items($start = 0, $end = 0)
}
}
+ /**
+ * Set the favicon handler
+ *
+ * @deprecated Use your own favicon handling instead
+ */
+ public function set_favicon_handler($page = false, $qs = 'i')
+ {
+ $level = defined('E_USER_DEPRECATED') ? E_USER_DEPRECATED : E_USER_WARNING;
+ trigger_error('Favicon handling has been removed, please use your own handling', $level);
+ return false;
+ }
+
+ /**
+ * Get the favicon for the current feed
+ *
+ * @deprecated Use your own favicon handling instead
+ */
+ public function get_favicon()
+ {
+ $level = defined('E_USER_DEPRECATED') ? E_USER_DEPRECATED : E_USER_WARNING;
+ trigger_error('Favicon handling has been removed, please use your own handling', $level);
+
+ if (($url = $this->get_link()) !== null)
+ {
+ return 'http://g.etfv.co/' . urlencode($url);
+ }
+
+ return false;
+ }
+
/**
* Sorting callback for items
*

1 comment on commit 800aada

@AJ

This comment has been minimized.

Show comment
Hide comment
@AJ

AJ Mar 3, 2013

Are there any suggestions for favicon handling? What would you recommend (if you're aware of a simple method to obtain the favicon urls)?

Thanks

AJ commented on 800aada Mar 3, 2013

Are there any suggestions for favicon handling? What would you recommend (if you're aware of a simple method to obtain the favicon urls)?

Thanks

Please sign in to comment.