HEX
Server: LiteSpeed
System: Linux premium221.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User: madepabj (2566)
PHP: 8.3.26
Disabled: NONE
Upload Files
File: //home/madepabj/gamepointpk.com/wp-content/themes/groovy/partials/author-box.php
<?php $epcl_theme = epcl_get_theme_options(); ?>
<?php
if( !get_the_author_meta('description') ) return;

$author_id = get_the_author_meta('ID');
$user_meta = get_user_meta( $author_id, 'epcl_user', true );
$author_avatar = epcl_get_author_avatar($user_meta, $author_id);

$author_name = get_the_author();
$author_url = get_author_posts_url($author_id);
$class = $author_position = '';
if($author_avatar) $class .= ' with-avatar'; else $class .= ' no-avatar';
if( !empty($user_meta) && !empty( $user_meta['position']) ){
    $author_position = $user_meta['position'];
}
$website = get_the_author_meta('user_url');

if( is_author() ) $class .= ' grid-container grid-medium';

if( is_single() ){
    $class .= ' single-author';
}

?> 

<!-- start: .author -->
<section id="author" class="author section bg-box <?php echo esc_attr($class); ?>">
    <?php if( is_single() ): ?>
        <h3 class="title medium bordered absolute"><?php echo esc_html__('About the Author', 'groovy'); ?></h3>
    <?php endif; ?>
    <div class="single-wrapper">
        <div class="flex">
            <?php if($author_avatar): ?>
                <a class="author-avatar shadow-effect epcl-loader">
                    <?php if( epcl_is_amp() ): ?>
                        <span class="author-image cover" style="background-image: url('<?php echo esc_url($author_avatar); ?>');"></span>
                    <?php else: ?>
                        <span class="author-image cover lazy" data-src="<?php echo esc_url($author_avatar); ?>"></span>
                    <?php endif; ?>
                </a>   
            <?php endif; ?>    

            <div class="right">
                <h4 class="title author-name underline-effect">
                    <?php if( is_archive() ): ?>
                        <?php echo esc_html( $author_name ); ?>
                    <?php else: ?>
                        <a href="<?php echo esc_attr( $author_url ); ?>"><?php echo esc_html( $author_name ); ?></a>
                    <?php endif; ?>
                </h4>
                <?php if( $author_position ): ?>
                    <p class="position"><?php echo esc_html($author_position); ?></p>
                <?php endif; ?>
                <?php if( is_single() ): ?>
                    <?php if( !empty($user_meta) && ($user_meta['facebook'] || $user_meta['twitter'] || $website) ): ?>
                        <div class="social">
                            <?php if( $user_meta['twitter'] ): ?>
                                <a href="<?php echo esc_url( $user_meta['twitter'] ); ?>" class="twitter tooltip" title="<?php esc_attr_e('Follow me on Twitter', 'groovy'); ?>" target="_blank" rel="nofollow noopener"><i class="fa fa-twitter"></i></a>
                            <?php endif; ?>
                            <?php if( $user_meta['facebook']  ): ?>
                                <a href="<?php echo esc_url( $user_meta['facebook'] ); ?>" class="facebook tooltip" title="<?php esc_attr_e('Follow me on Facebook', 'groovy'); ?>" target="_blank" rel="nofollow noopener"><i class="fa fa-facebook"></i></a>
                            <?php endif; ?>
                            <?php if( $website ): ?>
                                <a href="<?php echo esc_url( $website ); ?>" class="website tooltip" title="<?php esc_attr_e('Website', 'groovy'); ?>: <?php echo esc_url( $website ); ?>" target="_blank" rel="nofollow noopener"><i class="fa fa-globe"></i></a>
                            <?php endif; ?>
                        </div>  
                    <?php endif; ?> 
                <?php endif; ?>
            </div>
        </div>

        <div class="clear"></div>
        
        <div class="info">
            <p><?php the_author_meta('description'); ?></p>
            <?php if( is_single() ): ?>   
                <a href="<?php echo esc_url( $author_url ); ?>" class="epcl-button white small active"><?php esc_html_e('View All Articles', 'groovy'); ?></a> 
            <?php else: ?>
                <?php if( !empty($user_meta) && ($user_meta['facebook'] || $user_meta['twitter'] || $website) ): ?>
                    <div class="social">
                        <?php if( $user_meta['twitter'] ): ?>
                            <a href="<?php echo esc_url( $user_meta['twitter'] ); ?>" class="twitter tooltip" title="<?php esc_attr_e('Follow me on Twitter', 'groovy'); ?>" target="_blank" rel="nofollow noopener"><i class="fa fa-twitter"></i></a>
                        <?php endif; ?>
                        <?php if( $user_meta['facebook']  ): ?>
                            <a href="<?php echo esc_url( $user_meta['facebook'] ); ?>" class="facebook tooltip" title="<?php esc_attr_e('Follow me on Facebook', 'groovy'); ?>" target="_blank" rel="nofollow noopener"><i class="fa fa-facebook"></i></a>
                        <?php endif; ?>
                        <?php if( $website ): ?>
                            <a href="<?php echo esc_url( $website ); ?>" class="website tooltip" title="<?php esc_attr_e('Website', 'groovy'); ?>: <?php echo esc_url( $website ); ?>" target="_blank" rel="nofollow noopener"><i class="fa fa-globe"></i></a>
                        <?php endif; ?>
                    </div>  
                <?php endif; ?>
            <?php endif; ?>       
        </div> 
    </div>

    <?php if( is_single() ): ?>
        <?php
        $args = array(
            'post_type' => 'post',
            'author' => $author_id,
            'showposts' => 3,
            'suppress_filters' => false,
            'ignore_sticky_posts' => true,
            'meta_key' => '_thumbnail_id',
        );
        $author_posts = get_posts($args);
        $index = 1;
        $thumb_size = 'thumbnail';
        ?>
        <?php if( !empty($author_posts) ): ?>            
            <div class="author-posts widget widget_epcl_posts_thumbs">
                <h4 class="title usmall"><?php esc_html_e('Check latest articles from this author:', 'groovy'); ?></h4>
                <?php foreach($author_posts as $post): setup_postdata($post); ?>
                    <article class="{{post_class}} item ctag-{{primary_tag.slug}} {{^if feature_image}}no-thumb{{/if}}">
                        <div class="info">                    
                            <?php if( has_post_thumbnail($post) ): ?>
                                <a href="<?php the_permalink(); ?>" class="thumb main-effect epcl-loader">
                                    <?php if( !empty($epcl_theme) && $epcl_theme['enable_lazyload'] == '1' && !epcl_is_amp() ): ?>
                                        <span class="fullimage cover lazy" data-src="<?php the_post_thumbnail_url($thumb_size); ?>"></span>
                                    <?php else: ?>
                                        <span class="fullimage cover" style="background: url('<?php the_post_thumbnail_url($thumb_size); ?>');"></span>
                                    <?php endif; ?>
                                    <span class="epcl-number"><?php echo absint($index); ?></span>
                                </a>
                            <?php endif; ?>
                            <div class="right">
                                <h4 class="title usmall underline-effect"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
                                <time datetime="<?php the_time('Y-m-d'); ?>" class="icon"><?php the_time( get_option('date_format') ); ?></time>
                            </div>				
                        </div>
                        <div class="clear"></div>
                    </article>
                <?php $index++; endforeach; wp_reset_postdata(); ?>
            </div>
        <?php endif; ?>
    <?php endif; ?>

</section>
<!-- end: .author -->

<div class="clear"></div>