Skip to content

Instantly share code, notes, and snippets.

@tripflex
Last active July 23, 2018 21:08
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/a408124f107e572319c37a2bf46068a0 to your computer and use it in GitHub Desktop.
Save tripflex/a408124f107e572319c37a2bf46068a0 to your computer and use it in GitHub Desktop.
Allow featured Resumes to be viewed without package with WP Job Manager Packages (while still requiring package to view non-featured resumes)
<?php
add_filter( 'job_manager_packages_resume_user_can_view', 'smyles_bypass_pkg_view_featured_resumes', 99 );
function smyles_bypass_pkg_view_featured_resumes( $user_can ){
$is_featured = get_post_meta( get_the_ID(), '_featured', true );
if( ! empty( $is_featured ) ){
return true;
}
return $user_can;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment