mirror of
https://github.com/elementor/hello-theme.git
synced 2025-10-03 15:33:37 +08:00
Internal: Add Send PLG [TMZ-629] (#490)
This commit is contained in:
parent
b8112b9cd0
commit
ba47bc1988
3 changed files with 23 additions and 4 deletions
BIN
dev/images/send-logo.gif
Normal file
BIN
dev/images/send-logo.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 561 KiB |
|
@ -21,13 +21,16 @@ export const PromotionLink = (
|
||||||
horizontalLayout = false,
|
horizontalLayout = false,
|
||||||
upgrade = false,
|
upgrade = false,
|
||||||
backgroundImage = false,
|
backgroundImage = false,
|
||||||
|
backgroundColor = false,
|
||||||
|
buttonBgColor = false,
|
||||||
} ) => {
|
} ) => {
|
||||||
|
const backgroundFallback = backgroundImage ? 'transparent' : null;
|
||||||
const paperSx = horizontalLayout
|
const paperSx = horizontalLayout
|
||||||
? { display: 'flex', alignItems: 'center', justifyContent: 'space-between', p: 3, gap: 4, maxWidth: 600 }
|
? { display: 'flex', alignItems: 'center', justifyContent: 'space-between', p: 3, gap: 4, maxWidth: 600 }
|
||||||
: { p: 3 };
|
: { p: 3 };
|
||||||
paperSx.backgroundImage = backgroundImage ? `url(${ backgroundImage })` : null;
|
paperSx.backgroundImage = backgroundImage ? `url(${ backgroundImage })` : null;
|
||||||
paperSx.backgroundColor = backgroundImage ? 'transparent' : null;
|
paperSx.backgroundColor = backgroundColor ? backgroundColor : backgroundFallback;
|
||||||
paperSx.color = backgroundImage ? 'rgb(12, 13, 14)' : null;
|
paperSx.color = ( backgroundImage || backgroundColor ) ? 'rgb(12, 13, 14)' : null;
|
||||||
|
|
||||||
const stackSx = horizontalLayout
|
const stackSx = horizontalLayout
|
||||||
? { flex: 0.6, alignItems: 'center', justifyContent: 'center' }
|
? { flex: 0.6, alignItems: 'center', justifyContent: 'center' }
|
||||||
|
@ -47,7 +50,7 @@ export const PromotionLink = (
|
||||||
{ messages.map( ( message, i ) => {
|
{ messages.map( ( message, i ) => {
|
||||||
return <Typography key={ i } sx={ { mt: 0.6 } } align="center" variant="body2">{ message }</Typography>;
|
return <Typography key={ i } sx={ { mt: 0.6 } } align="center" variant="body2">{ message }</Typography>;
|
||||||
} ) }
|
} ) }
|
||||||
<Button startIcon={ startIcon } sx={ { mt: 2 } } color="promotion" variant="contained" href={ url } target={ target } rel="noreferrer">{ button }</Button>
|
<Button startIcon={ startIcon } sx={ { mt: 2, backgroundColor: buttonBgColor } } color="promotion" variant="contained" href={ url } target={ target } rel="noreferrer">{ button }</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
{ features && (
|
{ features && (
|
||||||
|
|
|
@ -37,7 +37,23 @@ class Promotions extends Rest_Base {
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if ( ! defined( 'SEND_VERSION' ) ) {
|
||||||
|
$action_links_data[] = [
|
||||||
|
'type' => 'go-send',
|
||||||
|
'image' => HELLO_THEME_IMAGES_URL . 'send-logo.gif',
|
||||||
|
'backgroundColor' => '#EFEFFF',
|
||||||
|
'url' => 'https://go.elementor.com/Hello_send',
|
||||||
|
'alt' => __( 'Send', 'hello-elementor' ),
|
||||||
|
'title' => '',
|
||||||
|
'messages' => [
|
||||||
|
__( 'Connect any website to automated Email & SMS workflows in a click with Send.', 'hello-elementor' ),
|
||||||
|
],
|
||||||
|
'button' => __( 'Install', 'hello-elementor' ),
|
||||||
|
'buttonBgColor' => '#524CFF',
|
||||||
|
'width' => 72,
|
||||||
|
'height' => 'auto',
|
||||||
|
];
|
||||||
|
} elseif (
|
||||||
! defined( 'ELEMENTOR_AI_VERSION' ) &&
|
! defined( 'ELEMENTOR_AI_VERSION' ) &&
|
||||||
Utils::is_elementor_installed()
|
Utils::is_elementor_installed()
|
||||||
) {
|
) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue