File tree 2 files changed +25
-1
lines changed
2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 13
13
"source" : " https://github.com/shevabam/recaptcha/tree/master"
14
14
},
15
15
"license" : " GNU GPL 2.0" ,
16
- "version" : " 1.0.2 " ,
16
+ "version" : " 1.0.3 " ,
17
17
"require" : {
18
18
"php" : " >=5.3.0"
19
19
},
Original file line number Diff line number Diff line change @@ -79,6 +79,14 @@ class reCAPTCHA
79
79
*/
80
80
protected $ language = null ;
81
81
82
+ /**
83
+ * Captcha size. Default : normal
84
+ *
85
+ * @var string
86
+ * @see https://developers.google.com/recaptcha/docs/display#render_param
87
+ */
88
+ protected $ size = null ;
89
+
82
90
83
91
84
92
/**
@@ -179,6 +187,19 @@ public function setLanguage($language)
179
187
return $ this ;
180
188
}
181
189
190
+ /**
191
+ * Set size
192
+ *
193
+ * @param string $size (see https://developers.google.com/recaptcha/docs/display#render_param)
194
+ * @return object
195
+ */
196
+ public function setSize ($ size )
197
+ {
198
+ $ this ->size = $ size ;
199
+
200
+ return $ this ;
201
+ }
202
+
182
203
/**
183
204
* Generate the JS code of the captcha
184
205
*
@@ -210,6 +231,9 @@ public function getHtml()
210
231
if (!is_null ($ this ->type ))
211
232
$ data .= ' data-type=" ' .$ this ->type .'" ' ;
212
233
234
+ if (!is_null ($ this ->size ))
235
+ $ data .= ' data-size=" ' .$ this ->size .'" ' ;
236
+
213
237
return '<div class="g-recaptcha" ' .$ data .'></div> ' ;
214
238
}
215
239
}
You can’t perform that action at this time.
0 commit comments