/modules/theme-tools/site-logo/inc/compat.php

  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.  
  10. if ( ! function_exists( 'the_site_logo' ) ) : 
  11. /** 
  12. * Unprefixed, backwards-compatible function for outputting the site logo. 
  13. * 
  14. * @uses jetpack_the_site_logo() 
  15. */ 
  16. function the_site_logo() { 
  17. jetpack_the_site_logo(); 
  18. endif; 
  19.  
  20. if ( ! function_exists( 'has_site_logo' ) ) : 
  21. /** 
  22. * Unprefixed, backwards-compatible function for determining if a site logo has been set. 
  23. * 
  24. * @uses jetpack_has_site_logo() 
  25. * @return bool True if a site logo is set, false otherwise. 
  26. */ 
  27. function has_site_logo() { 
  28. return jetpack_has_site_logo(); 
  29. endif; 
  30.  
  31. if ( ! function_exists( 'get_site_logo' ) ) : 
  32. /** 
  33. * Unprefixed, backwards-compatible function for getting either the site logo's image URL or its ID. 
  34. * 
  35. * @param string $show Return the site logo URL or ID. 
  36. * @uses jetpack_get_site_logo() 
  37. * @return string Site logo ID or URL (the default). 
  38. */ 
  39. function get_site_logo( $show = 'url' ) { 
  40. return jetpack_get_site_logo( $show ); 
  41. endif; 
.