Automattic /
jetpack
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | class WPCOM_JSON_API_GET_Site_V1_2_Endpoint extends WPCOM_JSON_API_GET_Site_Endpoint { |
||
| 3 | |||
| 4 | public static $site_format = array( |
||
| 5 | 'ID' => '(int) Site ID', |
||
| 6 | 'name' => '(string) Title of site', |
||
| 7 | 'description' => '(string) Tagline or description of site', |
||
| 8 | 'URL' => '(string) Full URL to the site', |
||
| 9 | 'capabilities' => '(array) Array of capabilities for the current user on this site.', |
||
| 10 | 'jetpack' => '(bool) Whether the site is a Jetpack site or not', |
||
| 11 | 'is_multisite' => '(bool) Whether the site is a Multisite site or not. Always true for WP.com sites.', |
||
| 12 | 'post_count' => '(int) The number of posts the site has', |
||
| 13 | 'subscribers_count' => '(int) The number of subscribers the site has', |
||
| 14 | 'locale' => '(string) Primary locale code of the site', |
||
| 15 | 'icon' => '(array) An array of icon formats for the site', |
||
| 16 | 'logo' => '(array) The site logo, set in the Customizer', |
||
| 17 | 'visible' => '(bool) If this site is visible in the user\'s site list', |
||
| 18 | 'is_private' => '(bool) If the site is a private site or not', |
||
| 19 | '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.', |
||
| 20 | 'is_vip' => '(bool) If the site is a VIP site or not.', |
||
| 21 | 'is_following' => '(bool) If the current user is subscribed to this site in the reader', |
||
| 22 | '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/', |
||
| 23 | 'plan' => '(array) Details of the current plan for this site.', |
||
| 24 | 'updates' => '(array) An array of available updates for plugins, themes, wordpress, and languages.', |
||
| 25 | 'jetpack_modules' => '(array) A list of active Jetpack modules.', |
||
| 26 | 'meta' => '(object) Meta data', |
||
| 27 | ); |
||
| 28 | |||
| 29 | |||
| 30 | function callback( $path = '', $blog_id = 0 ) { |
||
| 31 | add_filter( 'sites_site_format', array( $this, 'site_format' ) ); |
||
| 32 | |||
| 33 | return parent::callback( $path, $blog_id ); |
||
| 34 | } |
||
| 35 | |||
| 36 | public function site_format( $format ) { |
||
|
0 ignored issues
–
show
|
|||
| 37 | return self::$site_format; |
||
| 38 | } |
||
| 39 | } |
||
| 40 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.