PHP Class SAL_Site, jetpack

Show file Open project: automattic/jetpack

Public Properties

Property Type Description
$blog_id
$platform

Public Methods

Method Description
__construct ( $blog_id, $platform )
after_render ( &$response )
after_render_options ( &$options ) TODO - factor this out? Seems an odd thing to have on a site
allowed_file_types ( )
before_render ( )
default_ping_status ( )
featured_images_enabled ( )
get_admin_url ( )
get_ak_vp_bundle_enabled ( )
get_background_color ( )
get_capabilities ( )
get_default_category ( )
get_default_comment_status ( )
get_default_likes_enabled ( )
get_default_post_format ( )
get_default_sharing_status ( )
get_description ( )
get_frame_nonce ( )
get_gmt_offset ( )
get_header_image ( )
get_id ( )
get_image_default_link_type ( )
get_image_large_height ( )
get_image_large_width ( )
get_image_medium_height ( )
get_image_medium_width ( )
get_image_thumbnail_crop ( )
get_image_thumbnail_height ( )
get_image_thumbnail_width ( )
get_jetpack_modules ( )
get_jetpack_seo_front_page_description ( )
get_jetpack_seo_title_formats ( )
get_locale ( )
get_login_url ( )
get_logo ( )
get_name ( )
get_page_for_posts ( )
get_page_on_front ( )
get_permalink_structure ( )
get_plan ( )
get_post_by_id ( $post_id, $context )
get_post_by_name ( string $name, string $context ) : object Get post by name
get_post_count ( )
get_post_formats ( )
get_post_id_by_name ( string $name ) : integer | object Get post ID by name
get_registered_date ( )
get_show_on_front ( )
get_subscribers_count ( )
get_theme_slug ( )
get_timezone ( )
get_unmapped_url ( )
get_url ( )
get_verification_services_codes ( )
get_wordpress_version ( )
get_xmlrpc_url ( )
has_videopress ( )
has_wordads ( )
is_custom_front_page ( )
is_following ( )
is_headstart ( )
is_jetpack ( )
is_mapped_domain ( )
is_multisite ( )
is_private ( )
is_publicize_permanently_disabled ( )
is_redirect ( )
is_single_user_site ( )
is_vip ( )
is_visible ( )
upgraded_filetypes_enabled ( )
user_can_manage ( )
wrap_post ( $post, $context ) wrap a WP_Post object with SAL methods

Private Methods

Method Description
_get_whitelisted_post_types ( ) : array Gets the whitelisted post types that JP should allow access to.
is_post_type_allowed ( $post_type ) copied from class.json-api-endpoints.php
user_can_view_post ( $post ) copied and modified a little from class.json-api-endpoints.php
validate_access ( $post ) : WP_Error Validate current user can access the post

Method Details

__construct() public method

public __construct ( $blog_id, $platform )

after_render() abstract public method

abstract public after_render ( &$response )

after_render_options() abstract public method

TODO - factor this out? Seems an odd thing to have on a site
abstract public after_render_options ( &$options )

allowed_file_types() abstract public method

abstract public allowed_file_types ( )

before_render() abstract public method

abstract public before_render ( )

default_ping_status() public method

public default_ping_status ( )

get_admin_url() public method

public get_admin_url ( )

get_ak_vp_bundle_enabled() abstract public method

abstract public get_ak_vp_bundle_enabled ( )

get_background_color() public method

get_capabilities() public method

public get_capabilities ( )

get_default_category() public method

get_default_comment_status() public method

get_default_likes_enabled() public method

get_default_post_format() public method

get_default_sharing_status() public method

get_description() public method

public get_description ( )

get_frame_nonce() abstract public method

abstract public get_frame_nonce ( )

get_gmt_offset() public method

public get_gmt_offset ( )

get_header_image() public method

public get_header_image ( )

get_id() public method

public get_id ( )

get_image_large_height() public method

get_image_large_width() public method

get_image_medium_height() public method

get_image_medium_width() public method

get_image_thumbnail_crop() public method

get_image_thumbnail_height() public method

get_image_thumbnail_width() public method

get_jetpack_modules() abstract public method

abstract public get_jetpack_modules ( )

get_jetpack_seo_front_page_description() abstract public method

get_jetpack_seo_title_formats() abstract public method

abstract public get_jetpack_seo_title_formats ( )

get_locale() abstract public method

abstract public get_locale ( )

get_login_url() public method

public get_login_url ( )

get_name() public method

public get_name ( )

get_page_for_posts() public method

public get_page_for_posts ( )

get_page_on_front() public method

public get_page_on_front ( )

get_plan() abstract public method

abstract public get_plan ( )

get_post_by_id() public method

public get_post_by_id ( $post_id, $context )

get_post_by_name() public method

Attempts to match name on post title and page path
public get_post_by_name ( string $name, string $context ) : object
$name string
$context string (display or edit)
return object Post object on success, WP_Error object on failure

get_post_count() public method

public get_post_count ( )

get_post_formats() abstract public method

abstract public get_post_formats ( )

get_post_id_by_name() public method

Attempts to match name on post title and page path
public get_post_id_by_name ( string $name ) : integer | object
$name string
return integer | object Post ID on success, WP_Error object on failure

get_registered_date() public method

public get_registered_date ( )

get_show_on_front() public method

public get_show_on_front ( )

get_subscribers_count() abstract public method

abstract public get_subscribers_count ( )

get_theme_slug() public method

public get_theme_slug ( )

get_timezone() public method

public get_timezone ( )

get_unmapped_url() public method

public get_unmapped_url ( )

get_url() public method

public get_url ( )

get_verification_services_codes() abstract public method

abstract public get_verification_services_codes ( )

get_wordpress_version() public method

get_xmlrpc_url() public method

public get_xmlrpc_url ( )

has_videopress() abstract public method

abstract public has_videopress ( )

has_wordads() abstract public method

abstract public has_wordads ( )

is_custom_front_page() public method

is_following() abstract public method

abstract public is_following ( )

is_headstart() public method

public is_headstart ( )

is_jetpack() abstract public method

abstract public is_jetpack ( )

is_mapped_domain() abstract public method

abstract public is_mapped_domain ( )

is_multisite() abstract public method

abstract public is_multisite ( )

is_private() abstract public method

abstract public is_private ( )

is_publicize_permanently_disabled() public method

is_redirect() abstract public method

abstract public is_redirect ( )

is_single_user_site() abstract public method

abstract public is_single_user_site ( )

is_vip() abstract public method

abstract public is_vip ( )

is_visible() public method

public is_visible ( )

upgraded_filetypes_enabled() abstract public method

abstract public upgraded_filetypes_enabled ( )

user_can_manage() public method

public user_can_manage ( )

wrap_post() abstract public method

wrap a WP_Post object with SAL methods
abstract public wrap_post ( $post, $context )

Property Details

$blog_id public property

public $blog_id

$platform public property

public $platform