Advertisement
verygoodplugins

Untitled

Nov 18th, 2018
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.34 KB | None | 0 0
  1. function elementor_require_all_tags( $can_access, $element, $user_tags ) {
  2.  
  3.     $widget_tags = $element->get_settings( 'wpf_tags' );
  4.  
  5.     if( array_intersect( $widget_tags, $user_tags ) == count( $widget_tags ) ) {
  6.         return true;
  7.     } else {
  8.         return false;
  9.     }
  10.  
  11. }
  12.  
  13. add_filter( 'wpf_elementor_can_access', 'elementor_require_all_tags', 10, 3 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement