-
-
Notifications
You must be signed in to change notification settings - Fork 376
/
Copy pathpage-bangumi.php
53 lines (50 loc) · 1.76 KB
/
page-bangumi.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
50
51
52
53
<?php
/**
Template Name: 追番模板
*/
get_header();
?>
<meta name="referrer" content="same-origin">
<style>
.comments{display: none}
.site-content{max-width:1280px}
</style>
</head>
<?php while(have_posts()) : the_post(); ?>
<?php if(!iro_opt('patternimg') || !get_post_thumbnail_id(get_the_ID())) { ?>
<span class="linkss-title"><?php the_title();?></span>
<?php } ?>
<article <?php post_class("post-item"); ?>>
<?php the_content( '', true ); ?>
<section class="bangumi">
<?php if (iro_opt('bangumi_source') == 'bilibili'):?>
<?php if (iro_opt('bilibili_id') ):?>
<div class="row">
<?php
$bgm = new \Sakura\API\Bilibili();
echo $bgm->get_bgm_items();
?>
<?php else: ?>
<div class="row">
<p> <?php _e("Please fill in the Bilibili UID in Sakura Options.","sakurairo"); ?></p>
</div>
<?php endif; ?>
<?php else:?>
<?php if (iro_opt('my_anime_list_username') ):?>
<div class="row">
<?php
$bgm = new \Sakura\API\MyAnimeList();
echo $bgm->get_all_items();
?>
</div>
<?php else: ?>
<div class="row">
<p> <?php _e("Please fill in the My Anime List Username in Sakura Options.","sakurairo"); ?></p>
</div>
<?php endif; ?>
<?php endif; ?>
</section>
</article>
<?php endwhile; ?>
<?php
get_footer();