Last active
July 23, 2018 21:08
-
-
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)
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_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