diff options
Diffstat (limited to 'plugins/jetpack/sal/class.json-api-site-jetpack.php')
-rw-r--r-- | plugins/jetpack/sal/class.json-api-site-jetpack.php | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/plugins/jetpack/sal/class.json-api-site-jetpack.php b/plugins/jetpack/sal/class.json-api-site-jetpack.php index 0efcb3aa..b0a954ce 100644 --- a/plugins/jetpack/sal/class.json-api-site-jetpack.php +++ b/plugins/jetpack/sal/class.json-api-site-jetpack.php @@ -1,5 +1,7 @@ <?php +use Automattic\Jetpack\Sync\Functions; + require_once dirname( __FILE__ ) . '/class.json-api-site-jetpack-base.php'; require_once dirname( __FILE__ ) . '/class.json-api-post-jetpack.php'; @@ -51,11 +53,11 @@ class Jetpack_Site extends Abstract_Jetpack_Site { } protected function is_version_controlled() { - return Jetpack_Sync_Functions::is_version_controlled(); + return Functions::is_version_controlled(); } protected function file_system_write_access() { - return Jetpack_Sync_Functions::file_system_write_access(); + return Functions::file_system_write_access(); } protected function current_theme_supports( $feature_name ) { @@ -92,6 +94,11 @@ class Jetpack_Site extends Abstract_Jetpack_Site { 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; } @@ -119,7 +126,7 @@ class Jetpack_Site extends Abstract_Jetpack_Site { function allowed_file_types() { $allowed_file_types = array(); - // http://codex.wordpress.org/Uploading_Files + // https://codex.wordpress.org/Uploading_Files $mime_types = get_allowed_mime_types(); foreach ( $mime_types as $type => $mime_type ) { $extras = explode( '|', $type ); @@ -186,6 +193,32 @@ class Jetpack_Site extends Abstract_Jetpack_Site { } /** + * 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 */ |