platform->token->blog_id; } function has_videopress() { // TODO - this only works on wporg site - need to detect videopress option for remote Jetpack site on WPCOM $videopress = Jetpack_Options::get_option( 'videopress', array() ); if ( isset( $videopress['blog_id'] ) && $videopress['blog_id'] > 0 ) { return true; } return false; } function upgraded_filetypes_enabled() { return true; } function is_mapped_domain() { return true; } function get_unmapped_url() { // Fallback to the home URL since all Jetpack sites don't have an unmapped *.wordpress.com domain. return $this->get_url(); } function is_redirect() { return false; } function is_following() { return false; } function has_wordads() { return Jetpack::is_module_active( 'wordads' ); } function get_frame_nonce() { return false; } function get_jetpack_frame_nonce() { return false; } function is_headstart_fresh() { return false; } function allowed_file_types() { $allowed_file_types = array(); // https://codex.wordpress.org/Uploading_Files $mime_types = get_allowed_mime_types(); foreach ( $mime_types as $type => $mime_type ) { $extras = explode( '|', $type ); foreach ( $extras as $extra ) { $allowed_file_types[] = $extra; } } return $allowed_file_types; } function is_private() { return false; } function get_plan() { return false; } function get_subscribers_count() { return 0; // special magic fills this in on the WPCOM side } function get_capabilities() { return false; } function get_locale() { return get_bloginfo( 'language' ); } function is_jetpack() { return true; } public function get_jetpack_version() { return JETPACK__VERSION; } function get_ak_vp_bundle_enabled() {} function get_jetpack_seo_front_page_description() { return Jetpack_SEO_Utils::get_front_page_meta_description(); } function get_jetpack_seo_title_formats() { return Jetpack_SEO_Titles::get_custom_title_formats(); } function get_verification_services_codes() { return get_option( 'verification_services_codes', null ); } function get_podcasting_archive() { return null; } function is_connected_site() { return true; } function current_user_can( $role ) { return current_user_can( $role ); } /** * Check if full site editing should be considered as currently active. Full site editing * requires the FSE plugin to be installed and activated, as well the current * theme to be FSE compatible. The plugin can also be explicitly disabled via the * a8c_disable_full_site_editing filter. * * @since 7.7.0 * * @return bool true if full site editing is currently active. */ function is_fse_active() { if ( ! Jetpack::is_plugin_active( 'full-site-editing/full-site-editing-plugin.php' ) ) { return false; } return function_exists( '\A8C\FSE\is_full_site_editing_active' ) && \A8C\FSE\is_full_site_editing_active(); } /** * Return the last engine used for an import on the site. * * This option is not used in Jetpack. */ function get_import_engine() { return null; } /** * Post functions */ function wrap_post( $post, $context ) { return new Jetpack_Post( $this, $post, $context ); } }