forked from UMR7320/cnrswebkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sidebar-content-bottom.php
49 lines (45 loc) · 1.61 KB
/
sidebar-content-bottom.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
/**
* The template for the content bottom widget areas on posts and pages
*
* @package Atos
* @subpackage CNRS_Web_Kit
* @since CNRS Web Kit 0.3
*/
if (!is_active_sidebar('sidebar-2') && !is_active_sidebar('sidebar-3')) {
return;
}
// If we get this far, we have widgets. Let's do this.
global $cnrs_global_params;
if ($cnrs_global_params->field('newsletter_sur_la_page_daccueil')) {
// include for is_plugin_active which is an admin only function
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
}
if ($cnrs_global_params->field('newsletter_sur_la_page_daccueil') && is_plugin_active('newsletter') ) {
?>
<!-- Start Actus Widget -->
<div id="NewsletterRegistration">Tenez-vous au courant de l'actualité
<span id="NewsletterResult"></span>
<div>
<form method="post" action="?na=s" onsubmit="return newsletter_check(this)">
<input type="email" placeholder="Adresse E-mail" name="ne" required />
<button type="submit">inscription</button>
</form>
</div>
</div>
<?php
}
?>
<!-- End Actus Widget -->
<aside id="content-bottom-widgets" class="content-bottom-widgets" role="complementary">
<?php if (is_active_sidebar('sidebar-2')) : ?>
<div class="widget-area">
<?php dynamic_sidebar('sidebar-2'); ?>
</div><!-- .widget-area -->
<?php endif; ?>
<?php if (is_active_sidebar('sidebar-3')) : ?>
<div class="widget-area">
<?php dynamic_sidebar('sidebar-3'); ?>
</div><!-- .widget-area -->
<?php endif; ?>
</aside><!-- .content-bottom-widgets -->