summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/sal/class.json-api-post-jetpack.php')
-rw-r--r--plugins/jetpack/sal/class.json-api-post-jetpack.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/plugins/jetpack/sal/class.json-api-post-jetpack.php b/plugins/jetpack/sal/class.json-api-post-jetpack.php
new file mode 100644
index 00000000..f6803132
--- /dev/null
+++ b/plugins/jetpack/sal/class.json-api-post-jetpack.php
@@ -0,0 +1,34 @@
+<?php
+class Jetpack_Post extends SAL_Post {
+ public function get_like_count() {
+ return 0;
+ }
+
+ public function is_liked() {
+ return false;
+ }
+
+ public function is_reblogged() {
+ return false;
+ }
+
+ public function is_following() {
+ return false;
+ }
+
+ public function get_global_id() {
+ return '';
+ }
+
+ public function get_geo() {
+ return false;
+ }
+
+ protected function get_avatar_url( $email, $avatar_size = 96 ) {
+ $avatar_url = get_avatar_url( $email, array( 'size' => $avatar_size ) );
+ if ( !$avatar_url || is_wp_error( $avatar_url ) ) {
+ return '';
+ }
+ return $avatar_url;
+ }
+}