関数
Permalink::makeUrl()
戻り値 戻り値
ファイル: src/Config/Permalink.php
public static function makeUrl() {
global $usces;
$permalink_structure = get_option('permalink_structure');
if ($usces->use_ssl) {
if ($permalink_structure) {
$home_perse = parse_url(get_option('home'));
$home_perse_path = isset($home_perse['path']) ? $home_perse['path'] : '';
$home_path = $home_perse['host'] . $home_perse_path;
$ssl_perse = parse_url($usces->options['ssl_url']);
$ssl_perse_path = isset($ssl_perse['path']) ? $ssl_perse['path'] : '';
$ssl_path = $ssl_perse['host'] . $ssl_perse_path;
if ($home_perse_path != $ssl_perse_path) {
if (!defined('WCEXWL_PAGE_URL')) {
define('WCEXWL_PAGE_URL', $usces->options['ssl_url'] . '/index.php?page_id=' . WCEXWL_POST_ID . '&uscesid=' . $usces->get_uscesid());
}
} else {
$ssl_plink_wishlist = str_replace('http://', 'https://', str_replace($home_path, $ssl_path, get_page_link(WCEXWL_POST_ID)));
if (!defined('WCEXWL_PAGE_URL')) {
define('WCEXWL_PAGE_URL', $ssl_plink_wishlist . '?uscesid=' . $usces->get_uscesid());
}
}
} else {
if (!defined('WCEXWL_PAGE_URL')) {
define('WCEXWL_PAGE_URL', $usces->options['ssl_url'] . '/?page_id=' . WCEXWL_POST_ID . '&uscesid=' . $usces->get_uscesid());
}
}
if (!is_admin()) {
add_filter('home_url', [get_class(), 'sslPageLink']);
}
} else {
if ($permalink_structure) {
if (!defined('WCEXWL_PAGE_URL')) {
define('WCEXWL_PAGE_URL', get_page_link(WCEXWL_POST_ID));
}
} else {
if (!defined('WCEXWL_PAGE_URL')) {
define('WCEXWL_PAGE_URL', get_option('home') . '/?page_id=' . WCEXWL_POST_ID);
}
}
}
define('ASUMIL_WISHLIST_URL', WCEXWL_PAGE_URL);
}