| @@ -49,9 +49,9 @@ | ||
| 49 | 49 | * |
| 50 | 50 | * @return string |
| 51 | 51 | */ |
| 52 | 52 | public function get_site_key_tooltip() { |
| 53 | - return __( 'reCAPTCHA is a free, accessible CAPTCHA service that helps to digitize books while blocking spam on your blog. reCAPTCHA asks commenters to retype two words scanned from a book to prove that they are a human. This verifies that they are not a spambot.', 'formidable' ); | |
| 53 | + return __( 'reCAPTCHA is a free, accessible CAPTCHA service that helps to digitize books while blocking spam on your blog. reCAPTCHA asks commenters to retype two words scanned from a book to prove that they are a human. This verifies that they are not a spambot.', 'formidable' ); // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong | |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * Add additional element attributes for reCAPTCHA. |
| @@ -59,8 +59,9 @@ | ||
| 59 | 59 | * @since 6.8.4 |
| 60 | 60 | * |
| 61 | 61 | * @param array $attributes |
| 62 | 62 | * @param array $field |
| 63 | + * | |
| 63 | 64 | * @return array |
| 64 | 65 | */ |
| 65 | 66 | public function add_front_end_element_attributes( $attributes, $field ) { |
| 66 | 67 | $attributes = parent::add_front_end_element_attributes( $attributes, $field ); |
| @@ -76,8 +77,9 @@ | ||
| 76 | 77 | /** |
| 77 | 78 | * @since 6.8.4 |
| 78 | 79 | * |
| 79 | 80 | * @param array $field |
| 81 | + * | |
| 80 | 82 | * @return string |
| 81 | 83 | */ |
| 82 | 84 | protected function get_captcha_size( $field ) { |
| 83 | 85 | if ( $this->captcha_is_invisible() ) { |
| @@ -115,10 +117,24 @@ | ||
| 115 | 117 | return in_array( $this->frm_settings->re_type, array( 'invisible', 'v3' ), true ); |
| 116 | 118 | } |
| 117 | 119 | |
| 118 | 120 | /** |
| 121 | + * Only add the "frm-" prefix if multiple reCAPTCHA fields are allowed. | |
| 122 | + * | |
| 123 | + * @since 6.25.1 | |
| 124 | + * | |
| 125 | + * @param bool $allow_multiple | |
| 126 | + * | |
| 127 | + * @return string | |
| 128 | + */ | |
| 129 | + public function get_class_prefix( $allow_multiple ) { | |
| 130 | + return $allow_multiple ? 'frm-' : ''; | |
| 131 | + } | |
| 132 | + | |
| 133 | + /** | |
| 119 | 134 | * @since 6.8.4 |
| 120 | 135 | * @deprecated 6.11.1 |
| 136 | + * | |
| 121 | 137 | * @return string |
| 122 | 138 | */ |
| 123 | 139 | public function getName() { |
| 124 | 140 | _deprecated_function( __METHOD__, '6.11.1' ); |