| @@ -38,9 +38,9 @@ | ||
| 38 | 38 | * @param array $keys |
| 39 | 39 | */ |
| 40 | 40 | self::$keys = apply_filters( |
| 41 | 41 | 'frm_application_data_keys', |
| 42 | - array( 'key', 'name', 'description', 'link', 'categories', 'views', 'forms', 'used_addons' ) | |
| 42 | + array( 'key', 'name', 'description', 'link', 'categories', 'views', 'forms' ) | |
| 43 | 43 | ); |
| 44 | 44 | self::$keys_with_images = array_merge( |
| 45 | 45 | self::get_template_keys_with_local_png_images(), |
| 46 | 46 | self::get_template_keys_with_local_webp_images() |
| @@ -82,29 +82,8 @@ | ||
| 82 | 82 | 'team-directory', |
| 83 | 83 | 'product-review', |
| 84 | 84 | 'real-estate-listings', |
| 85 | 85 | 'business-directory', |
| 86 | - 'artist-gallery', | |
| 87 | - 'classifieds', | |
| 88 | - 'community-event-calendar', | |
| 89 | - 'company-timeline', | |
| 90 | - 'crowdfunding', | |
| 91 | - 'job-board', | |
| 92 | - 'logo-cloud', | |
| 93 | - 'multi-property-booking-system', | |
| 94 | - 'wedding-venue-booking', | |
| 95 | - 'permission-slip', | |
| 96 | - 'property-directory', | |
| 97 | - 'radio-station', | |
| 98 | - 'recipe', | |
| 99 | - 'rsvp-invite', | |
| 100 | - 'searchable-directory', | |
| 101 | - 'shopping-cart', | |
| 102 | - 'sports-league-calendar', | |
| 103 | - 'staff-directory', | |
| 104 | - 'tiered-pricing', | |
| 105 | - 'trip-itinerary', | |
| 106 | - 'twitterx', | |
| 107 | 86 | ); |
| 108 | 87 | } |
| 109 | 88 | |
| 110 | 89 | /** |
| @@ -151,9 +130,9 @@ | ||
| 151 | 130 | /** |
| 152 | 131 | * @return array<string> |
| 153 | 132 | */ |
| 154 | 133 | public static function get_categories() { |
| 155 | - return self::$categories ?? array(); | |
| 134 | + return isset( self::$categories ) ? self::$categories : array(); | |
| 156 | 135 | } |
| 157 | 136 | |
| 158 | 137 | /** |
| 159 | 138 | * @return array |
| @@ -201,31 +180,18 @@ | ||
| 201 | 180 | $application['hasLiteThumbnail'] = in_array( $application['key'], self::$keys_with_images, true ); |
| 202 | 181 | $application['isWebp'] = in_array( $application['key'], self::get_template_keys_with_local_webp_images(), true ); |
| 203 | 182 | |
| 204 | 183 | if ( ! array_key_exists( 'url', $application ) ) { |
| 205 | - $application['requires'] = FrmFormsHelper::get_plan_required( $application ); | |
| 206 | - | |
| 207 | - if ( false === $application['requires'] ) { | |
| 208 | - // Application is invalid if the URL is unavailable and there is no plan required. | |
| 209 | - return array(); | |
| 210 | - } | |
| 211 | - | |
| 212 | 184 | $purchase_url = $this->is_available_for_purchase(); |
| 213 | 185 | if ( false !== $purchase_url ) { |
| 214 | 186 | $application['forPurchase'] = true; |
| 215 | 187 | } |
| 216 | 188 | $application['upgradeUrl'] = $this->get_admin_upgrade_link(); |
| 189 | + $application['requires'] = FrmFormsHelper::get_plan_required( $application ); | |
| 217 | 190 | $application['link'] = $application['upgradeUrl']; |
| 218 | 191 | } |
| 219 | 192 | |
| 220 | 193 | $application['isNew'] = $this->is_new(); |
| 221 | - | |
| 222 | - $application['usedAddons'] = array(); | |
| 223 | - if ( isset( $application['used_addons'] ) ) { | |
| 224 | - // Change key to camel case. | |
| 225 | - $application['usedAddons'] = $application['used_addons']; | |
| 226 | - unset( $application['used_addons'] ); | |
| 227 | - } | |
| 228 | 194 | |
| 229 | 195 | return $application; |
| 230 | 196 | } |
| 231 | 197 | |