Internal: Add Send PLG [TMZ-629] (#490)

This commit is contained in:
Nurit Shahar 2025-05-29 15:31:44 +03:00 committed by GitHub
parent b8112b9cd0
commit ba47bc1988
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 23 additions and 4 deletions

BIN
dev/images/send-logo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 561 KiB

View file

@ -21,13 +21,16 @@ export const PromotionLink = (
horizontalLayout = false,
upgrade = false,
backgroundImage = false,
backgroundColor = false,
buttonBgColor = false,
} ) => {
const backgroundFallback = backgroundImage ? 'transparent' : null;
const paperSx = horizontalLayout
? { display: 'flex', alignItems: 'center', justifyContent: 'space-between', p: 3, gap: 4, maxWidth: 600 }
: { p: 3 };
paperSx.backgroundImage = backgroundImage ? `url(${ backgroundImage })` : null;
paperSx.backgroundColor = backgroundImage ? 'transparent' : null;
paperSx.color = backgroundImage ? 'rgb(12, 13, 14)' : null;
paperSx.backgroundColor = backgroundColor ? backgroundColor : backgroundFallback;
paperSx.color = ( backgroundImage || backgroundColor ) ? 'rgb(12, 13, 14)' : null;

const stackSx = horizontalLayout
? { flex: 0.6, alignItems: 'center', justifyContent: 'center' }
@ -47,7 +50,7 @@ export const PromotionLink = (
{ messages.map( ( message, i ) => {
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>

{ features && (

View file

@ -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' ) &&
Utils::is_elementor_installed()
) {