compat.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * Functions for maintaining backwards compatibility with unprefixed template tags from the original Site Logo plugin.
  4. * These should never be used in themes; instead, use the template tags in functions.php.
  5. * See: https://github.com/Automattic/jetpack/pull/956
  6. *
  7. * @package Jetpack
  8. */
  9. if ( ! function_exists( 'the_site_logo' ) ) :
  10. /**
  11. * Unprefixed, backwards-compatible function for outputting the site logo.
  12. *
  13. * @uses jetpack_the_site_logo()
  14. */
  15. function the_site_logo() {
  16. jetpack_the_site_logo();
  17. }
  18. endif;
  19. if ( ! function_exists( 'has_site_logo' ) ) :
  20. /**
  21. * Unprefixed, backwards-compatible function for determining if a site logo has been set.
  22. *
  23. * @uses jetpack_has_site_logo()
  24. * @return bool True if a site logo is set, false otherwise.
  25. */
  26. function has_site_logo() {
  27. return jetpack_has_site_logo();
  28. }
  29. endif;
  30. if ( ! function_exists( 'get_site_logo' ) ) :
  31. /**
  32. * Unprefixed, backwards-compatible function for getting either the site logo's image URL or its ID.
  33. *
  34. * @param string $show Return the site logo URL or ID.
  35. * @uses jetpack_get_site_logo()
  36. * @return string Site logo ID or URL (the default).
  37. */
  38. function get_site_logo( $show = 'url' ) {
  39. return jetpack_get_site_logo( $show );
  40. }
  41. endif;