| @@ -28,12 +28,8 @@ | ||
| 28 | 28 | $template['is_favorite'] = ! empty( $template['is_favorite'] ); |
| 29 | 29 | $template['is_custom'] = ! empty( $template['is_custom'] ); |
| 30 | 30 | $template['plan_required'] = FrmFormsHelper::get_plan_required( $template ); |
| 31 | 31 | |
| 32 | - if ( self::needs_free_plan( $template ) ) { | |
| 33 | - $template['plan_required'] = 'free'; | |
| 34 | - } | |
| 35 | - | |
| 36 | 32 | if ( ! empty( $template['name'] ) ) { |
| 37 | 33 | $template['name'] = $template['is_custom'] ? $template['name'] : preg_replace( '/(\sForm)?(\sTemplate)?$/', '', $template['name'] ); |
| 38 | 34 | } else { |
| 39 | 35 | $template['name'] = ''; |
| @@ -202,51 +198,6 @@ | ||
| 202 | 198 | 'id' => 'frm-upgrade-banner', |
| 203 | 199 | ) |
| 204 | 200 | ); |
| 205 | 201 | } |
| 206 | - } | |
| 207 | - | |
| 208 | - /** | |
| 209 | - * Echo the get free templates banner. | |
| 210 | - * | |
| 211 | - * @since 6.25 | |
| 212 | - * | |
| 213 | - * @return void | |
| 214 | - */ | |
| 215 | - public static function echo_get_free_templates_banner() { | |
| 216 | - $args = array( | |
| 217 | - 'direction' => 'vertical', | |
| 218 | - ); | |
| 219 | - | |
| 220 | - ?> | |
| 221 | - <div class="frm-card-item frm-px-sm"> | |
| 222 | - <?php require FrmAppHelper::plugin_path() . '/classes/views/shared/get-free-templates-banner.php'; ?> | |
| 223 | - </div> | |
| 224 | - <?php | |
| 225 | - } | |
| 226 | - | |
| 227 | - /** | |
| 228 | - * Checks if the get free templates banner should be displayed. | |
| 229 | - * | |
| 230 | - * @since 6.25 | |
| 231 | - * | |
| 232 | - * @return bool | |
| 233 | - */ | |
| 234 | - public static function needs_get_free_templates_banner() { | |
| 235 | - return ! FrmAppHelper::pro_is_installed() && ! FrmFormTemplateApi::get_free_license_code(); | |
| 236 | - } | |
| 237 | - | |
| 238 | - /** | |
| 239 | - * Checks if a template needs the free plan override. | |
| 240 | - * | |
| 241 | - * @since 6.25 | |
| 242 | - * | |
| 243 | - * @param array $template The template data. | |
| 244 | - * @return bool | |
| 245 | - */ | |
| 246 | - private static function needs_free_plan( $template ) { | |
| 247 | - return self::needs_get_free_templates_banner() | |
| 248 | - && ! empty( $template['category_slugs'] ) | |
| 249 | - && in_array( 'free', $template['category_slugs'], true ) | |
| 250 | - && ! in_array( $template['id'], FrmFormTemplatesController::FREE_TEMPLATES_IDS, true ); | |
| 251 | 202 | } |
| 252 | 203 | } |