<?php namespace LearnDash\Hub\Traits; trait Formats { /** * Strip protocols * * @param string $url * * @return string */ public function strips_protocol( string $url ): string { $parts = parse_url( $url ); $host = $parts['host'] . ( isset( $parts['path'] ) ? $parts['path'] : null ); $host = rtrim( $host, '/' ); return $host; } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
formats.php | File | 377 B | 0644 |
|
license.php | File | 3.47 KB | 0644 |
|
permission.php | File | 5.35 KB | 0644 |
|
time.php | File | 1.03 KB | 0644 |
|