'is', ]; } public function get_options() { return [ 'mobile' => 'Mobile', 'desktop' => 'Desktop', ]; } public function check( $operator, $value ) { $is_mobile = wp_is_mobile(); $current_device = $is_mobile ? 'mobile' : 'desktop'; // Support both single string and array of values if ( is_array( $value ) ) { return in_array( $current_device, $value, true ); } return $current_device === $value; } }