Created
January 28, 2021 04:50
-
-
Save yousufansa/ecd761315526ec35d55b36add1e7633c to your computer and use it in GitHub Desktop.
Jobhunt - Company Logo Resize
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( ! function_exists( 'jobhunt_template_company_logo' ) ) { | |
function jobhunt_template_company_logo() { | |
?> | |
<div class="company-logo"> | |
<a href="<?php the_company_permalink(); ?>"> | |
<?php the_company_logo( 'medium' ); ?> | |
</a> | |
</div> | |
<?php | |
} | |
} | |
if ( ! function_exists( 'jobhunt_company_info' ) ) { | |
function jobhunt_company_info() { | |
?> | |
<div class="company-logo"> | |
<?php the_company_logo( 'medium' ); ?> | |
</div> | |
<div class="company-info"> | |
<h4 class="company-name"><?php echo apply_filters( 'jobhunt_company_name', get_the_title() ); ?></h4> | |
<?php if( ! empty(get_the_company_location())) : ?> | |
<div class="company-location"><i class="la la-map-marker"></i><?php the_company_location( true ); ?></div> | |
<?php endif; ?> | |
<?php if( ! empty(get_the_company_website_link())) : ?> | |
<span class="company-website"><i class="la la-link"></i><a href="<?php esc_url( the_company_website()); ?>" target="_blank"><?php the_company_website(); ?></a></span> | |
<?php endif; ?> | |
<?php if( ! empty(get_the_company_phone())) : ?> | |
<span class="company-phone"><i class="la la-phone"></i><?php the_company_phone(); ?></span> | |
<?php endif; ?> | |
<?php if( ! empty(get_the_company_email())) : ?> | |
<span class="company-email"><i class="la la-envelope"></i><a href="mailto:<?php esc_url( the_company_email()); ?>"><?php the_company_email(); ?></a></span> | |
<?php endif;?> | |
<div class="open-positions"><?php echo apply_filters( 'jobhunt_wpjmc_open_positions_info', esc_html( sprintf( _n( '%s Open Position', '%s Open Positions', get_the_company_job_listing_count(), 'jobhunt' ), get_the_company_job_listing_count() ) ) ); ?> | |
</div> | |
</div> | |
<?php | |
} | |
} | |
if ( ! function_exists( 'jh_child_company_logo_args_size' ) ) { | |
function jh_child_company_logo_args_size( $args ) { | |
$args['size'] = 'medium'; | |
return $args; | |
} | |
} | |
add_filter( 'jobhunt_company_logo_args', 'jh_child_company_logo_args_size' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment