Нема описа

format.php 1.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /*******************************************************************************
  3. * Copyright (c) 2019, Code Atlantic LLC
  4. ******************************************************************************/
  5. if ( ! defined( 'ABSPATH' ) ) {
  6. exit; // Exit if accessed directly
  7. }
  8. /**
  9. * @param int $time
  10. * @param int|null $current
  11. *
  12. * @return mixed
  13. */
  14. function pum_human_time( $time, $current = null ) {
  15. return PUM_Utils_Format::human_time( $time, $current );
  16. }
  17. /**
  18. * @param int|float $number
  19. * @param string $format
  20. *
  21. * @return int|string
  22. */
  23. function pum_format_number( $number, $format = '' ) {
  24. return PUM_Utils_Format::number( $number, $format );
  25. }
  26. /**
  27. * @param int|float $number
  28. * @param string $format U|human|human-readable
  29. *
  30. * @return int|string
  31. */
  32. function pum_format_time( $number, $format = '' ) {
  33. return PUM_Utils_Format::time( $number, $format );
  34. }
  35. /**
  36. * Removes <p></p> around URLs
  37. *
  38. * @param string $content
  39. *
  40. * @return string
  41. */
  42. function pum_unwrap_urls( $content = '' ) {
  43. return PUM_Utils_Format::unwrap_urls( $content );
  44. }