First and foremost, would just like to give Boxy Studio a major thumbs up for an awesome well coded and super cool functional styled plugin. I’m not going  to tell you what Resume Builder does as this post is not about that – instead I had to do a “quick fix” for a client who required some minor additional functionality. 

Important – for starters. It is never recommended to make code changes to an actively supported plugin like I am about to explain. Reasons being;

  • The plugin author might update the plugin and your changes will be overwritten on the next update
  • Security plugins such as Wordfence will report it as a security exception when it scans for code changes against the WordPress repository 

Best practice would be to contact the plugin author and to ask him/her to include your changes in the next update (but they are usually very busy people so that does not always happen) or include the rewritten function in your theme functions.php file. The changes I made to this plugin was as I said a quick fix and I will add these to my theme’s function file – which I will show you how to do in a follow up to this post.

OK changes that were requested were

  • Remove the email address displayed in the front end resume but retain the email link on the font-awesome icon.
  • Add profile fields for Facebook and LinkedIn 

To achieve this i had to add code in two of the plugins .php files. Version of plugin was 2.0.5

class.resume-builder-meta

This is where we will add the two extra social media input fields required in the backend.

We added a Facebook and LinkedIn input field

wp-content/plugins/resume-builder/includes/class.resume-builder-meta.php

after line 332 add the following

<div class="rbuilder-setting-column-12">
<h3 class="rbuilder-settings-title"><?php _e( 'LinkedIn', 'resume-builder' ); ?></h3>
<p><input name="_resume_settings[contact][linkedin]" type="text" value="<?php echo ( isset($resume_settings['contact']['linkedin']) && $resume_settings['contact']['linkedin'] ? $resume_settings['contact']['linkedin'] : '' ); ?>" placeholder="<?php esc_html_e('https://','resume-builder'); ?>"></p>
</div> 

<div class="rbuilder-setting-column-12">
<h3 class="rbuilder-settings-title"><?php _e( 'Facebook', 'resume-builder' ); ?></h3>
<p><input name="_resume_settings[contact][ facebook ]" type="text" value="<?php echo ( isset($resume_settings['contact']['facebook']) && $resume_settings['contact']['facebook'] ? $resume_settings['contact']['facebook'] : '' ); ?>" placeholder="<?php esc_html_e('https://','resume-builder'); ?>"></p>
</div>

 

resume.php

This is the template file that outputs the front-end stuff.

wp-content/plugins/resume-builder/templates/front/resume.php

replace lines 15  – 20

if ( $resume['contact']['email'] || $resume['contact']['phone'] || $resume['contact']['website'] ):

$contact_info = array();
if ( isset( $resume['contact']['email'] ) && $resume['contact']['email'] ):
$contact_info[] = '<div class="rb-resume-contact-content"><div class="rb-resume-contact-left"><i class="far fa-envelope fa-fw"></i></div><a href="mailto:' . antispambot( esc_html( $resume['contact']['email'] ) ) . '">' . antispambot( esc_html( $resume['contact']['email'] ) ) . '</a></div>';
endif;

with the following

if ( $resume['contact']['email'] || $resume['contact']['linkedin'] || $resume['contact']['facebook'] || $resume['contact']['phone'] || $resume['contact']['website'] ):

$contact_info = array();

if ( isset( $resume['contact']['email'] ) && $resume['contact']['email'] ):
$contact_info[] = '<div class="rb-resume-contact-content"><div class="rb-resume-contact-left"><a href="mailto:' . antispambot( esc_html( $resume['contact']['email'] ) ) . '"><i class="far fa-envelope fa-fw"></i></a>&nbsp;</div>'; 
endif; 
if ( isset( $resume['contact']['facebook'] ) && $resume['contact']['facebook'] ):
$contact_info[] = '<div class="rb-resume-contact-content"><div class="rb-resume-contact-left"><a href="' . esc_html( $resume['contact']['facebook'] ) . '"><i class="fa-facebook fa-fw"></i></a>&nbsp;</div>'; 
endif;
if ( isset( $resume['contact']['linkedin'] ) && $resume['contact']['linkedin'] ):
$contact_info[] = '<div class="rb-resume-contact-content"><div class="rb-resume-contact-left"><a href="' . esc_html( $resume['contact']['linkedin'] ) . '"><i class="far fa-linkedin fa-fw"></i></a>&nbsp;</div></div></div></div></br>'; 
endif;

and that’s it! Will add some tweaks and show you how to add the above to your themes functions file later. Below is a vid to show you what Resume Builder does

Facebook Comments