1
0

page-bangumi.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. Template Name: 追番模板
  4. */
  5. get_header();
  6. ?>
  7. <meta name="referrer" content="same-origin">
  8. <style>
  9. .comments{display: none}
  10. .site-content{max-width:1280px}
  11. </style>
  12. </head>
  13. <?php while(have_posts()) : the_post(); ?>
  14. <?php if(!iro_opt('patternimg') || !get_post_thumbnail_id(get_the_ID())) { ?>
  15. <span class="linkss-title"><?php the_title();?></span>
  16. <?php } ?>
  17. <article <?php post_class("post-item"); ?>>
  18. <?php the_content(); ?>
  19. <section class="bangumi">
  20. <?php if (iro_opt('bangumi_source') == 'bilibili'):?>
  21. <?php if (iro_opt('bilibili_id') ):?>
  22. <div class="row">
  23. <?php
  24. $bgm = new \Sakura\API\Bilibili();
  25. echo $bgm->get_bgm_items();
  26. ?>
  27. <?php else: ?>
  28. <div class="row">
  29. <p> <?php _e("Please fill in the Bilibili UID in Sakura Options.","sakura"); ?></p>
  30. </div>
  31. <?php endif; ?>
  32. <?php else:?>
  33. <?php if (iro_opt('my_anime_list_username') ):?>
  34. <div class="row">
  35. <?php
  36. $bgm = new \Sakura\API\MyAnimeList();
  37. echo $bgm->get_all_items();
  38. ?>
  39. <?php else: ?>
  40. <div class="row">
  41. <p> <?php _e("Please fill in the My Anime List Username in Sakura Options.","sakura"); ?></p>
  42. </div>
  43. <?php endif; ?>
  44. <?php endif; ?>
  45. </section>
  46. </article>
  47. <?php endwhile; ?>
  48. <?php
  49. get_footer();