HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux wordpress-ubuntu-s-2vcpu-4gb-fra1-01 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64
User: root (0)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/lipovac/wp-content/themes/senior/lib/relative-urls.php
<?php
/**
 * Root relative URLs
 *
 * WordPress likes to use absolute URLs on everything - let's clean that up.
 * Inspired by http://www.456bereastreet.com/archive/201010/how_to_make_wordpress_urls_root_relative/
 *
 * You can enable/disable this feature in config.php:
 * current_theme_supports('root-relative-urls');
 *
 * @author Scott Walkinshaw <scott.walkinshaw@gmail.com>
 */
function wheels_root_relative_url( $input ) {
	preg_match( '|https?://([^/]+)(/.*)|i', $input, $matches );

	if ( ! isset( $matches[1] ) || ! isset( $matches[2] ) ) {
		return $input;
	} elseif ( ( $matches[1] === $_SERVER['SERVER_NAME'] ) || $matches[1] === $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] ) {
		return wp_make_link_relative( $input );
	} else {
		return $input;
	}
}

function wheels_enable_root_relative_urls() {
	return ! ( is_admin() || in_array( $GLOBALS['pagenow'], array(
				'wp-login.php',
				'wp-register.php'
			) ) ) && current_theme_supports( 'root-relative-urls' );
}

if ( wheels_enable_root_relative_urls() ) {
	$root_rel_filters = array(
		'bloginfo_url',
		'the_permalink',
		'wp_list_pages',
		'wp_list_categories',
		'wheels_wp_nav_menu_item',
		'the_content_more_link',
		'the_tags',
		'get_pagenum_link',
		'get_comment_link',
		'month_link',
		'day_link',
		'year_link',
		'tag_link',
		'the_author_posts_link',
		'script_loader_src',
		'style_loader_src'
	);

	wheels_add_filters( $root_rel_filters, 'wheels_root_relative_url' );
}