Created
October 18, 2013 09:46
-
-
Save Kenshino/7039192 to your computer and use it in GitHub Desktop.
This file contains 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
<p> | |
<label for="resume_custom_attachment_cv"><?php _e( "Upload Resume", 'wingz_resume' ); ?></label> | |
<input id="resume_custom_attachment_cv" name="resume_custom_attachment_cv" value="" size="25" type="file"> | |
<?php | |
$img = get_post_meta($object->ID, 'resume_custom_attachment', true); | |
//check for old post meta name, for backwards compatibility | |
if ($img == '' || $img == null){ | |
$img = get_post_meta($object->ID, 'resume_custom_attachment_cv', true); | |
} | |
//var_dump($img); | |
?> | |
<br /> | |
<?php | |
if (is_array($img)): | |
if ($img['url'] != ''): | |
?> | |
<a href="<?php echo $img['url']; ?>" target="_blank"> | |
Download previously uploaded resume | |
</a> | |
<?php | |
endif; | |
else: | |
if ($img != ''): | |
?> | |
<a href="<?php echo $img; ?>" target="_blank"> | |
Download previously uploaded resume | |
</a> | |
<?php | |
endif; | |
endif; | |
?> | |
</p> | |
<p> | |
<label for="resume_custom_support_attachment"><?php _e( "Upload Supporting Doc", 'wingz_resume' ); ?></label> | |
<input id="resume_custom_support_attachment" name="resume_custom_support_attachment" value="" size="25" type="file"> | |
<?php | |
$img = get_post_meta($object->ID, 'resume_custom_support_attachment', true); | |
//var_dump($img); | |
?> | |
<br /> | |
<?php | |
if (is_array($img)): | |
if ($img['url'] != ''): | |
?> | |
<a href="<?php echo esc_url( $img['url'] ); ?>" target="_blank"> | |
Download previously uploaded supporting document | |
</a> | |
<?php | |
endif; | |
else: | |
if ($img != ''): | |
?> | |
<a href="<?php echo esc_url( $img ); ?>" target="_blank"> | |
Download previously uploaded supporting document | |
</a> | |
<?php | |
endif; | |
endif; | |
?> | |
</p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment