| @@ -21,9 +21,9 @@ | ||
| 21 | 21 | const FIELD_COMPANY = 'company'; |
| 22 | 22 | |
| 23 | 23 | const SPAM_EXCEPTION = 'honeypot'; |
| 24 | 24 | |
| 25 | - const FRONTEND_STYLE_HANDLE = 'jet-form-builder-frontend'; | |
| 25 | + const HONEYPOT_STYLE_HANDLE = 'jet-form-builder-honeypot'; | |
| 26 | 26 | |
| 27 | 27 | public function __construct() { |
| 28 | 28 | add_filter( 'jet-form-builder/security/spam-statuses', array( $this, 'add_spam_statuses' ) ); |
| 29 | 29 | } |
| @@ -90,24 +90,33 @@ | ||
| 90 | 90 | ); |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | public function enqueue_styles() { |
| 94 | + wp_register_style( | |
| 95 | + self::HONEYPOT_STYLE_HANDLE, | |
| 96 | + false, | |
| 97 | + array(), | |
| 98 | + jet_form_builder()->get_version() | |
| 99 | + ); | |
| 100 | + wp_enqueue_style( self::HONEYPOT_STYLE_HANDLE ); | |
| 94 | 101 | wp_add_inline_style( |
| 95 | - self::FRONTEND_STYLE_HANDLE, | |
| 102 | + self::HONEYPOT_STYLE_HANDLE, | |
| 96 | 103 | ' |
| 97 | - .jfb-user-info { | |
| 98 | - position: absolute; | |
| 99 | - top: 0; | |
| 100 | - left: 0; | |
| 101 | - width: 1px; | |
| 102 | - height: 1px; | |
| 103 | - overflow: hidden; | |
| 104 | - clip-path: inset(50%); | |
| 105 | - white-space: nowrap; | |
| 106 | - user-select: none; | |
| 107 | - -webkit-user-select: none; | |
| 108 | - } | |
| 109 | - ' | |
| 104 | + .jfb-user-info, | |
| 105 | + .jfb-user-info input { | |
| 106 | + position: absolute !important; | |
| 107 | + top: 0 !important; | |
| 108 | + left: 0 !important; | |
| 109 | + width: 1px !important; | |
| 110 | + height: 1px !important; | |
| 111 | + overflow: hidden !important; | |
| 112 | + clip-path: inset(50%) !important; | |
| 113 | + white-space: nowrap !important; | |
| 114 | + user-select: none !important; | |
| 115 | + -webkit-user-select: none !important; | |
| 116 | + pointer-events: none !important; | |
| 117 | + } | |
| 118 | + ' | |
| 110 | 119 | ); |
| 111 | 120 | } |
| 112 | 121 | |
| 113 | 122 | private function get_honeypot_base_names(): array { |