Version Description
- 2017-05-31 =
- Enhancement: opt-in for plugin users.
- Enhancement: Add footer link through customizer.
- Enhancement: Code cleanup
Download this release
Release Info
Developer | hiddenpearls |
Plugin | Custom Login Page Customizer | LoginPress |
Version | 1.0.15 |
Comparing to | |
See all releases |
Code changes from version 1.0.14 to 1.0.15
- classes/loginpress-setup.php +7 -6
- css/style-login.php +14 -1
- css/style.css +3 -0
- css/themes/default-1.php +9 -0
- custom.php +22 -3
- img/loginpress.png +0 -0
- include/loginpress-optin-form.php +351 -0
- include/loginpress-optout-form.php +160 -0
- js/customize-controls.js +11 -0
- loginpress.php +117 -12
- readme.txt +7 -2
classes/loginpress-setup.php
CHANGED
@@ -98,12 +98,13 @@ class LoginPress_Settings {
|
|
98 |
'desc' => __( 'Remove my custom settings.', 'loginpress' ),
|
99 |
'type' => 'checkbox'
|
100 |
),
|
101 |
-
array(
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
|
|
107 |
|
108 |
$_settings_fields = apply_filters( 'loginpress_pro_settings', $_free_fields );
|
109 |
|
98 |
'desc' => __( 'Remove my custom settings.', 'loginpress' ),
|
99 |
'type' => 'checkbox'
|
100 |
),
|
101 |
+
// array(
|
102 |
+
// 'name' => 'tracking_anonymous',
|
103 |
+
// 'label' => __( 'Allow Usage Tracking?', 'loginpress' ),
|
104 |
+
// 'desc' => __( 'Allow LoginPress to <a href="https://wpbrigade.com/wordpress/plugins/non-sensitive-diagnostic-tracking/" target="_blank">non-sensitive diagnostic tracking</a> and help us make the plugin even better.', 'loginpress' ),
|
105 |
+
// 'type' => 'checkbox'
|
106 |
+
// )
|
107 |
+
);
|
108 |
|
109 |
$_settings_fields = apply_filters( 'loginpress_pro_settings', $_free_fields );
|
110 |
|
css/style-login.php
CHANGED
@@ -186,6 +186,7 @@ body.login {
|
|
186 |
<?php if ( ! empty( $loginpress_background_image_size ) ) : ?>
|
187 |
background-size: <?php echo $loginpress_background_image_size; ?>;
|
188 |
<?php endif; ?>
|
|
|
189 |
}
|
190 |
|
191 |
.login h1 a {
|
@@ -416,7 +417,19 @@ input:-webkit-autofill{
|
|
416 |
transition: all 100000s ease-in-out 0s !important;
|
417 |
transition-property: background-color, color !important;
|
418 |
}
|
419 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
420 |
</style>
|
421 |
|
422 |
<?php // $content = ob_get_clean(); ?>
|
186 |
<?php if ( ! empty( $loginpress_background_image_size ) ) : ?>
|
187 |
background-size: <?php echo $loginpress_background_image_size; ?>;
|
188 |
<?php endif; ?>
|
189 |
+
position: relative;
|
190 |
}
|
191 |
|
192 |
.login h1 a {
|
417 |
transition: all 100000s ease-in-out 0s !important;
|
418 |
transition-property: background-color, color !important;
|
419 |
}
|
420 |
+
.loginpress-show-love{
|
421 |
+
float: right;
|
422 |
+
font-style: italic;
|
423 |
+
padding-right: 20px;
|
424 |
+
padding-bottom: 10px;
|
425 |
+
position: absolute;
|
426 |
+
bottom: 3px;
|
427 |
+
right: 0;
|
428 |
+
z-index: 10;
|
429 |
+
}
|
430 |
+
.loginpress-show-love a{
|
431 |
+
text-decoration: none;
|
432 |
+
}
|
433 |
</style>
|
434 |
|
435 |
<?php // $content = ob_get_clean(); ?>
|
css/style.css
CHANGED
@@ -251,6 +251,9 @@
|
|
251 |
.form-table td fieldset label{
|
252 |
font-size: 13px;
|
253 |
}
|
|
|
|
|
|
|
254 |
@media screen and (max-width: 1170px) {
|
255 |
|
256 |
}
|
251 |
.form-table td fieldset label{
|
252 |
font-size: 13px;
|
253 |
}
|
254 |
+
.site_key, .secret_key, .captcha_theme, .captcha_language, .captcha_enable{
|
255 |
+
display: none;
|
256 |
+
}
|
257 |
@media screen and (max-width: 1170px) {
|
258 |
|
259 |
}
|
css/themes/default-1.php
CHANGED
@@ -249,6 +249,15 @@ function first_presets() {
|
|
249 |
padding: 12px;
|
250 |
background-color: #efefef;
|
251 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
252 |
</style>
|
253 |
|
254 |
<?php
|
249 |
padding: 12px;
|
250 |
background-color: #efefef;
|
251 |
}
|
252 |
+
.loginpress-show-love{
|
253 |
+
color: #222;
|
254 |
+
}
|
255 |
+
.loginpress-show-love a{
|
256 |
+
color: #263466;
|
257 |
+
}
|
258 |
+
.loginpress-show-love a:hover{
|
259 |
+
color: #4d5d95;
|
260 |
+
}
|
261 |
</style>
|
262 |
|
263 |
<?php
|
custom.php
CHANGED
@@ -36,7 +36,7 @@ class LoginPress_Entities {
|
|
36 |
add_action( 'login_footer', array( $this, 'login_page_custom_footer' ) );
|
37 |
add_action( 'login_head', array( $this, 'login_page_custom_head' ) );
|
38 |
add_action( 'init', array( $this, 'redirect_to_custom_page' ) );
|
39 |
-
add_action( 'admin_menu', array( $this, 'menu_url' ),
|
40 |
|
41 |
add_action( 'customize_controls_enqueue_scripts', array( $this, 'loginpress_customizer_js' ) );
|
42 |
// add_action( 'customize_preview_init', array( $this, 'loginpress_customizer_js' ) );
|
@@ -78,7 +78,7 @@ class LoginPress_Entities {
|
|
78 |
* @param $wp_customize
|
79 |
* @since 1.0.0
|
80 |
*/
|
81 |
-
public function customize_login_panel( $wp_customize ){
|
82 |
|
83 |
include LOGINPRESS_ROOT_PATH .'classes/control-presets.php';
|
84 |
|
@@ -1085,6 +1085,21 @@ class LoginPress_Entities {
|
|
1085 |
'settings' => 'loginpress_customization[login_footer_copy_right]'
|
1086 |
) );
|
1087 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1088 |
// =============================
|
1089 |
// = Section for Custom CSS =
|
1090 |
// =============================
|
@@ -1147,6 +1162,10 @@ class LoginPress_Entities {
|
|
1147 |
|
1148 |
if ( $this->loginpress_key ) {
|
1149 |
|
|
|
|
|
|
|
|
|
1150 |
// echo '</div></div>';
|
1151 |
echo '<div class="footer-wrapper">';
|
1152 |
echo '<div class="footer-cont">';
|
@@ -1163,7 +1182,7 @@ class LoginPress_Entities {
|
|
1163 |
//
|
1164 |
// }
|
1165 |
|
1166 |
-
if ( array_key_exists( 'login_footer_copy_right', $this->loginpress_key ) && !empty( $this->loginpress_key['login_footer_copy_right'] ) ) {
|
1167 |
|
1168 |
echo '<div class="copyRight">'.$this->loginpress_key['login_footer_copy_right'].'</div>';
|
1169 |
}
|
36 |
add_action( 'login_footer', array( $this, 'login_page_custom_footer' ) );
|
37 |
add_action( 'login_head', array( $this, 'login_page_custom_head' ) );
|
38 |
add_action( 'init', array( $this, 'redirect_to_custom_page' ) );
|
39 |
+
add_action( 'admin_menu', array( $this, 'menu_url' ), 10 );
|
40 |
|
41 |
add_action( 'customize_controls_enqueue_scripts', array( $this, 'loginpress_customizer_js' ) );
|
42 |
// add_action( 'customize_preview_init', array( $this, 'loginpress_customizer_js' ) );
|
78 |
* @param $wp_customize
|
79 |
* @since 1.0.0
|
80 |
*/
|
81 |
+
public function customize_login_panel( $wp_customize ) {
|
82 |
|
83 |
include LOGINPRESS_ROOT_PATH .'classes/control-presets.php';
|
84 |
|
1085 |
'settings' => 'loginpress_customization[login_footer_copy_right]'
|
1086 |
) );
|
1087 |
|
1088 |
+
$wp_customize->add_setting( 'loginpress_customization[loginpress_show_love]', array(
|
1089 |
+
'default' => true,
|
1090 |
+
'type' => 'option',
|
1091 |
+
'capability' => 'manage_options',
|
1092 |
+
'transport' => 'postMessage'
|
1093 |
+
) );
|
1094 |
+
|
1095 |
+
$wp_customize->add_control( 'loginpress_customization[loginpress_show_love]', array(
|
1096 |
+
'settings' => 'loginpress_customization[loginpress_show_love]',
|
1097 |
+
'label' => __( 'Show some Love. Please help other learn about this free plugin by placing small link in footer. Thank you very much!', 'loginpress' ),
|
1098 |
+
'section' => 'section_fotter',
|
1099 |
+
'priority' => 80,
|
1100 |
+
'type' => 'checkbox',
|
1101 |
+
) );
|
1102 |
+
|
1103 |
// =============================
|
1104 |
// = Section for Custom CSS =
|
1105 |
// =============================
|
1162 |
|
1163 |
if ( $this->loginpress_key ) {
|
1164 |
|
1165 |
+
if ( ! array_key_exists( 'loginpress_show_love', $this->loginpress_key ) || ( array_key_exists( 'loginpress_show_love', $this->loginpress_key ) && $this->loginpress_key['loginpress_show_love'] ) ) {
|
1166 |
+
echo '<div class="loginpress-show-love">' . __( 'Powered by:', 'loginpress' ) . ' <a href="https://wpbrigade.com" target="_blank">LoginPress</a></div>';
|
1167 |
+
}
|
1168 |
+
|
1169 |
// echo '</div></div>';
|
1170 |
echo '<div class="footer-wrapper">';
|
1171 |
echo '<div class="footer-cont">';
|
1182 |
//
|
1183 |
// }
|
1184 |
|
1185 |
+
if ( array_key_exists( 'login_footer_copy_right', $this->loginpress_key ) && ! empty( $this->loginpress_key['login_footer_copy_right'] ) ) {
|
1186 |
|
1187 |
echo '<div class="copyRight">'.$this->loginpress_key['login_footer_copy_right'].'</div>';
|
1188 |
}
|
img/loginpress.png
ADDED
Binary file
|
include/loginpress-optin-form.php
ADDED
@@ -0,0 +1,351 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<style media="screen">
|
2 |
+
#wpwrap {
|
3 |
+
background-color: #fdfdfd
|
4 |
+
}
|
5 |
+
#wpcontent {
|
6 |
+
padding: 0!important
|
7 |
+
}
|
8 |
+
#loginpress-logo-wrapper {
|
9 |
+
padding: 10px 0;
|
10 |
+
width: 80%;
|
11 |
+
margin: 0 auto;
|
12 |
+
border-bottom: solid 1px #d5d5d5
|
13 |
+
}
|
14 |
+
#loginpress-logo-wrapper-inner {
|
15 |
+
max-width: 600px;
|
16 |
+
width: 100%;
|
17 |
+
margin: auto
|
18 |
+
}
|
19 |
+
#loginpress-splash {
|
20 |
+
width: 80%;
|
21 |
+
margin: auto;
|
22 |
+
background-color: #fdfdfd;
|
23 |
+
text-align: center
|
24 |
+
}
|
25 |
+
#loginpress-splash h1 {
|
26 |
+
margin-top: 40px;
|
27 |
+
margin-bottom: 25px;
|
28 |
+
font-size: 26px
|
29 |
+
}
|
30 |
+
#loginpress-splash-main {
|
31 |
+
padding-bottom: 0
|
32 |
+
}
|
33 |
+
#loginpress-splash-permissions-toggle {
|
34 |
+
font-size: 12px
|
35 |
+
}
|
36 |
+
#loginpress-splash-permissions-dropdown h3 {
|
37 |
+
font-size: 16px;
|
38 |
+
margin-bottom: 5px
|
39 |
+
}
|
40 |
+
#loginpress-splash-permissions-dropdown p {
|
41 |
+
margin-top: 0;
|
42 |
+
font-size: 14px;
|
43 |
+
margin-bottom: 20px
|
44 |
+
}
|
45 |
+
#loginpress-splash-main-text {
|
46 |
+
font-size: 16px;
|
47 |
+
padding: 0;
|
48 |
+
margin: 0
|
49 |
+
}
|
50 |
+
#loginpress-splash-footer {
|
51 |
+
width: 80%;
|
52 |
+
padding: 15px 0;
|
53 |
+
border: 1px solid #d5d5d5;
|
54 |
+
font-size: 10px;
|
55 |
+
text-align: center;
|
56 |
+
margin-top: 238px;
|
57 |
+
margin-left: auto;
|
58 |
+
margin-right: auto;
|
59 |
+
}
|
60 |
+
#loginpress-ga-optout-btn {
|
61 |
+
background: none!important;
|
62 |
+
border: none;
|
63 |
+
padding: 0!important;
|
64 |
+
font: inherit;
|
65 |
+
color: #7f7f7f;
|
66 |
+
border-bottom: 1px solid #7f7f7f;
|
67 |
+
cursor: pointer;
|
68 |
+
margin-bottom: 20px;
|
69 |
+
font-size: 14px
|
70 |
+
}
|
71 |
+
.about-wrap .nav-tab + .nav-tab{
|
72 |
+
border-left: 0;
|
73 |
+
}
|
74 |
+
.about-wrap .nav-tab:focus{
|
75 |
+
|
76 |
+
box-shadow: none;
|
77 |
+
}
|
78 |
+
#loginpress-ga-submit-btn {
|
79 |
+
height: 40px;
|
80 |
+
margin: 30px;
|
81 |
+
margin-bottom: 15px;
|
82 |
+
font-size: 16px;
|
83 |
+
line-height: 40px;
|
84 |
+
padding: 0 20px;
|
85 |
+
}
|
86 |
+
#loginpress-ga-submit-btn:after{
|
87 |
+
content: '\279C';
|
88 |
+
}
|
89 |
+
.loginpress-splash-box {
|
90 |
+
width: 100%;
|
91 |
+
max-width: 600px;
|
92 |
+
background-color: #fff;
|
93 |
+
border: solid 1px #d5d5d5;
|
94 |
+
margin: auto;
|
95 |
+
margin-bottom: 20px;
|
96 |
+
text-align: center;
|
97 |
+
padding: 15px
|
98 |
+
}
|
99 |
+
|
100 |
+
.about-wrap .nav-tab{
|
101 |
+
height: auto;
|
102 |
+
float: none;
|
103 |
+
display: inline-block;
|
104 |
+
margin-right: 0;
|
105 |
+
margin-left: 0;
|
106 |
+
font-size: 18px;
|
107 |
+
width: 33.333%;
|
108 |
+
-webkit-box-sizing: border-box;
|
109 |
+
box-sizing: border-box;
|
110 |
+
padding: 8px 15px;
|
111 |
+
}
|
112 |
+
.step-wrapper .loginpress-splash-box{
|
113 |
+
padding: 0;
|
114 |
+
border: 0;
|
115 |
+
}
|
116 |
+
.nav-tab-wrapper{
|
117 |
+
margin:0;
|
118 |
+
font-size: 0;
|
119 |
+
}
|
120 |
+
.nav-tab-wrapper, .wrap h2.nav-tab-wrapper{
|
121 |
+
margin:0;
|
122 |
+
font-size: 0;
|
123 |
+
}
|
124 |
+
.loginpress-tab-content{
|
125 |
+
display: none;
|
126 |
+
border:1px solid #d5d5d5;
|
127 |
+
padding:1px 20px 20px;
|
128 |
+
border-top: 0;
|
129 |
+
}
|
130 |
+
.loginpress-tab-content.active{
|
131 |
+
display: block;
|
132 |
+
}
|
133 |
+
.loginpress-seprator{
|
134 |
+
border:0;
|
135 |
+
border-top: 1px solid #ccc;
|
136 |
+
margin: 50px 0;
|
137 |
+
}
|
138 |
+
.admin_page_loginpress-optin #wpwrap{
|
139 |
+
background: #f1f1f1;
|
140 |
+
}
|
141 |
+
#wpbody{
|
142 |
+
padding-right: 0;
|
143 |
+
}
|
144 |
+
#loginpress-splash{
|
145 |
+
max-width: calc(100% - 64px);
|
146 |
+
|
147 |
+
background: #f1f1f1;
|
148 |
+
}
|
149 |
+
.loginpress-splash-box{
|
150 |
+
max-width: 100%;
|
151 |
+
background: #f1f1f1;
|
152 |
+
box-sizing: border-box;
|
153 |
+
overflow: hidden;
|
154 |
+
}
|
155 |
+
.about-wrap {
|
156 |
+
position: relative;
|
157 |
+
margin: 25px 35px 0 35px;
|
158 |
+
max-width: 80%;
|
159 |
+
font-size: 15px;
|
160 |
+
width: calc(100% - 64px);
|
161 |
+
margin: 0 auto;
|
162 |
+
}
|
163 |
+
.loginpress-left-screenshot{
|
164 |
+
float: left;
|
165 |
+
}
|
166 |
+
.about-wrap p{
|
167 |
+
font-size: 14px;
|
168 |
+
}
|
169 |
+
.loginpress-text-settings h5{
|
170 |
+
margin: 25px 0 5px;
|
171 |
+
}
|
172 |
+
.about-wrap .about-description, .about-wrap .about-text{
|
173 |
+
font-size: 16px;
|
174 |
+
}
|
175 |
+
.about-wrap .feature-section h4,.about-wrap .changelog h3{
|
176 |
+
font-size: 1em;
|
177 |
+
}
|
178 |
+
h5{
|
179 |
+
font-size: 1em;
|
180 |
+
}
|
181 |
+
.about-wrap .feature-section img.loginpress-left-screenshot{
|
182 |
+
margin-left: 0 !important;
|
183 |
+
margin-right: 30px !important;
|
184 |
+
}
|
185 |
+
.about-wrap img{
|
186 |
+
|
187 |
+
width: 50%;
|
188 |
+
}
|
189 |
+
.loginpress-text-settings{
|
190 |
+
overflow: hidden;
|
191 |
+
}
|
192 |
+
#loginpress-splash-footer{
|
193 |
+
margin-top: 50px;
|
194 |
+
}
|
195 |
+
.step-wrapper{
|
196 |
+
width: 200%;
|
197 |
+
transition: all 0.3s ease-in-out;
|
198 |
+
-webkit-transition: all 0.3s ease-in-out;
|
199 |
+
}
|
200 |
+
.step-wrapper.slide{
|
201 |
+
-webkit-transform: translateX(-50%);
|
202 |
+
transform: translateX(-50%);
|
203 |
+
}
|
204 |
+
.step-wrapper:after{
|
205 |
+
content: '';
|
206 |
+
display: table;
|
207 |
+
clear: both;
|
208 |
+
}
|
209 |
+
.step{
|
210 |
+
width: 50%;
|
211 |
+
float: left;
|
212 |
+
padding: 0 20px;
|
213 |
+
box-sizing: border-box;
|
214 |
+
}
|
215 |
+
.loginpress-welcome-screenshots{
|
216 |
+
margin-left: 30px !important;
|
217 |
+
}
|
218 |
+
#loginpress-splash-footer{
|
219 |
+
font-size: 12px;
|
220 |
+
}
|
221 |
+
.about-wrap .changelog.loginpress-backend-settings{
|
222 |
+
margin-bottom: 20px;
|
223 |
+
}
|
224 |
+
.loginpress-backend-settings .feature-section{
|
225 |
+
padding-bottom: 20px;
|
226 |
+
}
|
227 |
+
a.loginpress-ga-button.button.button-primary{
|
228 |
+
height: auto !important;
|
229 |
+
}
|
230 |
+
.changelog:last-child{
|
231 |
+
margin-bottom: 0;
|
232 |
+
}
|
233 |
+
.changelog:last-child .feature-section{
|
234 |
+
padding-bottom: 0;
|
235 |
+
}
|
236 |
+
|
237 |
+
#loginpress-logo-text{
|
238 |
+
margin-right: 40px;
|
239 |
+
position: relative;
|
240 |
+
bottom: 0px;
|
241 |
+
width: 55px;
|
242 |
+
vertical-align: middle;
|
243 |
+
}
|
244 |
+
.loginpress-badge {
|
245 |
+
height: 200px;
|
246 |
+
width: 200px;
|
247 |
+
margin: -12px -5px;
|
248 |
+
background: url("<?php echo plugins_url( 'assets/images/welcome-loginpress.png', __FILE__ ); ?>") no-repeat;
|
249 |
+
background-size: 100% auto;
|
250 |
+
}
|
251 |
+
|
252 |
+
.about-wrap .loginpress-badge {
|
253 |
+
position: absolute;
|
254 |
+
top: 0;
|
255 |
+
right: 0;
|
256 |
+
}
|
257 |
+
|
258 |
+
.loginpress-welcome-screenshots {
|
259 |
+
float: right;
|
260 |
+
margin-left: 10px !important;
|
261 |
+
border:1px solid #ccc;
|
262 |
+
padding:0;
|
263 |
+
box-shadow:4px 4px 0px rgba(0,0,0,.05)
|
264 |
+
}
|
265 |
+
|
266 |
+
.about-wrap .feature-section {
|
267 |
+
margin-top: 20px;
|
268 |
+
}
|
269 |
+
|
270 |
+
.about-wrap .feature-section p{
|
271 |
+
max-width: none !important;
|
272 |
+
}
|
273 |
+
|
274 |
+
.loginpress-welcome-settings{
|
275 |
+
clear: both;
|
276 |
+
padding-top: 20px;
|
277 |
+
}
|
278 |
+
.loginpress-left-screenshot {
|
279 |
+
float: left !important;
|
280 |
+
}
|
281 |
+
</style>
|
282 |
+
<?php
|
283 |
+
|
284 |
+
$user = wp_get_current_user();
|
285 |
+
$name = empty( $user->user_firstname ) ? $user->display_name : $user->user_firstname;
|
286 |
+
$email = $user->user_email;
|
287 |
+
$site_link = '<a href="' . get_site_url() . '">'. get_site_url() . '</a>';
|
288 |
+
$website = get_site_url();
|
289 |
+
|
290 |
+
$default_login_press_redirect = 'loginpress-settings';
|
291 |
+
|
292 |
+
if ( isset( $_GET['redirect-page'] ) ) {
|
293 |
+
$default_login_press_redirect = sanitize_text_field( wp_unslash( $_GET['redirect-page'] ) );
|
294 |
+
}
|
295 |
+
|
296 |
+
echo '<form method="post" action="' . admin_url( 'admin.php?page=' . $default_login_press_redirect ) . '">';
|
297 |
+
|
298 |
+
echo "<input type='hidden' name='email' value='$email'>";
|
299 |
+
|
300 |
+
echo '<div id="loginpress-splash">';
|
301 |
+
echo '<h1> <img id="loginpress-logo-text" src="' . plugins_url( 'img/loginpress.png', dirname( __FILE__ ) ) . '"> ' . __( 'Welcome to LoginPress', 'loginpress' ) . '</h1>';
|
302 |
+
|
303 |
+
echo '<div id="loginpress-splash-main" class="loginpress-splash-box">';
|
304 |
+
echo '<div class="step-wrapper">';
|
305 |
+
if ( get_option( '_loginpress_optin' ) == 'no' || ! get_option( '_loginpress_optin' ) ) {
|
306 |
+
echo "<div class='first-step step'>";
|
307 |
+
echo sprintf ( __( '%1$s Hey %2$s, %4$s If you opt-in some data about your installation of LoginPress will be sent to WPBrigade.com (This doesn\'t include stats)%4$s and You will receive new feature updates, security notifications etc %5$sNo Spam, I promise.%6$s %4$s%4$s Help us %7$sImprove LoginPress%8$s %4$s %4$s ', 'loginpress' ), '<p id="loginpress-splash-main-text">', '<strong>' . $name . '</strong>', '<strong>' . $website . '</strong>', '<br>', '<i>', '</i>', '<strong>', '</strong>' ) . '</p>';
|
308 |
+
echo "<button type='submit' id='loginpress-ga-submit-btn' class='loginpress-ga-button button button-primary' name='loginpress-submit-optin' >" . __( 'Allow and Continue ', 'loginpress') . "</button><br>";
|
309 |
+
echo "<button type='submit' id='loginpress-ga-optout-btn' name='loginpress-submit-optout' >" . __( 'Skip This Step', 'loginpress') . "</button>";
|
310 |
+
echo '<div id="loginpress-splash-permissions" class="loginpress-splash-box">';
|
311 |
+
echo '<a id="loginpress-splash-permissions-toggle" href="#" >' . __( 'What permissions are being granted?', 'loginpress' ) . '</a>';
|
312 |
+
echo '<div id="loginpress-splash-permissions-dropdown" style="display: none;">';
|
313 |
+
echo '<h3>' . __( 'Your Website Overview', 'loginpress' ) . '</h3>';
|
314 |
+
echo '<p>' . __( 'Your Site URL, WordPress & PHP version, plugins & themes. This data lets us make sure this plugin always stays compatible with the most popular plugins and themes.', 'loginpress' ) . '</p>';
|
315 |
+
|
316 |
+
echo '<h3>' . __( 'Your Profile Overview', 'loginpress' ) . '</h3>';
|
317 |
+
echo '<p>' . __( 'Your name and email address.', 'loginpress' ) . '</p>';
|
318 |
+
|
319 |
+
echo '<h3>' . __( 'Admin Notices', 'loginpress' ) . '</h3>';
|
320 |
+
echo '<p>' . __( "Updates, Announcement, Marketing. No Spam, I promise.", 'loginpress' ) . '</p>';
|
321 |
+
|
322 |
+
echo '<h3>' . __( 'Plugin Actions', 'loginpress' ) . '</h3>';
|
323 |
+
echo '<p>' . __( "Active, Deactive, Uninstallation and How you use this plugin's features and settings. This is limited to usage data. It does not include any of your sensitive LoginPress data, such as traffic. This data helps us learn which features are most popular, so we can improve the plugin further.", 'loginpress' ) . '</p>';
|
324 |
+
echo '</div>';
|
325 |
+
echo '</div>';
|
326 |
+
echo '</div>';
|
327 |
+
}
|
328 |
+
|
329 |
+
|
330 |
+
echo '</div>';
|
331 |
+
echo '</div>';
|
332 |
+
|
333 |
+
|
334 |
+
|
335 |
+
echo '</div>';
|
336 |
+
|
337 |
+
echo '</form>';
|
338 |
+
|
339 |
+
|
340 |
+
|
341 |
+
?>
|
342 |
+
|
343 |
+
<script type="text/javascript">
|
344 |
+
jQuery(document).ready(function(s) {
|
345 |
+
var o = parseInt(s("#loginpress-splash-footer").css("margin-top"));
|
346 |
+
s("#loginpress-splash-permissions-toggle").click(function(a) {
|
347 |
+
a.preventDefault(), s("#loginpress-splash-permissions-dropdown").toggle(), 1 == s("#loginpress-splash-permissions-dropdown:visible").length ? s("#loginpress-splash-footer").css("margin-top", o - 208 + "px") : s("#loginpress-splash-footer").css("margin-top", o + "px")
|
348 |
+
})
|
349 |
+
});
|
350 |
+
|
351 |
+
</script>
|
include/loginpress-optout-form.php
ADDED
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<style media="screen">
|
2 |
+
.loginpress-modal.active {
|
3 |
+
display: block;
|
4 |
+
}
|
5 |
+
.loginpress-modal {
|
6 |
+
position: fixed;
|
7 |
+
overflow: auto;
|
8 |
+
height: 100%;
|
9 |
+
width: 100%;
|
10 |
+
top: 0;
|
11 |
+
z-index: 100000;
|
12 |
+
display: none;
|
13 |
+
background: rgba(0,0,0,0.6);
|
14 |
+
}
|
15 |
+
.loginpress-modal.active .loginpress-modal-dialog {
|
16 |
+
top: 10%;
|
17 |
+
}
|
18 |
+
.loginpress-modal .loginpress-modal-dialog {
|
19 |
+
background: transparent;
|
20 |
+
position: absolute;
|
21 |
+
left: 50%;
|
22 |
+
margin-left: -298px;
|
23 |
+
padding-bottom: 30px;
|
24 |
+
top: -100%;
|
25 |
+
z-index: 100001;
|
26 |
+
width: 596px;
|
27 |
+
}
|
28 |
+
.loginpress-modal .loginpress-modal-header {
|
29 |
+
border-bottom: #eeeeee solid 1px;
|
30 |
+
background: #fbfbfb;
|
31 |
+
padding: 15px 20px;
|
32 |
+
position: relative;
|
33 |
+
margin-bottom: -10px;
|
34 |
+
}
|
35 |
+
.loginpress-modal .loginpress-modal-body {
|
36 |
+
border-bottom: 0;
|
37 |
+
}
|
38 |
+
.loginpress-modal .loginpress-modal-body, .loginpress-modal .loginpress-modal-footer {
|
39 |
+
border: 0;
|
40 |
+
background: #fefefe;
|
41 |
+
padding: 20px;
|
42 |
+
}
|
43 |
+
.loginpress-modal .loginpress-modal-body>div {
|
44 |
+
margin-top: 10px;
|
45 |
+
}
|
46 |
+
.loginpress-modal .loginpress-modal-body>div h2 {
|
47 |
+
font-weight: bold;
|
48 |
+
font-size: 20px;
|
49 |
+
margin-top: 0;
|
50 |
+
}
|
51 |
+
.loginpress-modal .loginpress-modal-body p {
|
52 |
+
font-size: 14px;
|
53 |
+
}
|
54 |
+
.loginpress-modal .loginpress-modal-footer {
|
55 |
+
border-top: #eeeeee solid 1px;
|
56 |
+
text-align: right;
|
57 |
+
}
|
58 |
+
.loginpress-modal .loginpress-modal-footer>.button:first-child {
|
59 |
+
margin: 0;
|
60 |
+
}
|
61 |
+
.loginpress-modal .loginpress-modal-footer>.button {
|
62 |
+
margin: 0 7px;
|
63 |
+
}
|
64 |
+
.loginpress-modal .loginpress-modal-body>div h2 {
|
65 |
+
font-weight: bold;
|
66 |
+
font-size: 20px;
|
67 |
+
margin-top: 0;
|
68 |
+
}
|
69 |
+
.loginpress-modal .loginpress-modal-body h2 {
|
70 |
+
font-size: 20px;
|
71 |
+
line-height: 1.5em;
|
72 |
+
}
|
73 |
+
.loginpress-modal .loginpress-modal-header h4 {
|
74 |
+
margin: 0;
|
75 |
+
padding: 0;
|
76 |
+
text-transform: uppercase;
|
77 |
+
font-size: 1.2em;
|
78 |
+
font-weight: bold;
|
79 |
+
color: #cacaca;
|
80 |
+
text-shadow: 1px 1px 1px #fff;
|
81 |
+
letter-spacing: 0.6px;
|
82 |
+
-webkit-font-smoothing: antialiased;
|
83 |
+
}
|
84 |
+
|
85 |
+
.loginpress-optout-spinner{
|
86 |
+
display: none;
|
87 |
+
}
|
88 |
+
</style>
|
89 |
+
|
90 |
+
|
91 |
+
<div class="loginpress-modal loginpress-modal-opt-out">
|
92 |
+
<div class="loginpress-modal-dialog">
|
93 |
+
<div class="loginpress-modal-header">
|
94 |
+
<h4><?php _e( 'Opt Out', 'loginpress' ); ?></h4>
|
95 |
+
</div>
|
96 |
+
<div class="loginpress-modal-body">
|
97 |
+
<div class="loginpress-modal-panel active">
|
98 |
+
<h2><?php _e( 'We appreciate your help in making the plugin better by letting us track some usage data.', 'loginpress' ); ?></h2>
|
99 |
+
<div class="notice notice-error inline opt-out-error-message" style="display: none;">
|
100 |
+
<p></p>
|
101 |
+
</div>
|
102 |
+
<p><?php echo sprintf( __( 'Usage tracking is done in the name of making %1$s LoginPress %2$s better. Making a better user experience, prioritizing new features, and more good things. We\'d really appreciate if you\'ll reconsider letting us continue with the tracking.', 'loginpress' ), '<strong>', '</strong>') ?></p>
|
103 |
+
<p><?php echo sprintf( __( 'By clicking "Opt Out", we will no longer be sending any data to %1$s LoginPress%2$s.', 'loginpress' ), '<a href="https://wpbrigade.com" target="_blank">', '</a>' ); ?></p>
|
104 |
+
</div>
|
105 |
+
</div>
|
106 |
+
<div class="loginpress-modal-footer">
|
107 |
+
<form class="" action="<?php echo admin_url( 'plugins.php' ) ?>" method="post">
|
108 |
+
<span class="loginpress-optout-spinner"><img src="<?php echo admin_url( '/images/spinner.gif' ); ?>" alt=""></span>
|
109 |
+
<button type='submit' name='loginpress-submit-optout' id='loginpress_optout_button' class="button button-secondary button-opt-out" tabindex="1"><?php _e( 'Opt Out', 'loginpress' ) ?></button>
|
110 |
+
<button class="button button-primary button-close" tabindex="2"><?php _e( 'On second thought - I want to continue helping', 'loginpress' ); ?></button>
|
111 |
+
</form>
|
112 |
+
</div>
|
113 |
+
</div>
|
114 |
+
</div>
|
115 |
+
|
116 |
+
|
117 |
+
|
118 |
+
<script type="text/javascript">
|
119 |
+
|
120 |
+
(function( $ ) {
|
121 |
+
|
122 |
+
$(function() {
|
123 |
+
var pluginSlug = 'loginpress';
|
124 |
+
// Code to fire when the DOM is ready.
|
125 |
+
|
126 |
+
$(document).on('click', 'tr[data-slug="' + pluginSlug + '"] .opt-out', function(e){
|
127 |
+
e.preventDefault();
|
128 |
+
$('.loginpress-modal-opt-out').addClass('active');
|
129 |
+
});
|
130 |
+
|
131 |
+
$(document).on('click', '.button-close', function(event) {
|
132 |
+
event.preventDefault();
|
133 |
+
$('.loginpress-modal-opt-out').removeClass('active');
|
134 |
+
});
|
135 |
+
|
136 |
+
$(document).on('click','#loginpress_optout_button', function(event) {
|
137 |
+
event.preventDefault();
|
138 |
+
$.ajax({
|
139 |
+
url: ajaxurl,
|
140 |
+
type: 'POST',
|
141 |
+
data: {
|
142 |
+
action: 'loginpress_optout_yes'
|
143 |
+
},
|
144 |
+
beforeSend: function(){
|
145 |
+
$(".loginpress-optout-spinner").show();
|
146 |
+
$(".loginpress-popup-allow-deactivate").attr("disabled", "disabled");
|
147 |
+
}
|
148 |
+
})
|
149 |
+
.done(function() {
|
150 |
+
$(".loginpress-optout-spinner").hide();
|
151 |
+
$('.loginpress-modal-opt-out').removeClass('active');
|
152 |
+
location.reload();
|
153 |
+
});
|
154 |
+
|
155 |
+
});
|
156 |
+
|
157 |
+
});
|
158 |
+
|
159 |
+
})( jQuery ); // This invokes the function above and allows us to use '$' in place of 'jQuery' in our code.
|
160 |
+
</script>
|
js/customize-controls.js
CHANGED
@@ -1264,6 +1264,17 @@ jQuery(document).ready(function() {
|
|
1264 |
loginpress_css_property(
|
1265 |
'loginpress_customization[message_background_color]',
|
1266 |
'.login .custom-message', 'background-color');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1267 |
// loginpress_css_property( 'loginpress_customization[google_font]', '#login', 'font-family' );
|
1268 |
|
1269 |
// wp.customize( 'loginpress_customization[google_font]', function( value ) {
|
1264 |
loginpress_css_property(
|
1265 |
'loginpress_customization[message_background_color]',
|
1266 |
'.login .custom-message', 'background-color');
|
1267 |
+
|
1268 |
+
wp.customize( 'loginpress_customization[loginpress_show_love]', function( value ) {
|
1269 |
+
value.bind( function( loginPressVal ) {
|
1270 |
+
|
1271 |
+
if ( loginPressVal == '' ) {
|
1272 |
+
$( '#customize-preview iframe' ).contents().find( '.loginpress-show-love' ).hide();
|
1273 |
+
} else {
|
1274 |
+
$( '#customize-preview iframe' ).contents().find( '.loginpress-show-love' ).show();
|
1275 |
+
}
|
1276 |
+
} );
|
1277 |
+
} );
|
1278 |
// loginpress_css_property( 'loginpress_customization[google_font]', '#login', 'font-family' );
|
1279 |
|
1280 |
// wp.customize( 'loginpress_customization[google_font]', function( value ) {
|
loginpress.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: LoginPress - Customizing the WordPress Login
|
4 |
* Plugin URI: http://www.WPBrigade.com/wordpress/plugins/loginpress/
|
5 |
* Description: LoginPress is the best <code>wp-login</code> Login Page Customizer plugin by <a href="https://wpbrigade.com/">WPBrigade</a> which allows you to completely change the layout of login, register and forgot password forms.
|
6 |
-
* Version: 1.0.
|
7 |
* Author: WPBrigade
|
8 |
* Author URI: http://www.WPBrigade.com/
|
9 |
* Text Domain: loginpress
|
@@ -22,7 +22,7 @@ if ( ! class_exists( 'LoginPress' ) ) :
|
|
22 |
/**
|
23 |
* @var string
|
24 |
*/
|
25 |
-
public $version = '1.0.
|
26 |
|
27 |
/**
|
28 |
* @var The single instance of the class
|
@@ -93,6 +93,57 @@ if ( ! class_exists( 'LoginPress' ) ) :
|
|
93 |
add_action( 'admin_init', array( $this, 'loginpress_review_notice' ) );
|
94 |
add_action( 'plugin_action_links', array( $this, 'loginpress_action_links' ), 10, 2 );
|
95 |
add_action( 'wp_ajax_loginpress_deactivate', array( $this, '_deactivate' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
}
|
97 |
|
98 |
/**
|
@@ -149,10 +200,58 @@ if ( ! class_exists( 'LoginPress' ) ) :
|
|
149 |
*/
|
150 |
public function register_options_page() {
|
151 |
|
|
|
|
|
152 |
add_theme_page( __( 'LoginPress', 'loginpress' ), __( 'LoginPress', 'loginpress' ), 'manage_options', "abw", '__return_null' );
|
153 |
}
|
154 |
|
155 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
public function _loginpress_settings() {
|
157 |
|
158 |
if ( isset( $_GET['get-premium'] ) && 'loginpress' == $_GET['get-premium'] ) {
|
@@ -193,6 +292,7 @@ if ( ! class_exists( 'LoginPress' ) ) :
|
|
193 |
}
|
194 |
|
195 |
include LOGINPRESS_DIR_PATH . 'include/deactivate_modal.php';
|
|
|
196 |
}
|
197 |
|
198 |
function _deactivate() {
|
@@ -236,8 +336,7 @@ if ( ! class_exists( 'LoginPress' ) ) :
|
|
236 |
'blocking' => false,
|
237 |
'headers' => array(),
|
238 |
'body' => $fields,
|
239 |
-
)
|
240 |
-
);
|
241 |
|
242 |
// if ( is_wp_error( $response ) ) {
|
243 |
// $error_message = $response->get_error_message();
|
@@ -284,10 +383,10 @@ if ( ! class_exists( 'LoginPress' ) ) :
|
|
284 |
|
285 |
static function plugin_uninstallation() {
|
286 |
|
287 |
-
$_loginpress_Setting = get_option( 'loginpress_setting' );
|
288 |
-
if ( ! isset( $_loginpress_Setting['tracking_anonymous'] ) || 'off' == $_loginpress_Setting['tracking_anonymous'] ) {
|
289 |
-
|
290 |
-
}
|
291 |
|
292 |
$email = get_option( 'admin_email' );
|
293 |
|
@@ -446,7 +545,15 @@ if ( ! class_exists( 'LoginPress' ) ) :
|
|
446 |
if ( $file == $this_plugin ) {
|
447 |
|
448 |
$settings_link = sprintf( esc_html__( '%1$s Settings %2$s | %3$s Customize %4$s', 'loginpress' ), '<a href="' . admin_url( 'admin.php?page=loginpress-settings' ) . '">', '</a>', '<a href="' . admin_url( 'admin.php?page=loginpress' ) . '">', '</a>' );
|
449 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
450 |
|
451 |
if ( ! has_action( 'loginpress_pro_add_template' ) ) :
|
452 |
$pro_link = sprintf( esc_html__( '%1$s %3$s Upgrade Pro %4$s %2$s', 'loginpress' ), '<a href="https://wpbrigade.com/wordpress/plugins/loginpress-pro/?utm_source=loginpress-lite&utm_medium=plugin-action-link&utm_campaign=pro-upgrade" target="_blank">', '</a>', '<span class="loginpress-dasboard-pro-link">', '</span>' );
|
@@ -491,8 +598,6 @@ if (!class_exists('TAV_Remote_Notification_Client')) {
|
|
491 |
}
|
492 |
$notification = new TAV_Remote_Notification_Client( 125, '16765c0902705d62', 'http://wpbrigade.com?post_type=notification' );
|
493 |
|
494 |
-
register_activation_hook( __FILE__, array( 'LoginPress', 'plugin_activation' ) );
|
495 |
register_uninstall_hook( __FILE__, array( 'LoginPress', 'plugin_uninstallation' ) );
|
496 |
-
|
497 |
-
|
498 |
?>
|
3 |
* Plugin Name: LoginPress - Customizing the WordPress Login
|
4 |
* Plugin URI: http://www.WPBrigade.com/wordpress/plugins/loginpress/
|
5 |
* Description: LoginPress is the best <code>wp-login</code> Login Page Customizer plugin by <a href="https://wpbrigade.com/">WPBrigade</a> which allows you to completely change the layout of login, register and forgot password forms.
|
6 |
+
* Version: 1.0.15
|
7 |
* Author: WPBrigade
|
8 |
* Author URI: http://www.WPBrigade.com/
|
9 |
* Text Domain: loginpress
|
22 |
/**
|
23 |
* @var string
|
24 |
*/
|
25 |
+
public $version = '1.0.15';
|
26 |
|
27 |
/**
|
28 |
* @var The single instance of the class
|
93 |
add_action( 'admin_init', array( $this, 'loginpress_review_notice' ) );
|
94 |
add_action( 'plugin_action_links', array( $this, 'loginpress_action_links' ), 10, 2 );
|
95 |
add_action( 'wp_ajax_loginpress_deactivate', array( $this, '_deactivate' ) );
|
96 |
+
|
97 |
+
|
98 |
+
add_action( 'admin_init', array( $this, 'redirect_optin' ) );
|
99 |
+
add_action( 'wp_ajax_loginpress_optout_yes', array( $this, 'optout_yes' ) );
|
100 |
+
}
|
101 |
+
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Opt-out
|
105 |
+
*
|
106 |
+
* @since 1.0.15
|
107 |
+
*/
|
108 |
+
function optout_yes() {
|
109 |
+
update_option( '_loginpress_optin', 'no' );
|
110 |
+
wp_die();
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Redirect to Optin page.
|
115 |
+
*
|
116 |
+
* @since 1.0.15
|
117 |
+
*/
|
118 |
+
function redirect_optin() {
|
119 |
+
|
120 |
+
// delete_option( '_loginpress_optin' );
|
121 |
+
|
122 |
+
if ( isset( $_POST['loginpress-submit-optout'] ) ) {
|
123 |
+
|
124 |
+
update_option( '_loginpress_optin', 'no' );
|
125 |
+
$this->_send_data( array(
|
126 |
+
'action' => 'Skip',
|
127 |
+
) );
|
128 |
+
|
129 |
+
} elseif ( isset( $_POST['loginpress-submit-optin'] ) ) {
|
130 |
+
|
131 |
+
update_option( '_loginpress_optin', 'yes' );
|
132 |
+
$fields = array(
|
133 |
+
'action' => 'Activate',
|
134 |
+
'track_mailchimp' => 'yes'
|
135 |
+
);
|
136 |
+
$this->_send_data( $fields );
|
137 |
+
|
138 |
+
} elseif ( ! get_option( '_loginpress_optin' ) && isset( $_GET['page'] ) && ( $_GET['page'] === 'loginpress-settings' || $_GET['page'] === 'loginpress' || $_GET['page'] === 'abw' ) ) {
|
139 |
+
|
140 |
+
wp_redirect( admin_url('admin.php?page=loginpress-optin&redirect-page=' . $_GET['page'] ) );
|
141 |
+
exit;
|
142 |
+
} elseif ( get_option( '_loginpress_optin' ) && ( get_option( '_loginpress_optin' ) == 'yes' || get_option( '_loginpress_optin' ) == 'no' ) && isset( $_GET['page'] ) && $_GET['page'] === 'loginpress-optin' ) {
|
143 |
+
|
144 |
+
wp_redirect( admin_url( 'admin.php?page=loginpress-settings' ) );
|
145 |
+
exit;
|
146 |
+
}
|
147 |
}
|
148 |
|
149 |
/**
|
200 |
*/
|
201 |
public function register_options_page() {
|
202 |
|
203 |
+
add_submenu_page( null, __( 'Activate', 'loginpress' ), __( 'Activate', 'loginpress' ), 'manage_options', 'loginpress-optin', array( $this, 'render_optin' ) );
|
204 |
+
|
205 |
add_theme_page( __( 'LoginPress', 'loginpress' ), __( 'LoginPress', 'loginpress' ), 'manage_options', "abw", '__return_null' );
|
206 |
}
|
207 |
|
208 |
|
209 |
+
/**
|
210 |
+
* Show Opt-in Page.
|
211 |
+
*
|
212 |
+
* @since 1.0.15
|
213 |
+
*/
|
214 |
+
function render_optin() {
|
215 |
+
include LOGINPRESS_DIR_PATH . 'include/loginpress-optin-form.php';
|
216 |
+
}
|
217 |
+
|
218 |
+
/**
|
219 |
+
* Wrapper function to send data.
|
220 |
+
* @param [arrays] $args.
|
221 |
+
*
|
222 |
+
* @since 1.0.15
|
223 |
+
*
|
224 |
+
*/
|
225 |
+
function _send_data( $args ) {
|
226 |
+
|
227 |
+
$cuurent_user = wp_get_current_user();
|
228 |
+
$fields = array(
|
229 |
+
'email' => get_option( 'admin_email' ),
|
230 |
+
'website' => get_site_url(),
|
231 |
+
'action' => '',
|
232 |
+
'reason' => '',
|
233 |
+
'reason_detail' => '',
|
234 |
+
'display_name' => $cuurent_user->display_name,
|
235 |
+
'blog_language' => get_bloginfo( 'language' ),
|
236 |
+
'wordpress_version' => get_bloginfo( 'version' ),
|
237 |
+
'plugin_version' => LOGINPRESS_VERSION,
|
238 |
+
'plugin_name' => 'LoginPress Free',
|
239 |
+
);
|
240 |
+
|
241 |
+
$args = array_merge( $fields, $args );
|
242 |
+
$response = wp_remote_post( LOGINPRESS_FEEDBACK_SERVER, array(
|
243 |
+
'method' => 'POST',
|
244 |
+
'timeout' => 5,
|
245 |
+
'httpversion' => '1.0',
|
246 |
+
'blocking' => true,
|
247 |
+
'headers' => array(),
|
248 |
+
'body' => $args,
|
249 |
+
) );
|
250 |
+
|
251 |
+
// echo '<pre>'; print_r( $args ); echo '</pre>';
|
252 |
+
|
253 |
+
}
|
254 |
+
|
255 |
public function _loginpress_settings() {
|
256 |
|
257 |
if ( isset( $_GET['get-premium'] ) && 'loginpress' == $_GET['get-premium'] ) {
|
292 |
}
|
293 |
|
294 |
include LOGINPRESS_DIR_PATH . 'include/deactivate_modal.php';
|
295 |
+
include LOGINPRESS_DIR_PATH . 'include/loginpress-optout-form.php';
|
296 |
}
|
297 |
|
298 |
function _deactivate() {
|
336 |
'blocking' => false,
|
337 |
'headers' => array(),
|
338 |
'body' => $fields,
|
339 |
+
) );
|
|
|
340 |
|
341 |
// if ( is_wp_error( $response ) ) {
|
342 |
// $error_message = $response->get_error_message();
|
383 |
|
384 |
static function plugin_uninstallation() {
|
385 |
|
386 |
+
// $_loginpress_Setting = get_option( 'loginpress_setting' );
|
387 |
+
// if ( ! isset( $_loginpress_Setting['tracking_anonymous'] ) || 'off' == $_loginpress_Setting['tracking_anonymous'] ) {
|
388 |
+
// return;
|
389 |
+
// }
|
390 |
|
391 |
$email = get_option( 'admin_email' );
|
392 |
|
545 |
if ( $file == $this_plugin ) {
|
546 |
|
547 |
$settings_link = sprintf( esc_html__( '%1$s Settings %2$s | %3$s Customize %4$s', 'loginpress' ), '<a href="' . admin_url( 'admin.php?page=loginpress-settings' ) . '">', '</a>', '<a href="' . admin_url( 'admin.php?page=loginpress' ) . '">', '</a>' );
|
548 |
+
|
549 |
+
|
550 |
+
if( 'yes' == get_option( '_loginpress_optin' ) ){
|
551 |
+
$settings_link .= sprintf( esc_html__( ' | %1$s Opt Out %2$s ', 'loginpress'), '<a class="opt-out" href="' . admin_url( 'admin.php?page=loginpress-settings' ) . '">', '</a>' );
|
552 |
+
} else {
|
553 |
+
$settings_link .= sprintf( esc_html__( ' | %1$s Opt In %2$s ', 'loginpress'), '<a href="' . admin_url( 'admin.php?page=loginpress-optin&redirect-page=' .'loginpress-settings' ) . '">', '</a>' );
|
554 |
+
}
|
555 |
+
|
556 |
+
array_unshift( $links, $settings_link );
|
557 |
|
558 |
if ( ! has_action( 'loginpress_pro_add_template' ) ) :
|
559 |
$pro_link = sprintf( esc_html__( '%1$s %3$s Upgrade Pro %4$s %2$s', 'loginpress' ), '<a href="https://wpbrigade.com/wordpress/plugins/loginpress-pro/?utm_source=loginpress-lite&utm_medium=plugin-action-link&utm_campaign=pro-upgrade" target="_blank">', '</a>', '<span class="loginpress-dasboard-pro-link">', '</span>' );
|
598 |
}
|
599 |
$notification = new TAV_Remote_Notification_Client( 125, '16765c0902705d62', 'http://wpbrigade.com?post_type=notification' );
|
600 |
|
601 |
+
// register_activation_hook( __FILE__, array( 'LoginPress', 'plugin_activation' ) );
|
602 |
register_uninstall_hook( __FILE__, array( 'LoginPress', 'plugin_uninstallation' ) );
|
|
|
|
|
603 |
?>
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tested up to: 4.7
|
|
4 |
Contributors: WPBrigade, hiddenpearls, AbdulWahab610
|
5 |
Author URI: https://wpbrigade.com
|
6 |
Tags: wp-login, custom wp-login, login customizer, custom login, custom login logo, login customizer, custom login page, login error, login page style, loginpress
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -163,6 +163,11 @@ Please visit <a target="_blank" rel="friend" href="http://www.WPBrigade.com/word
|
|
163 |
|
164 |
== Changelog ==
|
165 |
|
|
|
|
|
|
|
|
|
|
|
166 |
= 1.0.14 - 2017-04-29 =
|
167 |
* Bugfix: Backgrounds and Colors for pre-defined tempalates.
|
168 |
* Enhancement: Code cleanup
|
@@ -223,5 +228,5 @@ Please visit <a target="_blank" rel="friend" href="http://www.WPBrigade.com/word
|
|
223 |
|
224 |
== Upgrade Notice ==
|
225 |
|
226 |
-
= 1.0.
|
227 |
* Important release, Please upgrade immediately.
|
4 |
Contributors: WPBrigade, hiddenpearls, AbdulWahab610
|
5 |
Author URI: https://wpbrigade.com
|
6 |
Tags: wp-login, custom wp-login, login customizer, custom login, custom login logo, login customizer, custom login page, login error, login page style, loginpress
|
7 |
+
Stable tag: 1.0.15
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
163 |
|
164 |
== Changelog ==
|
165 |
|
166 |
+
= 1.0.15 - 2017-05-31 =
|
167 |
+
* Enhancement: opt-in for plugin users.
|
168 |
+
* Enhancement: Add footer link through customizer.
|
169 |
+
* Enhancement: Code cleanup
|
170 |
+
|
171 |
= 1.0.14 - 2017-04-29 =
|
172 |
* Bugfix: Backgrounds and Colors for pre-defined tempalates.
|
173 |
* Enhancement: Code cleanup
|
228 |
|
229 |
== Upgrade Notice ==
|
230 |
|
231 |
+
= 1.0.15 =
|
232 |
* Important release, Please upgrade immediately.
|