| @@ -4,9 +4,9 @@ | ||
| 4 | 4 | } |
| 5 | 5 | |
| 6 | 6 | class FrmFormTemplateApi extends FrmFormApi { |
| 7 | 7 | |
| 8 | - protected static $code_option_name = 'frm_free_license_code'; | |
| 8 | + protected static $code_option_name = 'frm_free_license_code'; | |
| 9 | 9 | |
| 10 | 10 | private static $base_api_url = 'https://formidableforms.com/wp-json/form-templates/v1/'; |
| 11 | 11 | |
| 12 | 12 | protected static $free_license; |
| @@ -11,13 +11,18 @@ | ||
| 11 | 11 | |
| 12 | 12 | protected static $free_license; |
| 13 | 13 | |
| 14 | 14 | /** |
| 15 | - * @var int $new_days | |
| 15 | + * @var int | |
| 16 | 16 | */ |
| 17 | 17 | protected $new_days = 30; |
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | + * @var string | |
| 21 | + */ | |
| 22 | + protected $cache_timeout = '+12 hours'; | |
| 23 | + | |
| 24 | + /** | |
| 20 | 25 | * @since 3.06 |
| 21 | 26 | * |
| 22 | 27 | * @return void |
| 23 | 28 | */ |
| @@ -56,9 +61,9 @@ | ||
| 56 | 61 | |
| 57 | 62 | /** |
| 58 | 63 | * @since 3.06 |
| 59 | 64 | * |
| 60 | - * @return array | |
| 65 | + * @return string[] | |
| 61 | 66 | */ |
| 62 | 67 | protected function skip_categories() { |
| 63 | 68 | return array(); |
| 64 | 69 | } |
| @@ -92,9 +97,9 @@ | ||
| 92 | 97 | return isset( $templates[ $contact_form ] ) && ! empty( $templates[ $contact_form ]['url'] ); |
| 93 | 98 | } |
| 94 | 99 | |
| 95 | 100 | /** |
| 96 | - * @param string $code the code from the email sent for the API | |
| 101 | + * @param string $code the code from the email sent for the API. | |
| 97 | 102 | * |
| 98 | 103 | * @return void |
| 99 | 104 | */ |
| 100 | 105 | private static function verify_code( $code ) { |
| @@ -136,9 +141,9 @@ | ||
| 136 | 141 | } |
| 137 | 142 | } |
| 138 | 143 | |
| 139 | 144 | /** |
| 140 | - * @param string $code the base64 encoded code | |
| 145 | + * @param string $code The base64 encoded code. | |
| 141 | 146 | * |
| 142 | 147 | * @return void |
| 143 | 148 | */ |
| 144 | 149 | private static function on_api_verify_code_success( $code ) { |
| @@ -172,9 +177,9 @@ | ||
| 172 | 177 | wp_send_json_error( $error ); |
| 173 | 178 | } |
| 174 | 179 | |
| 175 | 180 | $data['url'] = $data['urlByKey'][ $key ]; |
| 176 | - } | |
| 181 | + }//end if | |
| 177 | 182 | |
| 178 | 183 | wp_send_json_success( $data ); |
| 179 | 184 | } |
| 180 | 185 | |