File Editor
Directories:
.. (Back)
open-graph
schema
twitter
Files:
aioseo-helper.php
asset-helper.php
attachment-cleanup-helper.php
author-archive-helper.php
blocks-helper.php
capability-helper.php
crawl-cleanup-helper.php
curl-helper.php
current-page-helper.php
date-helper.php
environment-helper.php
first-time-configuration-notice-helper.php
home-url-helper.php
image-helper.php
import-cursor-helper.php
import-helper.php
indexable-helper.php
indexable-to-postmeta-helper.php
indexing-helper.php
language-helper.php
meta-helper.php
notification-helper.php
options-helper.php
pagination-helper.php
permalink-helper.php
post-helper.php
post-type-helper.php
primary-term-helper.php
product-helper.php
redirect-helper.php
require-file-helper.php
robots-helper.php
robots-txt-helper.php
sanitization-helper.php
score-icon-helper.php
short-link-helper.php
site-helper.php
social-profiles-helper.php
string-helper.php
taxonomy-helper.php
url-helper.php
user-helper.php
wincher-helper.php
woocommerce-helper.php
wordpress-helper.php
wpdb-helper.php
Create New File
Create
Edit File: home-url-helper.php
<?php namespace Yoast\WP\SEO\Helpers; /** * A helper object for the home URL. */ class Home_Url_Helper { /** * The home url. * * @var string */ protected static $home_url; /** * The parsed home url. * * @var array */ protected static $parsed_home_url; /** * Retrieves the home url. * * @return string The home url. */ public function get() { if ( static::$home_url === null ) { static::$home_url = \home_url(); } return static::$home_url; } /** * Retrieves the home url that has been parsed. * * @return array The parsed url. */ public function get_parsed() { if ( static::$parsed_home_url === null ) { static::$parsed_home_url = \wp_parse_url( $this->get() ); } return static::$parsed_home_url; } }
Save Changes
Rename File
Rename