Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function disallow_before_date_published( $can_access, $user_id, $post_id ) {
- $published = get_the_date( 'U', $post_id );
- $userdata = get_userdata( $user_id );
- if ( strtotime( $userdata->user_registered ) < $published ) {
- $can_access = false;
- }
- return $can_access;
- }
- add_filter( 'wpf_user_can_access', 'disallow_before_date_published', 10, 3 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement