public function ShareaholicShareCount::is_url_encoded in Share Buttons, Related Posts, Content Analytics - Shareaholic 8
Same name and namespace in other branches
- 7.3 lib/social-share-counts/share_count.php \ShareaholicShareCount::is_url_encoded()
Check if the url is encoded
The check is very simple and will fail if the url is encoded more than once because the check only decodes once
Parameters
string $url the url to check if it is encoded:
Return value
boolean true if the url is encoded and false otherwise
1 call to ShareaholicShareCount::is_url_encoded()
- ShareaholicShareCount::__construct in lib/
social-share-counts/ share_count.php
File
- lib/
social-share-counts/ share_count.php, line 102
Class
- ShareaholicShareCount
- An abstract class Share Counts to be extended
Code
public function is_url_encoded($url) {
$decoded = urldecode($url);
if (strcmp($url, $decoded) === 0) {
return false;
}
return true;
}