Jetpack_Site

The WordPress Core Jetpack Site class.

Defined (1)

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

/sal/class.json-api-site-jetpack.php  
  1. class Jetpack_Site extends Abstract_Jetpack_Site { 
  2.  
  3. protected function get_constant( $name ) { 
  4. if ( defined( $name) ) { 
  5. return constant( $name ); 
  6. return null; 
  7.  
  8. protected function main_network_site() { 
  9. return network_site_url(); 
  10.  
  11. protected function wp_version() { 
  12. global $wp_version; 
  13. return $wp_version; 
  14.  
  15. protected function max_upload_size() { 
  16. return wp_max_upload_size(); 
  17.  
  18. protected function is_main_network() { 
  19. return Jetpack::is_multi_network(); 
  20.  
  21. protected function is_multi_site() { 
  22. return is_multisite(); 
  23.  
  24. protected function is_version_controlled() { 
  25. return Jetpack_Sync_Functions::is_version_controlled(); 
  26.  
  27. protected function file_system_write_access() { 
  28. return Jetpack_Sync_Functions::file_system_write_access(); 
  29.  
  30. protected function current_theme_supports( $feature_name ) { 
  31. return current_theme_supports( $feature_name ); 
  32.  
  33. protected function get_theme_support( $feature_name ) { 
  34. return get_theme_support( $feature_name ); 
  35.  
  36. protected function get_updates() { 
  37. return (array) Jetpack::get_updates(); 
  38.  
  39. function get_id() { 
  40. return $this->platform->token->blog_id; 
  41.  
  42. function has_videopress() { 
  43. // TODO - this only works on wporg site - need to detect videopress option for remote Jetpack site on WPCOM 
  44. $videopress = Jetpack_Options::get_option( 'videopress', array() ); 
  45. if ( isset( $videopress['blog_id'] ) && $videopress['blog_id'] > 0 ) { 
  46. return true; 
  47.  
  48. return false; 
  49.  
  50. function upgraded_filetypes_enabled() { 
  51. return true; 
  52.  
  53. function is_mapped_domain() { 
  54. return true; 
  55.  
  56. function is_redirect() { 
  57. return false; 
  58.  
  59. function is_following() { 
  60. return false; 
  61.  
  62. function has_wordads() { 
  63. // TODO: any way to detect wordads on the site, or does it need to be modified on the way through? 
  64. return false; 
  65.  
  66. function get_frame_nonce() { 
  67. return false; 
  68.  
  69. function allowed_file_types() { 
  70. $allowed_file_types = array(); 
  71.  
  72. // http://codex.wordpress.org/Uploading_Files 
  73. $mime_types = get_allowed_mime_types(); 
  74. foreach ( $mime_types as $type => $mime_type ) { 
  75. $extras = explode( '|', $type ); 
  76. foreach ( $extras as $extra ) { 
  77. $allowed_file_types[] = $extra; 
  78.  
  79. return $allowed_file_types; 
  80.  
  81. function is_private() { 
  82. return false; 
  83.  
  84. function get_plan() { 
  85. return false; 
  86.  
  87. function get_subscribers_count() { 
  88. return 0; // special magic fills this in on the WPCOM side 
  89.  
  90. function get_capabilities() { 
  91. return false; 
  92.  
  93. function get_locale() { 
  94. return get_bloginfo( 'language' ); 
  95.  
  96. function is_jetpack() { 
  97. return true; 
  98.  
  99. protected function get_jetpack_version() { 
  100. return JETPACK__VERSION; 
  101.  
  102. function get_ak_vp_bundle_enabled() {} 
  103.  
  104. function get_jetpack_seo_front_page_description() { 
  105. return Jetpack_SEO_Utils::get_front_page_meta_description(); 
  106.  
  107. function get_jetpack_seo_title_formats() { 
  108. return Jetpack_SEO_Titles::get_custom_title_formats(); 
  109.  
  110. function get_verification_services_codes() { 
  111. return get_option( 'verification_services_codes', null ); 
  112.  
  113. /** 
  114. * Post functions 
  115. */ 
  116.  
  117. function wrap_post( $post, $context ) { 
  118. return new Jetpack_Post( $this, $post, $context ); 
  119.