| @@ -30,10 +30,8 @@ | ||
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * @param array<string> $keys |
| 33 | 33 | * @param array<string> $keys_with_images |
| 34 | - * | |
| 35 | - * @return void | |
| 36 | 34 | */ |
| 37 | 35 | public static function init() { |
| 38 | 36 | /** |
| 39 | 37 | * @since 5.3 |
| @@ -81,32 +79,16 @@ | ||
| 81 | 79 | * @return void |
| 82 | 80 | */ |
| 83 | 81 | private static function populate_category_information( $categories ) { |
| 84 | 82 | foreach ( $categories as $category ) { |
| 85 | - if ( self::category_matches_a_license_type( $category ) ) { | |
| 83 | + if ( false !== strpos( $category, '+Views' ) || in_array( $category, self::$categories, true ) ) { | |
| 86 | 84 | continue; |
| 87 | 85 | } |
| 88 | - if ( in_array( $category, self::$categories, true ) ) { | |
| 89 | - continue; | |
| 90 | - } | |
| 91 | 86 | self::$categories[] = $category; |
| 92 | 87 | } |
| 93 | 88 | } |
| 94 | 89 | |
| 95 | 90 | /** |
| 96 | - * @since 5.5.2 | |
| 97 | - * | |
| 98 | - * @param string $category | |
| 99 | - * @return bool | |
| 100 | - */ | |
| 101 | - private static function category_matches_a_license_type( $category ) { | |
| 102 | - if ( false !== strpos( $category, '+Views' ) ) { | |
| 103 | - return true; | |
| 104 | - } | |
| 105 | - return in_array( $category, FrmFormsHelper::ignore_template_categories(), true ); | |
| 106 | - } | |
| 107 | - | |
| 108 | - /** | |
| 109 | 91 | * @return array<string> |
| 110 | 92 | */ |
| 111 | 93 | public static function get_categories() { |
| 112 | 94 | return isset( self::$categories ) ? self::$categories : array(); |
| @@ -158,14 +140,11 @@ | ||
| 158 | 140 | if ( false !== $purchase_url ) { |
| 159 | 141 | $application['forPurchase'] = true; |
| 160 | 142 | } |
| 161 | 143 | $application['upgradeUrl'] = $this->get_admin_upgrade_link(); |
| 162 | - $application['requires'] = FrmFormsHelper::get_plan_required( $application ); | |
| 163 | 144 | $application['link'] = $application['upgradeUrl']; |
| 164 | 145 | } |
| 165 | 146 | |
| 166 | - $application['isNew'] = $this->is_new(); | |
| 167 | - | |
| 168 | 147 | return $application; |
| 169 | 148 | } |
| 170 | 149 | |
| 171 | 150 | /** |
| @@ -198,19 +177,8 @@ | ||
| 198 | 177 | return false; |
| 199 | 178 | } |
| 200 | 179 | |
| 201 | 180 | return true; |
| 202 | - } | |
| 203 | - | |
| 204 | - /** | |
| 205 | - * Check if an application template is new. If it is, we include a "NEW" pill beside the title. | |
| 206 | - * | |
| 207 | - * @since 6.0 | |
| 208 | - * | |
| 209 | - * @return bool | |
| 210 | - */ | |
| 211 | - private function is_new() { | |
| 212 | - return ! empty( $this->api_data['is_new'] ); | |
| 213 | 181 | } |
| 214 | 182 | |
| 215 | 183 | /** |
| 216 | 184 | * @return string |