FEATURE Handling activity report feature
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
8b9f0a8b2c
commit
13c77accbb
|
|
@ -10,6 +10,7 @@ require_once(__DIR__ . '/includes/utilities.php');
|
|||
require_once(__DIR__ . '/includes/nawalker_fction.php');
|
||||
require_once(__DIR__ . '/includes/social-networks.php');
|
||||
require_once(__DIR__ . '/includes/forms.php');
|
||||
require_once(__DIR__ . '/includes/rapport-activites.php');
|
||||
|
||||
|
||||
// require_once(__DIR__ . '/includes/widget.php');
|
||||
|
|
|
|||
25
includes/rapport-activites.php
Normal file
25
includes/rapport-activites.php
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
/* ----------------------------------------------------------------
|
||||
##### OPTIONS PAGE RAPPORT D'ACTIVITES CPT
|
||||
------------------------------------------------------------------*/
|
||||
add_action('acf/init', 'carhop_register_rapport_activites_options_page');
|
||||
function carhop_register_rapport_activites_options_page()
|
||||
{
|
||||
// Limite au site Dynamiques (où le CPT "revues" est enregistré)
|
||||
$current_site = get_current_blog_id();
|
||||
if ($current_site !== 1) return;
|
||||
|
||||
acf_add_options_sub_page(array(
|
||||
'page_title' => __('Rapport d\'activités', 'carhop'),
|
||||
'menu_title' => __('Rapport d\'activités', 'carhop'),
|
||||
'parent_slug' => 'options-general.php',
|
||||
'menu_slug' => 'rapport-activites-options',
|
||||
'capability' => 'manage_options',
|
||||
'redirect' => false,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -30,13 +30,19 @@
|
|||
</p>
|
||||
</li>
|
||||
<li class="activity-report">
|
||||
<?php
|
||||
switch_to_blog(1);
|
||||
$rapport_activites = get_field('activity_report', 'option');
|
||||
restore_current_blog();
|
||||
?>
|
||||
<h3 class="section-title">Rapport d’activité</h3>
|
||||
<p>
|
||||
<a href="mailto:info@carhop.be">info@carhop.be</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="tel:+3267485861">+32 67 48 58 61</a>
|
||||
</p>
|
||||
|
||||
<a class="cta cta--classic cta--has-icon cta--rounded cta--download-pdf " href="<?php echo $rapport_activites['url']; ?>" target="_blank">
|
||||
<img class="icon" src="<?php echo get_template_directory_uri(); ?>/resources/img/icons/carhop-fleche-telecharger.svg" alt="">
|
||||
<span class="sr-only">Télécharger le</span>PDF
|
||||
</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="siege-social">
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user