Skip to content

Commit 774aa42

Browse files
committed
update
1 parent 91452fd commit 774aa42

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

includes/EB_Promotion_Notice.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public function essential_blocks_promo_admin_js_template() {
202202
<div class="dc-gb-eb-content-info">
203203
<h3><?php esc_html_e( 'Supercharge Your Gutenberg Experience With Essential Blocks', 'disable-comments' ); ?></h3>
204204
<p><?php esc_html_e( 'If you like Disable Comments, check out Essential Blocks, the ultimate block library for Gutenberg that is trusted by more than 100,000+ web creators.', 'disable-comments' ); ?></p>
205-
<button class="dc-gb-eb-install components-button is-primary" data-promotype="eb-banner" data-action="<?php echo esc_attr( $action ); ?>" data-nonce="<?php echo esc_attr( $nonce ); ?>"><?php echo esc_html( $button_title ); ?></button>
205+
<button class="dc-gb-eb-install components-button is-primary" data-promotype="popup" data-action="<?php echo esc_attr( $action ); ?>" data-nonce="<?php echo esc_attr( $nonce ); ?>"><?php echo esc_html( $button_title ); ?></button>
206206
</div>
207207
</div>
208208
<div class="dc-gb-eb-footer">
@@ -222,7 +222,7 @@ public function essential_blocks_promo_admin_js_template() {
222222
<div class="dc-gb-eb-content-info">
223223
<h3><?php esc_html_e( 'Supercharge Your Gutenberg Experience With Essential Blocks', 'disable-comments' ); ?></h3>
224224
<p><?php esc_html_e( 'If you like Disable Comments, check out Essential Blocks, the ultimate block library for Gutenberg that is trusted by more than 100,000+ web creators.', 'disable-comments' ) ?></p>
225-
<button class="dc-gb-eb-install components-button is-primary" data-promotype="eb-banner" data-action="<?php echo esc_attr( $action ); ?>" data-nonce="<?php echo esc_attr( $nonce ); ?>"><?php echo esc_html( $button_title ); ?></button>
225+
<button class="dc-gb-eb-install components-button is-primary" data-promotype="popup" data-action="<?php echo esc_attr( $action ); ?>" data-nonce="<?php echo esc_attr( $nonce ); ?>"><?php echo esc_html( $button_title ); ?></button>
226226
</div>
227227
</div>
228228
</script>
@@ -235,7 +235,7 @@ public function essential_blocks_promo_admin_js_template() {
235235
<div class="dc-gb-eb-content-info">
236236
<h3><?php esc_html_e( '40+ Amazing Gutenberg Blocks', 'disable-comments' ); ?></h3>
237237
<p><?php esc_html_e( 'Create & design your WordPress websites just the way you want with more than 40 amazing, ready blocks from Essential Blocks for Gutenberg.', 'disable-comments' ) ?></p>
238-
<button class="dc-gb-eb-install components-button is-primary" data-promotype="eb-banner" data-action="<?php echo esc_attr( $action ); ?>" data-nonce="<?php echo esc_attr( $nonce ); ?>"><?php echo esc_html( $button_title ); ?></button>
238+
<button class="dc-gb-eb-install components-button is-primary" data-promotype="popup" data-action="<?php echo esc_attr( $action ); ?>" data-nonce="<?php echo esc_attr( $nonce ); ?>"><?php echo esc_html( $button_title ); ?></button>
239239
</div>
240240
</div>
241241
</script>
@@ -248,7 +248,7 @@ public function essential_blocks_promo_admin_js_template() {
248248
<div class="dc-gb-eb-content-info">
249249
<h3><?php esc_html_e( 'Useful Block Control Option', 'disable-comments' ); ?></h3>
250250
<p><?php esc_html_e( 'Get the fastest loading time and smoothest experience on your web page by enabling and disabling individual blocks as per your requirements.', 'disable-comments' ) ?></p>
251-
<button class="dc-gb-eb-install components-button is-primary" data-promotype="eb-banner" data-action="<?php echo esc_attr( $action ); ?>" data-nonce="<?php echo esc_attr( $nonce ); ?>"><?php echo esc_html( $button_title ); ?></button>
251+
<button class="dc-gb-eb-install components-button is-primary" data-promotype="popup" data-action="<?php echo esc_attr( $action ); ?>" data-nonce="<?php echo esc_attr( $nonce ); ?>"><?php echo esc_html( $button_title ); ?></button>
252252
</div>
253253
</div>
254254
</script>
@@ -261,7 +261,7 @@ public function essential_blocks_promo_admin_js_template() {
261261
<div class="dc-gb-eb-content-info">
262262
<h3><?php esc_html_e( 'Access To Thousands Of Ready Gutenberg Templates', 'disable-comments' ); ?></h3>
263263
<p><?php esc_html_e( 'Design unique websites using ready Gutenberg templates from Templately with absolute ease and instantly grab attention.', 'disable-comments' ) ?></p>
264-
<button class="dc-gb-eb-install components-button is-primary" data-promotype="eb-banner" data-action="<?php echo esc_attr( $action ); ?>" data-nonce="<?php echo esc_attr( $nonce ); ?>"><?php echo esc_html( $button_title ); ?></button>
264+
<button class="dc-gb-eb-install components-button is-primary" data-promotype="popup" data-action="<?php echo esc_attr( $action ); ?>" data-nonce="<?php echo esc_attr( $nonce ); ?>"><?php echo esc_html( $button_title ); ?></button>
265265
</div>
266266
</div>
267267
</script>
@@ -274,7 +274,7 @@ public function essential_blocks_promo_admin_js_template() {
274274
<div class="dc-gb-eb-content-info">
275275
<h3><?php esc_html_e( 'Try Essential Blocks Today!', 'disable-comments' ); ?></h3>
276276
<p><?php printf( __( 'Want to get started with Essential Blocks now? Check out %scomplete guides for each blocks%s to learn more about this ultimate block library for Gutenberg.', 'disable-comments' ), '<a href="https://essential-blocks.com/demo" target="_blank">', '</a>' ) ?></p>
277-
<button class="dc-gb-eb-install components-button is-primary" data-promotype="eb-banner" data-action="<?php echo esc_attr( $action ); ?>" data-nonce="<?php echo esc_attr( $nonce ); ?>"><?php echo esc_html( $button_title ); ?></button>
277+
<button class="dc-gb-eb-install components-button is-primary" data-promotype="popup" data-action="<?php echo esc_attr( $action ); ?>" data-nonce="<?php echo esc_attr( $nonce ); ?>"><?php echo esc_html( $button_title ); ?></button>
278278
<button class="dc-gb-eb-never-show" data-nonce="<?php echo esc_attr( $nonce ); ?>"><?php esc_html_e( 'Skip for Now', 'disable-comments' ); ?></button>
279279
</div>
280280
</div>
@@ -307,7 +307,7 @@ public function essential_block_optin() {
307307
<p><?php _e( 'Are you using the Gutenberg Editor for your website? Then try out Essential Blocks for Gutenberg, and explore 40+ unique blocks to make your web design experience in WordPress even more powerful. 🚀', 'disable-comments' ); ?></p>
308308
<p><?php _e( 'For more information, <a href="https://essential-blocks.com/demo/" target="_blank">check out the demo here</a>.', 'disable-comments' ); ?></p>
309309
<p>
310-
<a href="#" class="button-primary wpdeveloper-eb-plugin-installer" data-action="<?php echo esc_attr( $action ); ?>"><?php echo esc_html( $button_title ); ?></a>
310+
<a href="#" class="button-primary wpdeveloper-eb-plugin-installer" data-promotype="notice" data-action="<?php echo esc_attr( $action ); ?>"><?php echo esc_html( $button_title ); ?></a>
311311
</p>
312312
</div>
313313
</div>

includes/WPDeveloper_Plugin_Installer.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,16 @@ public function ajax_install_plugin()
155155
$slug = isset( $_POST['slug'] ) ? sanitize_text_field( $_POST['slug'] ) : '';
156156
$result = $this->install_plugin( $slug );
157157

158-
if( isset( $_POST['promotype'] ) && 'eb-banner' === $_POST['promotype'] ) {
159-
wp_remote_get( 'https://wpdeveloper.com/dc/essential-blocks' );
158+
if( isset( $_POST['promotype'] ) ) {
159+
if( 'popup' === $_POST['promotype'] ) {
160+
wp_remote_get( 'https://wpdeveloper.com/dc-modal/essential-blocks' );
161+
}
162+
if( 'notice' === $_POST['promotype'] ) {
163+
wp_remote_get( 'https://wpdeveloper.com/dc-posts/essential-blocks' );
164+
}
165+
if( 'banner' === $_POST['promotype'] ) {
166+
wp_remote_get( 'https://wpdeveloper.com/dc-editor/essential-blocks' );
167+
}
160168
}
161169

162170
if ( is_wp_error( $result ) ) {

0 commit comments

Comments
 (0)