PageRenderTime 42ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/toolbox/functions/prev-next-links.php

https://github.com/bohman/wp-toolbox
PHP | 19 lines | 13 code | 1 blank | 5 comment | 4 complexity | 717e0cce645fb67ac880aa59e649929a MD5 | raw file
  1. <?php
  2. //---------------------------------
  3. // toolbox_prev_next_links()
  4. //
  5. // Displays previous and next links if we're on an archive page.
  6. //---------------------------------
  7. function toolbox_prev_next_links() {
  8. if (get_previous_posts_link() || get_next_posts_link()) { ?>
  9. <div class="prev-next">
  10. <?php if (get_previous_posts_link()) { ?>
  11. <div class="newer"><?php previous_posts_link('Nyare inlägg &raquo;') ?></div>
  12. <?php }
  13. if (get_next_posts_link()) { ?>
  14. <div class="older"><?php next_posts_link('&laquo; Äldre inlägg','') ?></div>
  15. <?php } ?>
  16. </div>
  17. <?php }
  18. }