Version Description
- Fixed bug Google Analytics
- Fixed bug link dashboard
Download this release
Release Info
Developer | Florent73 |
Plugin | WP Maintenance |
Version | 5.0.5 |
Comparing to | |
See all releases |
Code changes from version 5.0.4 to 5.0.5
- includes/functions.php +1 -1
- includes/shortcodes.php +28 -27
- readme.txt +6 -2
- themes/default/functions.php +9 -7
- wp-maintenance.php +2 -2
includes/functions.php
CHANGED
@@ -175,7 +175,7 @@ function wpm_footer() {
|
|
175 |
|
176 |
$wpmFooter = '
|
177 |
<div style="margin-top:40px;">
|
178 |
-
<a href="https://
|
179 |
</div>
|
180 |
';
|
181 |
|
175 |
|
176 |
$wpmFooter = '
|
177 |
<div style="margin-top:40px;">
|
178 |
+
<a href="https://madeby.restezconnectes.fr" target="_blank">'.__('WP Maintenance','wp-maintenance').' (v.'.WPM_VERSION.')</a> '.__('is brought to you by','wp-maintenance').' <a href="https://restezconnectes.fr/" target="_blank">Restez Connectés</a> - '.__('If you found this plugin useful','wp-maintenance').' <a href="https://wordpress.org/support/view/plugin-reviews/wp-maintenance" target="_blank">'.__('give it 5 ★ on WordPress.org','wp-maintenance').'</a>
|
179 |
</div>
|
180 |
';
|
181 |
|
includes/shortcodes.php
CHANGED
@@ -3,40 +3,41 @@
|
|
3 |
defined( 'ABSPATH' )
|
4 |
or die( 'No direct load ! ' );
|
5 |
|
6 |
-
function wpm_analytics_shortcode( $atts ) {
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
$nameServer = '';
|
12 |
-
if( isset($_SERVER['SERVER_NAME']) ) {
|
13 |
-
$nameServer = $_SERVER['SERVER_NAME'];
|
14 |
-
}
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
<script async src=\"https://www.googletagmanager.com/gtag/js?id=".$code."\"></script>
|
28 |
<script>
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
|
33 |
-
|
34 |
</script>";
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
38 |
}
|
39 |
-
}
|
40 |
add_shortcode( 'wpm_analytics', 'wpm_analytics_shortcode' );
|
41 |
|
42 |
function wpm_social_shortcode( $atts ) {
|
3 |
defined( 'ABSPATH' )
|
4 |
or die( 'No direct load ! ' );
|
5 |
|
6 |
+
function wpm_analytics_shortcode( $atts ) {
|
7 |
|
8 |
+
if(get_option('wp_maintenance_settings')) { extract(get_option('wp_maintenance_settings')); }
|
9 |
+
$paramMMode = get_option('wp_maintenance_settings');
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
+
$nameServer = '';
|
12 |
+
if( isset($_SERVER['SERVER_NAME']) ) {
|
13 |
+
$nameServer = $_SERVER['SERVER_NAME'];
|
14 |
+
}
|
15 |
+
|
16 |
+
// Attributes
|
17 |
+
extract( shortcode_atts(
|
18 |
+
array(
|
19 |
+
'enable' => 0,
|
20 |
+
'code' => $paramMMode['code_analytics'],
|
21 |
+
'domain' => ''.$nameServer.''
|
22 |
+
), $atts )
|
23 |
+
);
|
24 |
+
|
25 |
+
if( isset($code) && $code!='') {
|
26 |
+
return "
|
27 |
+
<!-- Global site tag (gtag.js) - Google Analytics -->
|
28 |
<script async src=\"https://www.googletagmanager.com/gtag/js?id=".$code."\"></script>
|
29 |
<script>
|
30 |
+
window.dataLayer = window.dataLayer || [];
|
31 |
+
function gtag(){dataLayer.push(arguments)};
|
32 |
+
gtag('js', new Date());
|
33 |
|
34 |
+
gtag('config', ".$code.");
|
35 |
</script>";
|
36 |
+
} else {
|
37 |
+
// Code
|
38 |
+
return '<!-- no analytics -->';
|
39 |
+
}
|
40 |
}
|
|
|
41 |
add_shortcode( 'wpm_analytics', 'wpm_analytics_shortcode' );
|
42 |
|
43 |
function wpm_social_shortcode( $atts ) {
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: Florent73
|
|
3 |
Donate link: https://wpmaintenance.info/a-propos/
|
4 |
Tags: Maintenance, Construction, Launch, Coming soon
|
5 |
Requires at least: 3.0
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 5.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -67,6 +67,10 @@ You can translate WP Maintenance on [__translate.wordpress.org__](https://transl
|
|
67 |
|
68 |
== Changelog ==
|
69 |
|
|
|
|
|
|
|
|
|
70 |
= 5.0.4 =
|
71 |
* Add separete for countdown
|
72 |
* Fixed bug authorize pages ID
|
3 |
Donate link: https://wpmaintenance.info/a-propos/
|
4 |
Tags: Maintenance, Construction, Launch, Coming soon
|
5 |
Requires at least: 3.0
|
6 |
+
Tested up to: 5.3
|
7 |
+
Stable tag: 5.0.5
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
67 |
|
68 |
== Changelog ==
|
69 |
|
70 |
+
= 5.0.5 =
|
71 |
+
* Fixed bug Google Analytics
|
72 |
+
* Fixed bug link dashboard
|
73 |
+
|
74 |
= 5.0.4 =
|
75 |
* Add separete for countdown
|
76 |
* Fixed bug authorize pages ID
|
themes/default/functions.php
CHANGED
@@ -55,7 +55,7 @@ function wpm_copyrights() {
|
|
55 |
$output = stripslashes($o['text_bt_maintenance']);
|
56 |
}
|
57 |
if( (isset($o['add_wplogin']) && $o['add_wplogin']==1) && (isset($o['add_wplogin_title']) && $o['add_wplogin_title']!='') ) {
|
58 |
-
$output .= '<br /><br
|
59 |
|
60 |
}
|
61 |
|
@@ -321,10 +321,10 @@ function wpm_analytics() {
|
|
321 |
if(get_option('wp_maintenance_settings')) { extract(get_option('wp_maintenance_settings')); }
|
322 |
$o = get_option('wp_maintenance_settings');
|
323 |
|
324 |
-
$output = '';
|
325 |
|
326 |
-
if( isset($o['
|
327 |
-
$output = do_shortcode('[wpm_analytics enable="'.$o['
|
328 |
}
|
329 |
|
330 |
return $output;
|
@@ -370,8 +370,6 @@ function wpm_stylenewsletter() {
|
|
370 |
|
371 |
$output = '';
|
372 |
|
373 |
-
$output = " /* no NEWLETTER Style */ ";
|
374 |
-
|
375 |
if( empty($o['color_field_text']) ) { $o['color_field_text'] = '#333333'; }
|
376 |
if( empty($o['color_text_button']) ) { $o['color_text_button']= '#ffffff'; }
|
377 |
if( empty($o['color_field_background']) ) { $o['color_field_background']= '#F1F1F1'; }
|
@@ -400,7 +398,11 @@ function wpm_stylenewsletter() {
|
|
400 |
|
401 |
}
|
402 |
|
403 |
-
|
|
|
|
|
|
|
|
|
404 |
}
|
405 |
|
406 |
function wpm_newsletter() {
|
55 |
$output = stripslashes($o['text_bt_maintenance']);
|
56 |
}
|
57 |
if( (isset($o['add_wplogin']) && $o['add_wplogin']==1) && (isset($o['add_wplogin_title']) && $o['add_wplogin_title']!='') ) {
|
58 |
+
$output .= '<br /><br /><a href="'.get_admin_url().'">'.str_replace('%DASHBOARD%', '--'.__('Dashboard', 'wp-maintenance'), $o['add_wplogin_title']).'</a>';
|
59 |
|
60 |
}
|
61 |
|
321 |
if(get_option('wp_maintenance_settings')) { extract(get_option('wp_maintenance_settings')); }
|
322 |
$o = get_option('wp_maintenance_settings');
|
323 |
|
324 |
+
$output = '<!-- analytics ici '.$o['code_analytics'].' -->';
|
325 |
|
326 |
+
if( isset($o['code_analytics']) && $o['code_analytics']!='') {
|
327 |
+
$output = do_shortcode('[wpm_analytics enable="'.$o['code_analytics'].'"]');
|
328 |
}
|
329 |
|
330 |
return $output;
|
370 |
|
371 |
$output = '';
|
372 |
|
|
|
|
|
373 |
if( empty($o['color_field_text']) ) { $o['color_field_text'] = '#333333'; }
|
374 |
if( empty($o['color_text_button']) ) { $o['color_text_button']= '#ffffff'; }
|
375 |
if( empty($o['color_field_background']) ) { $o['color_field_background']= '#F1F1F1'; }
|
398 |
|
399 |
}
|
400 |
|
401 |
+
if( isset($output) && $output!='' ) {
|
402 |
+
return '<style type="text/css">'.$output.'</style>';
|
403 |
+
} else {
|
404 |
+
return;
|
405 |
+
}
|
406 |
}
|
407 |
|
408 |
function wpm_newsletter() {
|
wp-maintenance.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: The WP Maintenance plugin allows you to put your website on the waiting time for you to do maintenance or launch your website. Personalize this page with picture, countdown...
|
6 |
* Author: Florent Maillefaud
|
7 |
* Author URI: https://wpmaintenance.info
|
8 |
-
* Version: 5.0.
|
9 |
* Text Domain: wp-maintenance
|
10 |
* Domain Path: /languages/
|
11 |
*/
|
@@ -36,7 +36,7 @@ define( 'WPM_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
|
36 |
define( 'WPM_PLUGIN_URL', plugins_url().'/'.strtolower('wp-maintenance').'/');
|
37 |
define( 'WPM_ICONS_URL', plugins_url().'/'.strtolower('wp-maintenance').'/socialicons/');
|
38 |
|
39 |
-
if( !defined( 'WPM_VERSION' )) { define( 'WPM_VERSION', '5.0.
|
40 |
|
41 |
require WPM_DIR . 'classes/wp-maintenance.php';
|
42 |
require WPM_DIR . 'classes/slider.php';
|
5 |
* Description: The WP Maintenance plugin allows you to put your website on the waiting time for you to do maintenance or launch your website. Personalize this page with picture, countdown...
|
6 |
* Author: Florent Maillefaud
|
7 |
* Author URI: https://wpmaintenance.info
|
8 |
+
* Version: 5.0.5
|
9 |
* Text Domain: wp-maintenance
|
10 |
* Domain Path: /languages/
|
11 |
*/
|
36 |
define( 'WPM_PLUGIN_URL', plugins_url().'/'.strtolower('wp-maintenance').'/');
|
37 |
define( 'WPM_ICONS_URL', plugins_url().'/'.strtolower('wp-maintenance').'/socialicons/');
|
38 |
|
39 |
+
if( !defined( 'WPM_VERSION' )) { define( 'WPM_VERSION', '5.0.5' ); }
|
40 |
|
41 |
require WPM_DIR . 'classes/wp-maintenance.php';
|
42 |
require WPM_DIR . 'classes/slider.php';
|