From 0d898d443ef7d9aa5e7253af7616e50b6fc130a0 Mon Sep 17 00:00:00 2001 From: Mikael Korpela Date: Wed, 30 Oct 2019 23:25:28 +0200 Subject: [PATCH] Blocks: link to Jetpack or wpcom support docs --- extensions/blocks/markdown/index.js | 10 +++++++--- extensions/blocks/simple-payments/index.js | 12 ++++++++---- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/extensions/blocks/markdown/index.js b/extensions/blocks/markdown/index.js index 75fdbfb61926d..a8b0bb7b74957 100644 --- a/extensions/blocks/markdown/index.js +++ b/extensions/blocks/markdown/index.js @@ -9,6 +9,7 @@ import { Fragment } from '@wordpress/element'; * Internal dependencies */ import './editor.scss'; +import { isAtomicSite, isSimpleSite } from '../../shared/site-type-utils'; import edit from './edit'; import save from './save'; @@ -20,6 +21,11 @@ const exampleDescription = __( 'jetpack' ); +const supportLink = + isSimpleSite() || isAtomicSite() + ? 'https://en.support.wordpress.com/markdown-quick-reference/' + : 'https://jetpack.com/support/jetpack-blocks/markdown-block/'; + export const settings = { title: __( 'Markdown', 'jetpack' ), @@ -31,9 +37,7 @@ export const settings = { 'jetpack' ) }

- - { __( 'Support reference', 'jetpack' ) } - + { __( 'Support reference', 'jetpack' ) } ), diff --git a/extensions/blocks/simple-payments/index.js b/extensions/blocks/simple-payments/index.js index 64b475d64bef4..05a5013db9494 100644 --- a/extensions/blocks/simple-payments/index.js +++ b/extensions/blocks/simple-payments/index.js @@ -8,9 +8,10 @@ import { Fragment } from '@wordpress/element'; /** * Internal dependencies */ +import { DEFAULT_CURRENCY } from './constants'; +import { isAtomicSite, isSimpleSite } from '../../shared/site-type-utils'; import edit from './edit'; import save from './save'; -import { DEFAULT_CURRENCY } from './constants'; /** * Example image @@ -24,6 +25,11 @@ import './editor.scss'; export const name = 'simple-payments'; +const supportLink = + isSimpleSite() || isAtomicSite() + ? 'https://support.wordpress.com/simple-payments/' + : 'https://jetpack.com/support/jetpack-blocks/simple-payments-block/'; + export const settings = { title: __( 'Simple Payments button', 'jetpack' ), @@ -35,9 +41,7 @@ export const settings = { 'jetpack' ) }

- - { __( 'Support reference', 'jetpack' ) } - + { __( 'Support reference', 'jetpack' ) } ),