Skip to content

Instantly share code, notes, and snippets.

@tripflex
Last active November 21, 2019 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tripflex/8886caeac1f5984b9319c8490d4d86ff to your computer and use it in GitHub Desktop.
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
<?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