Skip to content

Commit 1be5ece

Browse files
committed
Remove newsletter form
1 parent 5fe6d6e commit 1be5ece

File tree

2 files changed

+0
-45
lines changed

2 files changed

+0
-45
lines changed

assets/js/admin-settings.js

-36
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,6 @@
44
const { __ } = wp.i18n;
55
const { addQueryArgs } = wp.url;
66

7-
// Process Newsletter.
8-
function processNewsletter( e ) {
9-
if ( e.preventDefault ) {
10-
e.preventDefault();
11-
}
12-
const elSubmitBtn = $( '#ang-newsletter-submit' );
13-
let status = __( 'Subscribing', 'ang' );
14-
const angEmail = $( '#ang-newsletter-email' ).val();
15-
elSubmitBtn.text( status );
16-
17-
$.ajax( {
18-
url: 'https://analogwp.com/?ang-api=asdf&request=subscribe_newsletter',
19-
cache: ! 1,
20-
type: 'POST',
21-
dataType: 'JSON',
22-
data: {
23-
email: angEmail,
24-
},
25-
error: function() {
26-
status = __( 'Failed', 'ang' );
27-
elSubmitBtn.text( status );
28-
setTimeout( function() {
29-
elSubmitBtn.text( __( 'Subscribe up to newsletter', 'ang' ) );
30-
}, 2000 );
31-
},
32-
success: function() {
33-
status = __( 'Subscribed', 'ang' );
34-
elSubmitBtn.text( status );
35-
elSubmitBtn.attr( 'disabled', 'disabled' );
36-
},
37-
} );
38-
39-
return false;
40-
}
41-
$( '#ang-newsletter' ).submit( processNewsletter );
42-
437
// Process Plugin Rollback.
448
function processPluginRollback( e ) {
459
if ( e.preventDefault ) {

inc/settings/views/html-admin-settings.php

-9
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,6 @@
9191
<a href="<?php echo esc_url( 'https://analogwp.com/docs/' ); ?>" target="_blank"><?php esc_html_e( 'Visit the online docs', 'ang' ); ?></a>
9292
</p>
9393
</div>
94-
<div class="newsletter-list">
95-
<h3><?php esc_html_e( 'Sign up for email updates', 'ang' ); ?></h3>
96-
<p><?php esc_html_e( 'Stay in the loop with Style Kits development by signing up to our newsletter.', 'ang' ); ?></p>
97-
<form id="ang-newsletter" action="" class="form-newsletter">
98-
<input id="ang-newsletter-email" type="email" placeholder="Enter your email" value="<?php echo esc_attr( $current_user->user_email ); ?>"/>
99-
<button id="ang-newsletter-submit" class="ang-button button-primary" type="submit"><?php esc_html_e( 'Sign me up', 'ang' ); ?></button>
100-
</form>
101-
<p><?php esc_html_e( 'By signing up you agree to our', 'ang' ); ?> <a href="<?php echo esc_url( 'https://analogwp.com/privacy-policy/' ); ?>" target="_blank"><?php esc_html_e( 'privacy and terms', 'ang' ); ?></a></p>
102-
</div>
10394
<div class="social">
10495
<a href="https://facebook.com/analogwp" target="_blank"><span class="dashicons dashicons-facebook-alt"></span></a>
10596
<a href="https://twitter.com/analogwp" target="_blank"><span class="dashicons dashicons-twitter"></span></a>

0 commit comments

Comments
 (0)