Skip to content

Commit 616ddfd

Browse files
committed
update
1 parent 774aa42 commit 616ddfd

File tree

2 files changed

+21
-16
lines changed

2 files changed

+21
-16
lines changed

includes/EB_Promotion_Notice.php

Lines changed: 10 additions & 10 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="popup" 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="eb-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="popup" 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="eb-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>
@@ -233,9 +233,9 @@ public function essential_blocks_promo_admin_js_template() {
233233
<img src="<?php echo esc_url( $eb_promo_img2 ); ?>" alt="">
234234
</div>
235235
<div class="dc-gb-eb-content-info">
236-
<h3><?php esc_html_e( '40+ Amazing Gutenberg Blocks', 'disable-comments' ); ?></h3>
237-
<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="popup" data-action="<?php echo esc_attr( $action ); ?>" data-nonce="<?php echo esc_attr( $nonce ); ?>"><?php echo esc_html( $button_title ); ?></button>
236+
<h3><?php esc_html_e( '60+ Amazing Gutenberg Blocks', 'disable-comments' ); ?></h3>
237+
<p><?php esc_html_e( 'Create & design your WordPress websites just the way you want with more than 60 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-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="popup" 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="eb-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="popup" 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="eb-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="popup" 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="eb-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>
@@ -304,10 +304,10 @@ public function essential_block_optin() {
304304
<div class="wpnotice-content-wrapper">
305305
<div class="dc-eb-optin">
306306
<h3><?php esc_html_e( 'Using Gutenberg? Check out Essential Blocks!', 'disable-comments' ); ?></h3>
307-
<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>
307+
<p><?php _e( 'Are you using the Gutenberg Editor for your website? Then try out Essential Blocks for Gutenberg, and explore 60+ 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-promotype="notice" 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="eb-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: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,20 @@ public function ajax_install_plugin()
155155
$slug = isset( $_POST['slug'] ) ? sanitize_text_field( $_POST['slug'] ) : '';
156156
$result = $this->install_plugin( $slug );
157157

158+
$args = array(
159+
'headers' => array(
160+
'Referer' => "DisableComments",
161+
),
162+
);
158163
if( isset( $_POST['promotype'] ) ) {
159-
if( 'popup' === $_POST['promotype'] ) {
160-
wp_remote_get( 'https://wpdeveloper.com/dc-modal/essential-blocks' );
164+
if( 'eb-popup' === $_POST['promotype'] ) {
165+
wp_remote_get( 'https://wpdeveloper.com/dc-modal/essential-blocks', $args );
161166
}
162-
if( 'notice' === $_POST['promotype'] ) {
163-
wp_remote_get( 'https://wpdeveloper.com/dc-posts/essential-blocks' );
167+
if( 'eb-notice' === $_POST['promotype'] ) {
168+
wp_remote_get( 'https://wpdeveloper.com/dc-posts/essential-blocks', $args );
164169
}
165-
if( 'banner' === $_POST['promotype'] ) {
166-
wp_remote_get( 'https://wpdeveloper.com/dc-editor/essential-blocks' );
170+
if( 'eb-banner' === $_POST['promotype'] ) {
171+
wp_remote_get( 'https://wpdeveloper.com/dc-editor/essential-blocks', $args );
167172
}
168173
}
169174

0 commit comments

Comments
 (0)