compare-plans-data.php
164 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Array for plans comparison block |
| 4 | * |
| 5 | * @var string $active_app |
| 6 | * @var LLAR\Core\LimitLoginAttempts $this |
| 7 | * |
| 8 | */ |
| 9 | |
| 10 | use LLAR\Core\Config; |
| 11 | |
| 12 | $min_plan = $active_app === 'custom' ? 'Micro Cloud' : 'Free'; |
| 13 | |
| 14 | $plans = $this->array_name_plans(); |
| 15 | $actual_plan = $active_app === 'custom' ? $this->info_sub_group() : $min_plan; |
| 16 | $upgrade_url = $active_app === 'custom' ? $this->info_upgrade_url() : 'https://www.limitloginattempts.com/info.php?from=plugin-premium-tab-upgrade'; |
| 17 | |
| 18 | $attribute = []; |
| 19 | foreach ( $plans as $plan => $rate ) { |
| 20 | |
| 21 | if ( $rate < $plans[$actual_plan] ) { |
| 22 | $attribute[$plan]['attr'] = ''; |
| 23 | $attribute[$plan]['title'] = ''; |
| 24 | } |
| 25 | elseif ( $rate === $plans[$actual_plan] ) { |
| 26 | $attribute[$plan]['attr'] = 'class="button menu__item button__transparent_orange llar-disabled"'; |
| 27 | $attribute[$plan]['title'] = __( 'Installed', 'limit-login-attempts-reloaded' ); |
| 28 | } |
| 29 | elseif ( $plan === 'Micro Cloud' ) { |
| 30 | $attribute[$plan]['attr'] = 'class="button menu__item button__orange button_micro_cloud"'; |
| 31 | $attribute[$plan]['title'] = __( 'Get Started (Free)', 'limit-login-attempts-reloaded' ); |
| 32 | } |
| 33 | else { |
| 34 | if ( $plan === 'Premium' ) { |
| 35 | $attribute[$plan]['attr'] = 'class="button menu__item button__orange" href="' . esc_url(( $min_plan === 'Micro Cloud' ) ? add_query_arg('id', '9', $this->info_upgrade_url()) : "https://www.limitloginattempts.com/info.php?id=24") . '" target="_blank"'; |
| 36 | } |
| 37 | if ( $plan === 'Premium +' ) { |
| 38 | $attribute[$plan]['attr'] = 'class="button menu__item button__orange" href="' . esc_url(( $min_plan === 'Micro Cloud' ) ? add_query_arg('id', '10', $this->info_upgrade_url()) : "https://www.limitloginattempts.com/info.php?id=25") . '" target="_blank"'; |
| 39 | } |
| 40 | if ( $plan === 'Professional' ) { |
| 41 | $attribute[$plan]['attr'] = 'class="button menu__item button__orange" href="' . esc_url(( $min_plan === 'Micro Cloud' ) ? add_query_arg('id', '11', $this->info_upgrade_url()) : "https://www.limitloginattempts.com/info.php?id=26") . '" target="_blank"'; |
| 42 | } |
| 43 | $attribute[$plan]['title'] = __( 'Upgrade now', 'limit-login-attempts-reloaded' ); |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | $lock = '<img src="' . LLA_PLUGIN_URL . 'assets/css/images/icon-lock-bw.png" class="icon-lock">'; |
| 48 | $yes = '<span class="llar_orange">✓</span>'; |
| 49 | |
| 50 | $compare_list = array( |
| 51 | 'buttons_header' => array( |
| 52 | 'Free' => '<a ' . $attribute['Free']['attr'] . '>' . esc_html__( $attribute['Free']['title'], 'limit-login-attempts-reloaded' ) . '</a>', |
| 53 | 'Micro Cloud' => '<a ' . $attribute['Micro Cloud']['attr'] . '>' . esc_html__( $attribute['Micro Cloud']['title'], 'limit-login-attempts-reloaded' ) . '</a>', |
| 54 | 'Premium' => '<a ' . $attribute['Premium']['attr'] . '>' . esc_html__( $attribute['Premium']['title'], 'limit-login-attempts-reloaded' ) . '</a>', |
| 55 | 'Premium +' => '<a ' . $attribute['Premium +']['attr'] . '>' . esc_html__( $attribute['Premium +']['title'], 'limit-login-attempts-reloaded' ) . '</a>', |
| 56 | 'Professional' => '<a ' . $attribute['Professional']['attr'] . '>' . esc_html__( $attribute['Professional']['title'], 'limit-login-attempts-reloaded' ) . '</a>', |
| 57 | ), |
| 58 | __( 'Limit Number of Retry Attempts', 'limit-login-attempts-reloaded' ) => array( |
| 59 | 'Free' => $yes, |
| 60 | 'Micro Cloud' => $yes, |
| 61 | 'Premium' => $yes, |
| 62 | 'Premium +' => $yes, |
| 63 | 'Professional' => $yes, |
| 64 | ), |
| 65 | __( 'Configurable Lockout Timing', 'limit-login-attempts-reloaded' ) => array( |
| 66 | 'Free' => $yes, |
| 67 | 'Micro Cloud' => $yes, |
| 68 | 'Premium' => $yes, |
| 69 | 'Premium +' => $yes, |
| 70 | 'Professional' => $yes, |
| 71 | ), |
| 72 | __( 'Login Firewall', 'limit-login-attempts-reloaded' ) => array( |
| 73 | 'description' => __( "Secure your login page with our cutting-edge login firewall, defending against unauthorized access attempts and protecting your users' accounts and sensitive information.", 'limit-login-attempts-reloaded' ), |
| 74 | 'Free' => $lock, |
| 75 | 'Micro Cloud' => $yes, |
| 76 | 'Premium' => $yes, |
| 77 | 'Premium +' => $yes, |
| 78 | 'Professional' => $yes, |
| 79 | ), |
| 80 | __( 'Performance Optimizer', 'limit-login-attempts-reloaded' ) => array( |
| 81 | 'description' => __( 'Absorb failed login attempts from brute force bots in the cloud to keep your website at its optimal performance.', 'limit-login-attempts-reloaded' ), |
| 82 | 'Free' => $lock, |
| 83 | 'Micro Cloud' => $yes . '<span class="description">' . sprintf(esc_html__( '1k for first month%s(100 per month after)', 'limit-login-attempts-reloaded' ),'<br>') . '</span>', |
| 84 | 'Premium' => $yes . '<span class="description">' . esc_html__( '100k requests per month', 'limit-login-attempts-reloaded' ) . '</span>', |
| 85 | 'Premium +' => $yes . '<span class="description">' . esc_html__( '200k requests per month', 'limit-login-attempts-reloaded' ) . '</span>', |
| 86 | 'Professional' => $yes . '<span class="description">' . esc_html__( '300k requests per month', 'limit-login-attempts-reloaded' ) . '</span>', |
| 87 | ), |
| 88 | __( 'Successful Login Logs', 'limit-login-attempts-reloaded' ) => array( |
| 89 | 'description' => __( 'Ensure the security and integrity of your website by logging your successful logins.', 'limit-login-attempts-reloaded' ), |
| 90 | 'Free' => $lock, |
| 91 | 'Micro Cloud' => $yes, |
| 92 | 'Premium' => $yes, |
| 93 | 'Premium +' => $yes, |
| 94 | 'Professional' => $yes, |
| 95 | ), |
| 96 | __( 'Block By Country', 'limit-login-attempts-reloaded' ) => array( |
| 97 | 'description' => __( 'Disable IPs from any region to disable logins.', 'limit-login-attempts-reloaded' ), |
| 98 | 'Free' => $lock, |
| 99 | 'Micro Cloud' => $yes, |
| 100 | 'Premium' => $lock, |
| 101 | 'Premium +' => $yes, |
| 102 | 'Professional' => $yes, |
| 103 | ), |
| 104 | __( 'Access Blocklist of Malicious IPs', 'limit-login-attempts-reloaded' ) => array( |
| 105 | 'description' => __( 'Add another layer of protection from brute force bots by accessing a global database of known IPs with malicious activity.', 'limit-login-attempts-reloaded' ), |
| 106 | 'Free' => $lock, |
| 107 | 'Micro Cloud' => $yes, |
| 108 | 'Premium' => $lock, |
| 109 | 'Premium +' => $yes, |
| 110 | 'Professional' => $yes, |
| 111 | ), |
| 112 | __( 'Auto IP Blocklist', 'limit-login-attempts-reloaded' ) => array( |
| 113 | 'description' => __( 'Automatically add malicious IPs to your blocklist when triggered by the system.', 'limit-login-attempts-reloaded' ), |
| 114 | 'Free' => $lock, |
| 115 | 'Micro Cloud' => $yes, |
| 116 | 'Premium' => $lock, |
| 117 | 'Premium +' => $lock, |
| 118 | 'Professional' => $yes, |
| 119 | ), |
| 120 | __( 'Access Active Cloud Blocklist', 'limit-login-attempts-reloaded' ) => array( |
| 121 | 'description' => __( 'Use system wide data from over 10,000 WordPress websites to identify and block malicious IPs. This is an active list in real-time.', 'limit-login-attempts-reloaded' ), |
| 122 | 'Free' => $lock, |
| 123 | 'Micro Cloud' => $yes, |
| 124 | 'Premium' => $lock, |
| 125 | 'Premium +' => $lock, |
| 126 | 'Professional' => $yes, |
| 127 | ), |
| 128 | __( 'Intelligent IP Blocking', 'limit-login-attempts-reloaded' ) => array( |
| 129 | 'description' => __( 'Use active IP database via the cloud to automatically block users before they are able to make a failed login.', 'limit-login-attempts-reloaded' ), |
| 130 | 'Free' => $lock, |
| 131 | 'Micro Cloud' => $yes, |
| 132 | 'Premium' => $yes, |
| 133 | 'Premium +' => $yes, |
| 134 | 'Professional' => $yes, |
| 135 | ), |
| 136 | __( 'Synchronize Lockouts & Safelists/Blocklists', 'limit-login-attempts-reloaded' ) => array( |
| 137 | 'description' => __( 'Lockouts & safelists/blocklists can be shared between multiple domains to enhance protection.', 'limit-login-attempts-reloaded' ), |
| 138 | 'Free' => $lock, |
| 139 | 'Micro Cloud' => $lock, |
| 140 | 'Premium' => $yes, |
| 141 | 'Premium +' => $yes, |
| 142 | 'Professional' => $yes, |
| 143 | ), |
| 144 | __( 'Premium Support', 'limit-login-attempts-reloaded' ) => array( |
| 145 | 'description' => sprintf( |
| 146 | __( 'Receive 1 on 1 technical support via email for any issues. Free support availabe in the <a href="%s" target="_blank">WordPress support forum</a>.', 'limit-login-attempts-reloaded' ), |
| 147 | 'https://wordpress.org/support/plugin/limit-login-attempts-reloaded/'), |
| 148 | 'Free' => $lock, |
| 149 | 'Micro Cloud' => $lock, |
| 150 | 'Premium' => $yes, |
| 151 | 'Premium +' => $yes, |
| 152 | 'Professional' => $yes, |
| 153 | ), |
| 154 | 'buttons_footer' => array( |
| 155 | 'Free' => '<a ' . $attribute['Free']['attr'] . '>' . esc_html__( $attribute['Free']['title'], 'limit-login-attempts-reloaded' ) . '</a>', |
| 156 | 'Micro Cloud' => '<a ' . $attribute['Micro Cloud']['attr'] . '>' . esc_html__( $attribute['Micro Cloud']['title'], 'limit-login-attempts-reloaded' ) . '</a>', |
| 157 | 'Premium' => '<a ' . $attribute['Premium']['attr'] . '>' . esc_html__( $attribute['Premium']['title'], 'limit-login-attempts-reloaded' ) . '</a>', |
| 158 | 'Premium +' => '<a ' . $attribute['Premium +']['attr'] . '>' . esc_html__( $attribute['Premium +']['title'], 'limit-login-attempts-reloaded' ) . '</a>', |
| 159 | 'Professional' => '<a ' . $attribute['Professional']['attr'] . '>' . esc_html__( $attribute['Professional']['title'], 'limit-login-attempts-reloaded' ) . '</a>', |
| 160 | ), |
| 161 | ); |
| 162 | |
| 163 | return $compare_list; |
| 164 |