-
Notifications
You must be signed in to change notification settings - Fork 0
/
single-kino-admin.php
47 lines (31 loc) · 904 Bytes
/
single-kino-admin.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
<?php
/**
* Tempalate for Kino Admin post type
*
* Based on Pages
*
* @package Wordpress
* @subpackage Kleo
* @since Kleo 1.0
*/
get_header(); ?>
<?php get_template_part('page-parts/general-title-section'); ?>
<?php get_template_part('page-parts/general-before-wrap'); ?>
<?php if ( have_posts() ) : ?>
<?php
// Start the Loop.
while ( have_posts() ) : the_post();
?>
<?php
// Test conditionnel pour include un template spécifique
// Accessible pour: Editor ou Administrator
if ( current_user_can( 'publish_pages' ) ) {
get_template_part( 'kino-admin/' . $post->post_name );
} else {
echo '<h3>Désolé, l’accès à cette page est réservé aux administrateurs-trices de Kino Geneva!</h3>';
}
?>
<?php endwhile; ?>
<?php endif; ?>
<?php get_template_part('page-parts/general-after-wrap'); ?>
<?php get_footer();