| Server IP : 87.229.120.60 / Your IP : 216.73.216.245 Web Server : Apache System : Linux outside 5.4.8_Algonet_ZeroMAC_0.9.4.8 #6 SMP Mon Feb 3 20:36:07 CET 2020 x86_64 User : server ( 1002) PHP Version : 8.3.20 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,curl_multi_exec,parse_ini_file,show_source MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/faktorteam/www/wp-content/themes/rife-free/ |
Upload File : |
<?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>