Last active
November 21, 2019 20:16
-
-
Save tripflex/8886caeac1f5984b9319c8490d4d86ff to your computer and use it in GitHub Desktop.
Output full URL for specific meta keys when using Output As link with WP Job Manager Field Editor
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
<?php | |
add_filter( 'job_manager_field_editor_output_as_link_output_caption', 'smyles_output_link_full_url', 10, 5 ); | |
function smyles_output_link_full_url( $caption, $meta_key, $field_value, $args, $listing_id ){ | |
$full_url_meta_keys = array( 'teacher_website' ); | |
if( ! in_array( $meta_key, $full_url_meta_keys ) ){ | |
return $caption; | |
} | |
return $field_value; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment