4
4
/**
5
5
* Class Shapely_Notify_System
6
6
*/
7
- class Shapely_Notify_System {
7
+ class Shapely_Notify_System extends Epsilon_Notify_System {
8
8
/**
9
9
* @param $ver
10
10
*
@@ -108,8 +108,8 @@ public static function shapely_check_plugin_is_active( $slug ) {
108
108
public static function shapely_has_plugin ( $ slug = null ) {
109
109
110
110
$ check = array (
111
- 'installed ' => self ::shapely_check_plugin_is_installed ( $ slug ),
112
- 'active ' => self ::shapely_check_plugin_is_active ( $ slug ),
111
+ 'installed ' => self ::check_plugin_is_installed ( $ slug ),
112
+ 'active ' => self ::check_plugin_is_active ( $ slug ),
113
113
);
114
114
115
115
if ( ! $ check ['installed ' ] || ! $ check ['active ' ] ) {
@@ -120,12 +120,12 @@ public static function shapely_has_plugin( $slug = null ) {
120
120
}
121
121
122
122
public static function shapely_companion_title () {
123
- $ installed = self ::shapely_check_plugin_is_installed ( 'shapely-companion ' );
123
+ $ installed = self ::check_plugin_is_installed ( 'shapely-companion ' );
124
124
if ( ! $ installed ) {
125
125
return esc_html__ ( 'Install: Shapely Companion Plugin ' , 'shapely ' );
126
126
}
127
127
128
- $ active = self ::shapely_check_plugin_is_active ( 'shapely-companion ' );
128
+ $ active = self ::check_plugin_is_active ( 'shapely-companion ' );
129
129
if ( $ installed && ! $ active ) {
130
130
return esc_html__ ( 'Activate: Shapely Companion Plugin ' , 'shapely ' );
131
131
}
@@ -134,12 +134,12 @@ public static function shapely_companion_title() {
134
134
}
135
135
136
136
public static function shapely_yoast_title () {
137
- $ installed = self ::shapely_check_plugin_is_installed ( 'wordpress-seo ' );
137
+ $ installed = self ::check_plugin_is_installed ( 'wordpress-seo ' );
138
138
if ( ! $ installed ) {
139
139
return esc_html__ ( 'Install: Yoast SEO Plugin ' , 'shapely ' );
140
140
}
141
141
142
- $ active = self ::shapely_check_plugin_is_active ( 'wordpress-seo ' );
142
+ $ active = self ::check_plugin_is_active ( 'wordpress-seo ' );
143
143
if ( $ installed && ! $ active ) {
144
144
return esc_html__ ( 'Activate: Yoast SEO Plugin ' , 'shapely ' );
145
145
}
@@ -148,30 +148,44 @@ public static function shapely_yoast_title() {
148
148
}
149
149
150
150
public static function shapely_jetpack_title () {
151
- $ installed = self ::shapely_check_plugin_is_installed ( 'jetpack ' );
151
+ $ installed = self ::check_plugin_is_installed ( 'jetpack ' );
152
152
if ( ! $ installed ) {
153
153
return esc_html__ ( 'Install: Jetpack by WordPress ' , 'shapely ' );
154
154
}
155
155
156
- $ active = self ::shapely_check_plugin_is_active ( 'jetpack ' );
156
+ $ active = self ::check_plugin_is_active ( 'jetpack ' );
157
157
if ( $ installed && ! $ active ) {
158
158
return esc_html__ ( 'Activate: Jetpack by WordPress ' , 'shapely ' );
159
159
}
160
160
161
161
return esc_html__ ( 'Install: Jetpack by WordPress ' , 'shapely ' );
162
162
}
163
163
164
+ public static function shapely_cf7_title () {
165
+ $ installed = self ::check_plugin_is_installed ( 'contac-form-7 ' );
166
+ if ( ! $ installed ) {
167
+ return esc_html__ ( 'Install: Contact Form 7 ' , 'shapely ' );
168
+ }
169
+
170
+ $ active = self ::check_plugin_is_active ( 'contac-form-7 ' );
171
+ if ( $ installed && ! $ active ) {
172
+ return esc_html__ ( 'Activate: Contact Form 7 ' , 'shapely ' );
173
+ }
174
+
175
+ return esc_html__ ( 'Install: Contact Form 7 ' , 'shapely ' );
176
+ }
177
+
164
178
/**
165
179
* @return string
166
180
*/
167
181
public static function shapely_companion_description () {
168
- $ installed = self ::shapely_check_plugin_is_installed ( 'shapely-companion ' );
182
+ $ installed = self ::check_plugin_is_installed ( 'shapely-companion ' );
169
183
170
184
if ( ! $ installed ) {
171
185
return esc_html__ ( 'Please install Shapely Companion plugin. ' , 'shapely ' );
172
186
}
173
187
174
- $ active = self ::shapely_check_plugin_is_active ( 'shapely-companion ' );
188
+ $ active = self ::check_plugin_is_active ( 'shapely-companion ' );
175
189
if ( $ installed && ! $ active ) {
176
190
return esc_html__ ( 'Please activate Shapely Companion plugin. ' , 'shapely ' );
177
191
}
@@ -183,27 +197,42 @@ public static function shapely_companion_description() {
183
197
* @return string
184
198
*/
185
199
public static function shapely_jetpack_description () {
186
- $ installed = self ::shapely_check_plugin_is_installed ( 'jetpack ' );
200
+ $ installed = self ::check_plugin_is_installed ( 'jetpack ' );
187
201
188
202
if ( ! $ installed ) {
189
203
return esc_html__ ( 'Please install Jetpack by WordPress. Note that you won \'t be able to use the Testimonials and Portfolio widgets without it. ' , 'shapely ' );
190
204
}
191
205
192
- $ active = self ::shapely_check_plugin_is_active ( 'jetpack ' );
206
+ $ active = self ::check_plugin_is_active ( 'jetpack ' );
193
207
if ( $ installed && ! $ active ) {
194
208
return esc_html__ ( 'Please activate Jetpack by WordPress. Note that you won \'t be able to use the Testimonials and Portfolio widgets without it. ' , 'shapely ' );
195
209
}
196
210
197
211
return esc_html__ ( 'Please install Jetpack by WordPress. Note that you won \'t be able to use the Testimonials and Portfolio widgets without it. ' , 'shapely ' );
198
212
}
199
213
214
+ public static function shapely_cf7_description () {
215
+ $ installed = self ::check_plugin_is_installed ( 'contac-form-7 ' );
216
+
217
+ if ( ! $ installed ) {
218
+ return esc_html__ ( 'Please install Contact Form 7. Note that you won \'t be able to use Contact widget without it. ' , 'shapely ' );
219
+ }
220
+
221
+ $ active = self ::check_plugin_is_active ( 'contac-form-7 ' );
222
+ if ( $ installed && ! $ active ) {
223
+ return esc_html__ ( 'Please activate Contact Form 7. Note that you won \'t be able to use Contact widget without it. ' , 'shapely ' );
224
+ }
225
+
226
+ return esc_html__ ( 'Please install Contact Form 7. Note that you won \'t be able to use Contact widget without it. ' , 'shapely ' );
227
+ }
228
+
200
229
public static function shapely_yoast_description () {
201
- $ installed = self ::shapely_check_plugin_is_installed ( 'wordpress-seo ' );
230
+ $ installed = self ::check_plugin_is_installed ( 'wordpress-seo ' );
202
231
if ( ! $ installed ) {
203
232
return esc_html__ ( 'Please install Yoast SEO plugin. ' , 'shapely ' );
204
233
}
205
234
206
- $ active = self ::shapely_check_plugin_is_active ( 'wordpress-seo ' );
235
+ $ active = self ::check_plugin_is_active ( 'wordpress-seo ' );
207
236
if ( $ installed && ! $ active ) {
208
237
return esc_html__ ( 'Please activate Yoast SEO plugin. ' , 'shapely ' );
209
238
}
0 commit comments