WPCOM_JSON_API_GET_Site_V1_2_Endpoint

The WordPress Core WPCOM JSON API GET Site V1 2 Endpoint class.

Defined (1)

The class is defined in the following location(s).

/json-endpoints/class.wpcom-json-api-get-site-v1-2-endpoint.php  
  1. class WPCOM_JSON_API_GET_Site_V1_2_Endpoint extends WPCOM_JSON_API_GET_Site_Endpoint { 
  2.  
  3. public static $site_format = array( 
  4. 'ID' => '(int) Site ID',  
  5. 'name' => '(string) Title of site',  
  6. 'description' => '(string) Tagline or description of site',  
  7. 'URL' => '(string) Full URL to the site',  
  8. 'capabilities' => '(array) Array of capabilities for the current user on this site.',  
  9. 'jetpack' => '(bool) Whether the site is a Jetpack site or not',  
  10. 'is_multisite' => '(bool) Whether the site is a Multisite site or not. Always true for WP.com sites.',  
  11. 'post_count' => '(int) The number of posts the site has',  
  12. 'subscribers_count' => '(int) The number of subscribers the site has',  
  13. 'locale' => '(string) Primary locale code of the site',  
  14. 'icon' => '(array) An array of icon formats for the site',  
  15. 'logo' => '(array) The site logo, set in the Customizer',  
  16. 'visible' => '(bool) If this site is visible in the user\'s site list',  
  17. 'is_private' => '(bool) If the site is a private site or not',  
  18. 'single_user_site' => '(bool) Whether the site is single user. Only returned for WP.com sites and for Jetpack sites with version 3.4 or higher.',  
  19. 'is_vip' => '(bool) If the site is a VIP site or not.',  
  20. 'is_following' => '(bool) If the current user is subscribed to this site in the reader',  
  21. 'options' => '(array) An array of options/settings for the blog. Only viewable by users with post editing rights to the site. Note: Post formats is deprecated, please see /sites/$id/post-formats/',  
  22. 'plan' => '(array) Details of the current plan for this site.',  
  23. 'updates' => '(array) An array of available updates for plugins, themes, wordpress, and languages.',  
  24. 'jetpack_modules' => '(array) A list of active Jetpack modules.',  
  25. 'meta' => '(object) Meta data',  
  26. ); 
  27.  
  28.  
  29. function callback( $path = '', $blog_id = 0 ) { 
  30. add_filter( 'sites_site_format', array( $this, 'site_format' ) ); 
  31.  
  32. return parent::callback( $path, $blog_id ); 
  33.  
  34. public function site_format( $format ) { 
  35. return self::$site_format;