| @@ -25,9 +25,8 @@ | ||
| 25 | 25 | /** |
| 26 | 26 | * Show the CTA to upgrade or renew. |
| 27 | 27 | * |
| 28 | 28 | * @since 6.15 |
| 29 | - * | |
| 30 | 29 | * @return void |
| 31 | 30 | */ |
| 32 | 31 | public static function show_upgrade_renew_cta() { |
| 33 | 32 | if ( FrmAddonsController::is_license_expired() ) { |
| @@ -48,9 +47,8 @@ | ||
| 48 | 47 | /** |
| 49 | 48 | * Show 'Renew' banner for expired users. |
| 50 | 49 | * |
| 51 | 50 | * @since 6.15 |
| 52 | - * | |
| 53 | 51 | * @return void |
| 54 | 52 | */ |
| 55 | 53 | private static function show_expired_cta() { |
| 56 | 54 | FrmTipsHelper::show_admin_cta( |
| @@ -69,9 +67,8 @@ | ||
| 69 | 67 | /** |
| 70 | 68 | * Show 'Upgrade to Pro' banner for users not connected to Pro. |
| 71 | 69 | * |
| 72 | 70 | * @since 6.15 |
| 73 | - * | |
| 74 | 71 | * @return void |
| 75 | 72 | */ |
| 76 | 73 | private static function show_lite_cta() { |
| 77 | 74 | FrmTipsHelper::show_admin_cta( |
| @@ -95,9 +92,8 @@ | ||
| 95 | 92 | /** |
| 96 | 93 | * Show 'Upgrade' banner for non-elite users. |
| 97 | 94 | * |
| 98 | 95 | * @since 6.15 |
| 99 | - * | |
| 100 | 96 | * @return void |
| 101 | 97 | */ |
| 102 | 98 | private static function show_elite_cta() { |
| 103 | 99 | FrmTipsHelper::show_admin_cta( |
| @@ -124,9 +120,8 @@ | ||
| 124 | 120 | /** |
| 125 | 121 | * Displays a reconnect link for checking add-ons status. |
| 126 | 122 | * |
| 127 | 123 | * @since 6.15 |
| 128 | - * | |
| 129 | 124 | * @return void |
| 130 | 125 | */ |
| 131 | 126 | public static function get_reconnect_link() { |
| 132 | 127 | if ( ! FrmAppHelper::pro_is_connected() ) { |
| @@ -131,9 +126,8 @@ | ||
| 131 | 126 | public static function get_reconnect_link() { |
| 132 | 127 | if ( ! FrmAppHelper::pro_is_connected() ) { |
| 133 | 128 | return; |
| 134 | 129 | } |
| 135 | - // phpcs:disable Generic.WhiteSpace.ScopeIndent | |
| 136 | 130 | ?> |
| 137 | 131 | <p class="frm-py-2xs"> |
| 138 | 132 | <span class="frm-font-medium frm-text-grey-700"><?php esc_html_e( 'Missing add-ons?', 'formidable' ); ?></span> |
| 139 | 133 | <a href="#" id="frm_reconnect_link" class="frm-show-authorized frm-font-semibold" data-refresh="1"> |
| @@ -140,9 +134,8 @@ | ||
| 140 | 134 | <?php esc_html_e( 'Check now for a recent upgrade or renewal', 'formidable' ); ?> |
| 141 | 135 | </a> |
| 142 | 136 | </p> |
| 143 | 137 | <?php |
| 144 | - // phpcs:enable Generic.WhiteSpace.ScopeIndent | |
| 145 | 138 | } |
| 146 | 139 | |
| 147 | 140 | /** |
| 148 | 141 | * Get the icon for a specific addon. |
| @@ -147,11 +140,9 @@ | ||
| 147 | 140 | /** |
| 148 | 141 | * Get the icon for a specific addon. |
| 149 | 142 | * |
| 150 | 143 | * @since 6.15 |
| 151 | - * | |
| 152 | 144 | * @param string $slug The slug of the addon. |
| 153 | - * | |
| 154 | 145 | * @return void |
| 155 | 146 | */ |
| 156 | 147 | public static function get_addon_icon( $slug ) { |
| 157 | 148 | $icons_map = array( |
| @@ -177,13 +168,11 @@ | ||
| 177 | 168 | 'twilio' => 'twilio', |
| 178 | 169 | 'woocommerce' => 'woocommerce', |
| 179 | 170 | 'zapier' => 'zapier', |
| 180 | 171 | 'convertkit' => 'convertkit', |
| 181 | - 'n8n' => 'n8n', | |
| 182 | 172 | ); |
| 183 | 173 | |
| 184 | 174 | $icon = array_key_exists( $slug, $icons_map ) ? 'frm_' . $icons_map[ $slug ] . '_icon' : 'frm_logo_icon'; |
| 185 | - | |
| 186 | 175 | if ( 'ai' === $slug ) { |
| 187 | 176 | $icon = str_replace( '_', '-', $icon ); |
| 188 | 177 | } |
| 189 | 178 | |
| @@ -195,9 +184,8 @@ | ||
| 195 | 184 | * |
| 196 | 185 | * @since 6.15 |
| 197 | 186 | * |
| 198 | 187 | * @param array $addon |
| 199 | - * | |
| 200 | 188 | * @return void |
| 201 | 189 | */ |
| 202 | 190 | public static function add_addon_attributes( $addon ) { |
| 203 | 191 | self::set_plan_required( $addon ); |
| @@ -227,13 +215,12 @@ | ||
| 227 | 215 | * |
| 228 | 216 | * @since 6.15 |
| 229 | 217 | * |
| 230 | 218 | * @param array $addon |
| 231 | - * | |
| 232 | 219 | * @return string |
| 233 | 220 | */ |
| 234 | 221 | private static function prepare_single_addon_classes( $addon ) { |
| 235 | - $class_names = array( 'frm-card-item frm-card-item--outlined frm-flex-col' ); | |
| 222 | + $class_names = array( 'frm-card-item frm-flex-col' ); | |
| 236 | 223 | $class_names[] = 'plugin-card-' . $addon['slug']; |
| 237 | 224 | $class_names[] = 'frm-addon-' . $addon['status']['type']; |
| 238 | 225 | |
| 239 | 226 | if ( self::is_locked() ) { |
| @@ -261,9 +248,8 @@ | ||
| 261 | 248 | * |
| 262 | 249 | * @since 6.15 |
| 263 | 250 | * |
| 264 | 251 | * @param array $addon The addon array that will be modified by reference. |
| 265 | - * | |
| 266 | 252 | * @return void |
| 267 | 253 | */ |
| 268 | 254 | private static function set_plan_required( $addon ) { |
| 269 | 255 | self::$plan_required = FrmFormsHelper::get_plan_required( $addon ); |
| @@ -285,23 +271,21 @@ | ||
| 285 | 271 | * |
| 286 | 272 | * @since 6.17 |
| 287 | 273 | * |
| 288 | 274 | * @param string $color Star color. |
| 289 | - * | |
| 290 | 275 | * @return void |
| 291 | 276 | */ |
| 292 | 277 | public static function show_five_star_rating( $color = 'black' ) { |
| 293 | - // phpcs:disable Generic.WhiteSpace.ScopeIndent | |
| 278 | + $icon = file_get_contents( FrmAppHelper::plugin_path() . '/images/star.svg' ); | |
| 294 | 279 | ?> |
| 295 | 280 | <span style="color: <?php echo esc_attr( $color ); ?>;"> |
| 296 | 281 | <?php |
| 297 | 282 | for ( $i = 0; $i < 5; $i++ ) { |
| 298 | - readfile( FrmAppHelper::plugin_path() . '/images/star.svg' ); | |
| 283 | + echo $icon; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 299 | 284 | } |
| 300 | 285 | ?> |
| 301 | 286 | </span> |
| 302 | 287 | <?php |
| 303 | - // phpcs:enable Generic.WhiteSpace.ScopeIndent | |
| 304 | 288 | } |
| 305 | 289 | |
| 306 | 290 | /** |
| 307 | 291 | * Shows the guarantee icon. |
| @@ -310,13 +294,11 @@ | ||
| 310 | 294 | * |
| 311 | 295 | * @return void |
| 312 | 296 | */ |
| 313 | 297 | public static function guarantee_icon() { |
| 314 | - // phpcs:disable Generic.WhiteSpace.ScopeIndent | |
| 315 | 298 | ?> |
| 316 | 299 | <img src="<?php echo esc_url( FrmAppHelper::plugin_url() . '/images/guarantee.svg' ); ?>" alt="" /> |
| 317 | 300 | <?php |
| 318 | - // phpcs:enable Generic.WhiteSpace.ScopeIndent | |
| 319 | 301 | } |
| 320 | 302 | |
| 321 | 303 | /** |
| 322 | 304 | * Gets reviews text. |
| @@ -324,9 +306,8 @@ | ||
| 324 | 306 | * @since 6.17 |
| 325 | 307 | * |
| 326 | 308 | * @param string $count Review count. |
| 327 | 309 | * @param string $site Site name. |
| 328 | - * | |
| 329 | 310 | * @return string |
| 330 | 311 | */ |
| 331 | 312 | public static function get_reviews_text( $count, $site ) { |
| 332 | 313 | return sprintf( |