Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal: Add PLGs in Hello Theme for Elementor Pro [ED-14560] #403

Merged
merged 2 commits into from
May 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 29 additions & 19 deletions includes/customizer-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
}

/**
* Register Customizer controls.
* Register Customizer controls for header & footer.
*
* @return void
*/
function hello_customizer_register( $wp_customize ) {
require get_template_directory() . '/includes/customizer/customizer-action-links.php';
require_once get_template_directory() . '/includes/customizer/customizer-action-links.php';

$wp_customize->add_section(
'hello-options',
Expand Down Expand Up @@ -38,26 +38,36 @@ function hello_customizer_register( $wp_customize ) {
]
)
);
}
add_action( 'customize_register', 'hello_customizer_register' );

if ( ! function_exists( 'elementor_pro_load_plugin' ) ) {
require get_template_directory() . '/includes/customizer/customizer-upsell.php';

$wp_customize->add_section(
new HelloElementor\Includes\Customizer\Hello_Customizer_Upsell(
$wp_customize,
'hello-upsell-elementor-pro',
[
'heading' => esc_html__( 'Customize your entire website with Elementor Pro', 'hello-elementor' ),
'description' => esc_html__( 'Build and customize every part of your website, including Theme Parts with Elementor Pro.', 'hello-elementor' ),
'button_text' => esc_html__( 'Upgrade Now', 'hello-elementor' ),
'button_url' => 'https://elementor.com/pro/?utm_source=hello-theme-customize&utm_campaign=gopro&utm_medium=wp-dash',
'priority' => 999999,
]
)
);
/**
* Register Customizer controls for Elementor Pro upsell.
*
* @return void
*/
function hello_customizer_register_elementor_pro_upsell( $wp_customize ) {
if ( function_exists( 'elementor_pro_load_plugin' ) ) {
return;
}

require_once get_template_directory() . '/includes/customizer/customizer-upsell.php';

$wp_customize->add_section(
new HelloElementor\Includes\Customizer\Hello_Customizer_Upsell(
$wp_customize,
'hello-upsell-elementor-pro',
[
'heading' => esc_html__( 'Customize your entire website with Elementor Pro', 'hello-elementor' ),
'description' => esc_html__( 'Build and customize every part of your website, including Theme Parts with Elementor Pro.', 'hello-elementor' ),
'button_text' => esc_html__( 'Upgrade Now', 'hello-elementor' ),
'button_url' => 'https://elementor.com/pro/?utm_source=hello-theme-customize&utm_campaign=gopro&utm_medium=wp-dash',
'priority' => 999999,
]
)
);
}
add_action( 'customize_register', 'hello_customizer_register' );
add_action( 'customize_register', 'hello_customizer_register_elementor_pro_upsell' );

/**
* Enqueue Customizer CSS.
Expand Down
Loading