Advertisement
fauzanjeg

Disable Video if user not Subscriber

May 18th, 2021
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.32 KB | None | 0 0
  1. /* Disable Video if user not Subscriber */
  2. add_filter( 'jnews_featured_video', 'remove_video_for_not_subscriber_users' , 10, 2 );
  3.  
  4. function remove_video_for_not_subscriber_users( $output, $post_id ) {
  5.  
  6.     if ( JNews\Paywall\Truncater\Truncater::instance()->check_status( $post_id ) ) {
  7.         return '';
  8.     }
  9.  
  10.     return $output;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement