-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
53 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
/** | ||
* Util functions for usage throughout the plugin. | ||
* | ||
* @link: https://www.acato.nl | ||
* | ||
* @package WP_Rest_Cache_Plugin | ||
* @subpackage WP_Rest_Cache_Plugin/Includes | ||
*/ | ||
|
||
namespace WP_Rest_Cache_Plugin\Includes; | ||
|
||
/** | ||
* Util functions for usage throughout the plugin. | ||
* | ||
* This class define util functions that can be used throughout the plugin. | ||
* | ||
* @package WP_Rest_Cache_Plugin | ||
* @subpackage WP_Rest_Cache_Plugin/Includes | ||
* @author Richard Korthuis - Acato <[email protected]> | ||
*/ | ||
class Util { | ||
|
||
/** | ||
* Get the home url, without converting it to the current language. | ||
* | ||
* @return string The home url. | ||
*/ | ||
public static function get_home_url() { | ||
add_filter( 'wpml_skip_convert_url_string', '__return_true' ); | ||
$home_url = get_home_url(); | ||
remove_filter( 'wpml_skip_convert_url_string', '__return_true' ); | ||
return $home_url; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters