HEX
Server: Apache/2.4.65 (Debian)
System: Linux web6 5.10.0-36-amd64 #1 SMP Debian 5.10.244-1 (2025-09-29) x86_64
User: innocamp (1028)
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: /home/bookcc/public_html/wp-content/themes/fatmoon/content-link.php
<?php
/**
 * Template used for displaying content of "link" format posts on archive page.
 * It is used only on page with posts list: blog, archive, search
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit;
} // Exit if accessed directly

// The Regular Expression filter
$reg_exUrl = "/(http|https|ftp|ftps)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/";
$has_url =  false;

//uses post content as link, and title as link text
$content = get_the_content();

// Check if there is a url in the text
if(preg_match($reg_exUrl, $content, $url)) {
    $content = $url[0];
    $has_url = true;
}

$_link = $has_url ? $content : apply_filters( 'the_permalink', get_permalink() );

?>

<div class="formatter">
    <?php apollo13framework_post_meta_data(); ?>
    <h2 class="post-title"<?php apollo13framework_schema_args('headline'); ?>>
        <a href="<?php echo esc_url($_link); ?>"<?php apollo13framework_schema_args('url'); ?>><?php the_title(); ?><i class="post-format-link-icon fa fa-external-link"></i></a>
    </h2>
    <span class="cite-author"><?php echo esc_url($_link); ?></span>
</div>