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