PluginProbe
MainWP Dashboard: Self-hosted WordPress Management for Agencies / 6.2.2
MainWP Dashboard: Self-hosted WordPress Management for Agencies v6.2.2
6.2.2 6.2.1 6.2 6.1.8 6.1.7 6.1.6 6.1.5 6.1.4 6.1.3 6.1.2 6.1.1 6.1 6.0.12 6.0.11 4.6.0.1 5.0 5.0.1 5.0.2 5.0.3 5.0.3.1 5.0.3.2 5.1 5.1.1 5.2 5.2.1 All 155 releases
← All changes | class/class-mainwp-extensions-view.php +972 -389 5.1.1 → 6.2.2 View file →
@@ -8,8 +8,13 @@
8 8 */
9 9
10 10 namespace MainWP\Dashboard;
11 11
12 +// Exit if accessed directly.
13 +if ( ! defined( 'ABSPATH' ) ) {
14 + exit;
15 +}
16 +
12 17 /**
13 18 * Class MainWP_Extensions_View
14 19 *
15 20 * @package MainWP\Dashboard
@@ -35,10 +40,10 @@
35 40 */
36 41 public static function init_menu() {
37 42 return add_submenu_page(
38 43 'mainwp_tab',
39 - __( 'Extensions', 'mainwp' ),
40 - ' <span id="mainwp-Extensions">' . esc_html__( 'Extensions', 'mainwp' ) . '</span>',
44 + __( 'Add-ons', 'mainwp' ),
45 + ' <span id="mainwp-Extensions">' . esc_html__( 'Add-ons', 'mainwp' ) . '</span>',
41 46 'read',
42 47 'Extensions',
43 48 array(
44 49 MainWP_Extensions::get_class_name(),
@@ -77,9 +82,9 @@
77 82 MainWP_UI::render_top_header( $params );
78 83
79 84 $renderItems = array();
80 85 $renderItems[] = array(
81 - 'title' => esc_html__( 'Manage Extensions', 'mainwp' ),
86 + 'title' => esc_html__( 'Manage Add-ons', 'mainwp' ),
82 87 'href' => 'admin.php?page=Extensions',
83 88 'active' => ( '' === $shownPage ) ? true : false,
84 89 );
85 90
@@ -108,15 +113,40 @@
108 113 echo '</div>';
109 114 }
110 115
111 116 /**
112 - * Method render()
117 + * Check if any installed extension (enabled or disabled) is a Pro type.
113 118 *
119 + * @param array $extensions Enabled extensions.
120 + * @param array $extensions_disabled Disabled extensions.
121 + * @param array $all_available All available extensions data keyed by slug.
122 + *
123 + * @return bool True if at least one installed extension is Pro, false otherwise.
124 + */
125 + private static function has_pro_extension_installed( $extensions, $extensions_disabled, $all_available ) {
126 + $all_installed = array_merge( (array) $extensions, (array) $extensions_disabled );
127 + foreach ( $all_installed as $extension ) {
128 + $slug = dirname( $extension['slug'] );
129 + if ( isset( $all_available[ $slug ]['type'] ) && 'pro' === $all_available[ $slug ]['type'] ) {
130 + return true;
131 + }
132 + }
133 + return false;
134 + }
135 +
136 + /**
114 137 * Render the extensions page.
115 138 *
139 + * Displays the main extensions management interface including enabled/disabled add-ons,
140 + * search functionality, category filtering, and privacy information. Handles both empty
141 + * state with intro notice and populated state with extension cards.
142 + *
116 143 * @uses \MainWP\Dashboard\MainWP_Extensions_Handler::get_extensions()
117 - * @uses \MainWP\Dashboard\MainWP_Extensions_Handler::added_on_menu()
144 + * @uses \MainWP\Dashboard\MainWP_Extensions_Handler::get_extensions_disabled()
118 145 * @uses \MainWP\Dashboard\MainWP_Utility::remove_http_prefix()
146 + * @uses \MainWP\Dashboard\MainWP_Api_Manager_Key::instance()
147 + *
148 + * @return void
119 149 */
120 150 public static function render() { // phpcs:ignore -- NOSONAR -Current complexity is the only way to achieve desired results, pull request solutions appreciated.
121 151 $mainwp_api_key = false;
122 152 if ( get_option( 'mainwp_extensions_api_save_login' ) ) {
@@ -132,68 +162,121 @@
132 162 $extensions_disabled = MainWP_Extensions_Handler::get_extensions_disabled();
133 163
134 164 $extensions = MainWP_Extensions_Handler::get_extensions();
135 165 $extension_update = get_site_transient( 'update_plugins' );
136 - $is_demo = MainWP_Demo_Handle::is_demo_mode();
166 +
167 + $extensions_count = 0;
168 + $extensions_disabled_count = 0;
169 +
170 + static::sort_extensions( $extensions );
171 + static::sort_extensions( $extensions_disabled );
172 +
137 173 ?>
138 - <div id="mainwp-manage-extensions">
139 - <div class="mainwp-extensions-api-loading" style="display:none">
140 - <div class="ui active inverted page dimmer">
141 - <div class="ui medium text loader"></div>
142 - </div>
143 - </div>
144 - <div class="mainwp-main-content">
174 + <div id="mainwp-manage-extensions" class="ui padded segment">
175 +
176 + <?php if ( empty( $extensions ) && empty( $extensions_disabled ) ) { ?>
177 + <?php static::render_intro_notice( $mainwp_api_key ); ?>
178 + <?php } else { ?>
145 179 <?php
146 - static::render_incompatible_notice();
147 - if ( $is_demo ) {
148 - ?>
149 - <div class="ui yellow message">
150 - <?php esc_html_e( 'Extensions are disabled in the Demo Mode.', 'mainwp' ); ?>
151 - <i class="close icon"></i>
152 - </div>
153 - <?php
180 + if ( \mainwp_current_user_can( 'dashboard', 'manage_extensions' ) ) {
181 + static::render_licensing_actions_bar( $mainwp_api_key );
154 182 }
155 183 ?>
156 - <?php if ( empty( $extensions ) && empty( $extensions_disabled ) ) { ?>
157 - <?php static::render_intro_notice(); ?>
158 - <?php
159 - } else {
160 - ?>
161 - <?php if ( MainWP_Utility::show_mainwp_message( 'notice', 'mainwp-extensions-info-message' ) ) { ?>
162 - <div class="ui info message">
184 + <div class="ui hidden divider"></div>
185 + <div class="ui stackable grid">
186 + <div class="eight wide column" data-tooltip="<?php esc_attr_e( 'Extensions are purpose-built add-ons that expand your Dashboard\'s functionality without relying on external services. Integrations are add-ons that connect MainWP with third-party tools, bringing their power directly into your Dashboard.', 'mainwp' ); ?>" data-inverted="" data-position="bottom left">
187 + <button class="ui mini basic green button" id="mainwp-extensions-show-all"><i class="box icon"></i><?php esc_html_e( 'Show All Add-ons', 'mainwp' ); ?></button>
188 + <button class="ui mini basic button" id="mainwp-extensions-show-extensions"><i class="puzzle piece icon"></i><?php esc_html_e( 'Show Extensions', 'mainwp' ); ?></button>
189 + <button class="ui mini basic button" id="mainwp-extensions-show-integrations"><i class="plug icon"></i><?php esc_html_e( 'Show Integrations', 'mainwp' ); ?></button>
190 + </div>
191 + <div class="eight wide right aligned column">
192 + <div id="mainwp-search-extensions" class="ui mini search">
193 + <div class="ui icon input">
194 + <input class="prompt" type="text" id="mainwp-search-extensions-input" autocomplete="one-time-code" placeholder="<?php esc_attr_e( 'Find add-on...', 'mainwp' ); ?>">
195 + <i class="search icon"></i>
196 + <i class="remove icon"></i>
197 + </div>
198 + <div class="results"></div>
199 + </div>
200 + </div>
201 + </div>
202 + <div class="ui hidden divider"></div>
203 +
204 + <?php if ( MainWP_Utility::show_mainwp_message( 'notice', 'mainwp-extensions-info-message' ) ) : ?>
205 + <div>
206 + <div class="ui icon message mainwp-welcome-message" style="margin-bottom:0;">
207 + <em data-emoji=":jigsaw:" class="big"></em>
208 + <div class="content">
209 + <div class="ui massive header"><?php esc_html_e( 'Manage Your Installed Add-ons', 'mainwp' ); ?></div>
210 + <p><?php esc_html_e( 'Activate, deactivate, or explore new tools for your MainWP Dashboard.', 'mainwp' ); ?></p>
211 + <?php if ( ! MainWP_Hooks::is_pro_member() && ! static::has_pro_extension_installed( $extensions, $extensions_disabled, $all_available_extensions ) ) : ?>
212 + <div><?php esc_html_e( 'Missing something?', 'mainwp' ); ?> <a href="#" class="ui mini green button" id="mainwp-extensions-message-bulkinstall"><?php esc_html_e( 'Install Free Add-ons', 'mainwp' ); ?></a> or <a href="https://mainwp.com/signup/" class="ui mini green basic button" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'Upgrade to Pro', 'mainwp' ); ?></a></div>
213 + <?php endif; ?>
214 + </div>
163 215 <i class="close icon mainwp-notice-dismiss" notice-id="mainwp-extensions-info-message"></i>
164 - <?php printf( esc_html__( 'Quickly access, install, and activate your MainWP extensions. If you need additional help with managing your MainWP Extensions, please check this %1$shelp documentation%2$s.', 'mainwp' ), '<a href="https://kb.mainwp.com/docs/category/getting-started/first-steps-with-extensions/" target="_blank">', '</a> <i class="external alternate icon"></i>' ); // NOSONAR - noopener - open safe. ?>
165 216 </div>
166 - <?php } ?>
167 - <div class="ui segment" id="mainwp-extensions-search-no-results" style="display:none">
168 - <div class="ui info message"><?php esc_html_e( 'Your search returned no results. The extension may need to be installed or does not exist.' ); ?></div>
217 + </div>
218 + <?php endif; ?>
219 +
220 + <div id="mainwp-extensions-search-no-results" style="display:none">
221 + <div class="ui info message"><?php esc_html_e( 'Your search returned no results. The add-on may need to be installed or does not exist.', 'mainwp' ); ?></div>
222 + </div>
223 + <div>
224 + <div class="mainwp-extensions-api-loading" style="display:none">
225 + <div class="ui active page dimmer">
226 + <div class="ui double text loader"><?php esc_html_e( 'Loading...', 'mainwp' ); ?></div>
169 227 </div>
170 - <div class="ui four stackable cards" id="mainwp-extensions-list">
171 - <?php if ( isset( $extensions ) && is_array( $extensions ) ) { ?>
172 - <?php foreach ( $extensions as $extension ) { ?>
173 - <?php
174 - if ( ! mainwp_current_user_have_right( 'extension', dirname( $extension['slug'] ) ) ) {
175 - continue;
176 - }
228 + </div>
229 + <div id="mainwp-extensions-list" class="ui fluid accordion">
230 + <div class="active title" style="background:none!important;">
231 + <i class="dropdown icon"></i>
232 + <h2 class="ui header" style="display:inline-block;margin:0;">
233 + <div class="content" style="background:none!important;">
234 + <?php esc_html_e( 'Enabled Add-ons', 'mainwp' ); ?>
235 + <div class="sub header"><?php esc_html_e( 'The add-ons you\'re currently using to power up your MainWP Dashboard.', 'mainwp' ); ?></div>
236 + </div>
237 + </h2>
238 + </div>
239 + <div class="active content" style="background:none!important;">
240 + <div class="ui four cards" id="mainwp-active-add-ons-cards">
241 + <?php if ( isset( $extensions ) && is_array( $extensions ) ) { ?>
242 + <?php foreach ( $extensions as $extension ) { ?>
243 + <?php
244 + if ( ! \mainwp_current_user_can( 'extension', dirname( $extension['slug'] ) ) ) {
245 + continue;
246 + }
177 247
178 - $extensions_data = isset( $all_available_extensions[ dirname( $extension['slug'] ) ] ) ? $all_available_extensions[ dirname( $extension['slug'] ) ] : array();
248 + $extensions_data = isset( $all_available_extensions[ dirname( $extension['slug'] ) ] ) ? $all_available_extensions[ dirname( $extension['slug'] ) ] : array();
179 249
180 - if ( isset( $extensions_data['img'] ) && ! empty( $extensions_data['img'] ) ) {
181 - $img_url = $extensions_data['img'];
182 - } elseif ( isset( $extension['icon'] ) && ! empty( $extension['icon'] ) ) {
183 - $img_url = $extension['icon'];
184 - } elseif ( isset( $extension['iconURI'] ) && '' !== $extension['iconURI'] ) {
185 - $img_url = MainWP_Utility::remove_http_prefix( $extension['iconURI'] );
186 - } else {
187 - $img_url = MAINWP_PLUGIN_URL . 'assets/images/extensions/placeholder.png';
188 - }
250 + if ( isset( $extensions_data['img'] ) && ! empty( $extensions_data['img'] ) ) {
251 + $img_url = $extensions_data['img'];
252 + } elseif ( isset( $extension['icon'] ) && ! empty( $extension['icon'] ) ) {
253 + $img_url = $extension['icon'];
254 + } elseif ( isset( $extension['iconURI'] ) && '' !== $extension['iconURI'] ) {
255 + $img_url = MainWP_Utility::remove_http_prefix( $extension['iconURI'] );
256 + } else {
257 + $img_url = MAINWP_PLUGIN_URL . 'assets/images/extensions/placeholder.png';
258 + }
189 259
190 - static::render_extension_card( $extension, $extension_update, $img_url );
191 - ?>
192 -
193 - <?php } ?>
194 - <?php } ?>
195 -
260 + static::render_extension_card( $extension, $extension_update, $img_url );
261 + ?>
262 + <?php } ?>
263 + <?php $extensions_count = count( $extensions ); ?>
264 + <?php } ?>
265 + </div>
266 + </div>
267 + <div class="ui section divider"></div>
268 + <div class="title" style="background:none!important;">
269 + <i class="dropdown icon"></i>
270 + <h2 class="ui header" style="display:inline-block;margin:0;">
271 + <div class="content" style="background:none!important;">
272 + <?php esc_html_e( 'Disabled Add-ons', 'mainwp' ); ?>
273 + <div class="sub header"><?php esc_html_e( 'These add-ons are installed but turned off. Enable them anytime to unlock more features.', 'mainwp' ); ?></div>
274 + </div>
275 + </h2>
276 + </div>
277 + <div class="content" style="background:none!important;">
278 + <div class="ui four cards" id="mainwp-inactive-add-ons-cards">
196 279 <?php if ( is_array( $extensions_disabled ) ) { ?>
197 280 <?php foreach ( $extensions_disabled as $extension ) { ?>
198 281 <?php
199 282 $slug = dirname( $extension['slug'] );
@@ -204,13 +287,13 @@
204 287
205 288 $extensions_data = $all_available_extensions[ $slug ];
206 289
207 290 if ( isset( $extensions_data['img'] ) && ! empty( $extensions_data['img'] ) ) {
208 - $img_url = $extensions_data['img']; // icon from the available extensions in dashboard.
291 + $img_url = $extensions_data['img'];
209 292 } elseif ( isset( $extension['icon'] ) && ! empty( $extension['icon'] ) ) {
210 - $img_url = $extension['icon']; // icon from the get_this_extension().
293 + $img_url = $extension['icon'];
211 294 } elseif ( isset( $extension['iconURI'] ) && '' !== $extension['iconURI'] ) {
212 - $img_url = MainWP_Utility::remove_http_prefix( $extension['iconURI'] ); // icon from the extension header.
295 + $img_url = MainWP_Utility::remove_http_prefix( $extension['iconURI'] );
213 296 } else {
214 297 $img_url = MAINWP_PLUGIN_URL . 'assets/images/extensions/placeholder.png';
215 298 }
216 299
@@ -215,22 +298,31 @@
215 298 }
216 299
217 300 static::render_extension_card( $extension, $extension_update, $img_url, true );
218 301 ?>
302 + <?php } ?>
303 + <?php $extensions_disabled_count = count( $extensions_disabled ); ?>
304 + <?php } ?>
219 305
220 - <?php } ?>
306 + <?php $extensions_count = $extensions_count + $extensions_disabled_count; ?>
307 + <?php if ( 1 === $extensions_count % 4 ) : ?>
308 + <div class="ui card" style="visibility:hidden"></div>
309 + <div class="ui card" style="visibility:hidden"></div>
310 + <div class="ui card" style="visibility:hidden"></div>
311 + <?php elseif ( 2 === $extensions_count % 4 ) : ?>
312 + <div class="ui card" style="visibility:hidden"></div>
313 + <div class="ui card" style="visibility:hidden"></div>
314 + <?php elseif ( 3 === $extensions_count % 4 ) : ?>
315 + <div class="ui card" style="visibility:hidden"></div>
316 + <?php endif; ?>
317 + </div>
318 + </div>
319 + </div>
320 + </div>
321 + <?php } ?>
221 322
222 - <?php } ?>
223 - </div>
224 - <?php } ?>
225 - <?php static::render_purchase_notice(); ?>
226 - </div>
227 - <div class="mainwp-side-content mainwp-no-padding">
228 - <?php if ( ! empty( $extensions ) || ! empty( $extensions_disabled ) ) { ?>
229 - <?php static::render_search_box(); ?>
230 - <?php } ?>
231 - <?php static::render_side_box( $mainwp_api_key ); ?>
232 - </div>
323 + <?php static::render_purchase_notice(); ?>
324 +
233 325 <div id="mainwp-extensions-privacy-info">
234 326 <?php $priv_extensions = static::get_available_extensions( 'all' ); ?>
235 327 <?php
236 328 foreach ( $priv_extensions as $priv_extension ) {
@@ -236,44 +328,40 @@
236 328 foreach ( $priv_extensions as $priv_extension ) {
237 329 $item_slug = MainWP_Utility::get_dir_slug( $priv_extension['slug'] );
238 330 ?>
239 331 <?php if ( isset( $priv_extension['privacy'] ) && ( 2 === $priv_extension['privacy'] || 1 === (int) $priv_extension['privacy'] ) ) { ?>
240 - <input
241 - type="hidden"
242 - id="<?php esc_attr_e( $priv_extension['slug'] ); ?>"
243 - name="<?php esc_attr_e( $priv_extension['slug'] ); ?>"
244 - base-slug="<?php esc_attr_e( $item_slug ); ?>"
245 - privacy="<?php esc_attr_e( $priv_extension['privacy'] ); ?>"
246 - integration="<?php esc_attr_e( $priv_extension['integration'] ); ?>"
247 - integration_url="<?php esc_attr_e( $priv_extension['integration_url'] ); ?>"
248 - integration_owner="<?php esc_attr_e( $priv_extension['integration_owner'] ); ?>"
249 - integration_owner_pp="<?php esc_attr_e( $priv_extension['integration_owner_pp'] ); ?>"
250 - extension_title="<?php esc_attr_e( $priv_extension['title'] ); ?>"
251 - value="<?php esc_attr_e( $priv_extension['title'] ); ?>"
252 - />
253 - <?php
254 - } elseif ( isset( $priv_extension['privacy'] ) && 0 === (int) $priv_extension['privacy'] ) {
255 - ?>
256 - <input
257 - type="hidden"
258 - id="<?php esc_attr_e( $priv_extension['slug'] ); ?>"
259 - name="<?php esc_attr_e( $priv_extension['slug'] ); ?>"
260 - base-slug="<?php esc_attr_e( $item_slug ); ?>"
261 - privacy="<?php esc_attr_e( $priv_extension['privacy'] ); ?>"
262 - extension_title="<?php esc_attr_e( $priv_extension['title'] ); ?>"
263 - value="<?php esc_attr_e( $priv_extension['title'] ); ?>"
264 - />
265 - <?php
266 - } else {
267 - ?>
268 - <input
332 + <input <?php // NOSONAR - id ok. ?>
269 333 type="hidden"
270 - id="<?php esc_attr_e( $priv_extension['slug'] ); ?>"
271 - name="<?php esc_attr_e( $priv_extension['slug'] ); ?>"
272 - base-slug="<?php esc_attr_e( $item_slug ); ?>"
273 - extension_title="<?php esc_attr_e( $priv_extension['title'] ); ?>"
274 - value="<?php esc_attr_e( $priv_extension['title'] ); ?>"
334 + id="<?php echo esc_attr( $priv_extension['slug'] ); ?>"
335 + name="<?php echo esc_attr( $priv_extension['slug'] ); ?>"
336 + base-slug="<?php echo esc_attr( $item_slug ); ?>"
337 + privacy="<?php echo esc_attr( $priv_extension['privacy'] ); ?>"
338 + integration="<?php echo esc_attr( $priv_extension['integration'] ); ?>"
339 + integration_url="<?php echo esc_attr( $priv_extension['integration_url'] ); ?>"
340 + integration_owner="<?php echo esc_attr( $priv_extension['integration_owner'] ); ?>"
341 + integration_owner_pp="<?php echo esc_attr( $priv_extension['integration_owner_pp'] ); ?>"
342 + extension_title="<?php echo esc_attr( MainWP_Extensions_Handler::polish_string_name( $priv_extension['title'] ) ); ?>"
343 + value="<?php echo esc_attr( $priv_extension['title'] ); ?>"
275 344 />
345 + <?php } elseif ( isset( $priv_extension['privacy'] ) && 0 === (int) $priv_extension['privacy'] ) { ?>
346 + <input <?php // NOSONAR - id ok. ?>
347 + type="hidden"
348 + id="<?php echo esc_attr( $priv_extension['slug'] ); // NOSONAR - id ok. ?>"
349 + name="<?php echo esc_attr( $priv_extension['slug'] ); ?>"
350 + base-slug="<?php echo esc_attr( $item_slug ); ?>"
351 + privacy="<?php echo esc_attr( $priv_extension['privacy'] ); ?>"
352 + extension_title="<?php echo esc_attr( MainWP_Extensions_Handler::polish_string_name( $priv_extension['title'] ) ); ?>"
353 + value="<?php echo esc_attr( $priv_extension['title'] ); ?>"
354 + />
355 + <?php } else { ?>
356 + <input <?php // NOSONAR - id ok. ?>
357 + type="hidden"
358 + id="<?php echo esc_attr( $priv_extension['slug'] ); // NOSONAR - id ok. ?>"
359 + name="<?php echo esc_attr( $priv_extension['slug'] ); ?>"
360 + base-slug="<?php echo esc_attr( $item_slug ); ?>"
361 + extension_title="<?php echo esc_attr( MainWP_Extensions_Handler::polish_string_name( $priv_extension['title'] ) ); ?>"
362 + value="<?php echo esc_attr( $priv_extension['title'] ); ?>"
363 + />
276 364 <?php } ?>
277 365 <?php } ?>
278 366 </div>
279 367 </div>
@@ -282,110 +370,305 @@
282 370 <i class="close icon"></i>
283 371 <div class="header"></div>
284 372 <div class="content"></div>
285 373 </div>
374 +
375 + <script type="text/javascript">
376 + jQuery( document ).ready( function () {
377 + jQuery( '#mainwp-extensions-list' ).accordion();
378 + jQuery( '#mainwp-search-extensions-input' ).on( 'keyup', function () {
379 + var searchQuery = jQuery( this ).val().toLowerCase();
380 + var extensions = jQuery( '#mainwp-extensions-list' ).find( '.ui.extension.card' );
381 + for ( var i = 0; i < extensions.length; i++ ) {
382 + var currentExtension = jQuery( extensions[i] );
383 + var extensionTitle = jQuery( currentExtension ).attr( 'extension-title' ).toLowerCase();
384 + if ( extensionTitle.indexOf( searchQuery ) > -1 ) {
385 + currentExtension.show();
386 + currentExtension.addClass( 'mainwp-found' );
387 + } else {
388 + currentExtension.removeClass( 'mainwp-found' );
389 + currentExtension.hide();
390 + }
391 + var foundExtensions = jQuery( '#mainwp-extensions-list' ).find( '.ui.extension.card.mainwp-found' );
392 + if ( foundExtensions.length < 1 ) {
393 + jQuery( '#mainwp-extensions-search-no-results' ).show();
394 + } else {
395 + jQuery( '#mainwp-extensions-search-no-results' ).hide();
396 + }
397 + }
398 + } );
399 + jQuery( '#mainwp-search-extensions .remove.icon' ).on( 'click', function () {
400 + jQuery( '#mainwp-search-extensions-input' ).val('');
401 + jQuery( '#mainwp-search-extensions-input' ).trigger('keyup');
402 + } );
403 + } );
404 + </script>
286 405 <?php
287 406 }
288 407
289 408 /**
290 - * Method render_incompatible_notice()
409 + * Render the introductory notice section for extensions page.
291 410 *
292 - * Render Incompatability Notice.
411 + * Displays the main intro content including API key validation form,
412 + * category browsing cards, and popular add-ons section.
413 + *
414 + * @param string|false $mainwp_api_key The MainWP API key or false if not set.
415 + * @return void
293 416 */
294 - public static function render_incompatible_notice() {
295 - $deactivated_exts = get_transient( 'mainwp_transient_deactivated_incomtible_exts' );
296 - if ( $deactivated_exts && is_array( $deactivated_exts ) && ! empty( $deactivated_exts ) ) {
297 - ?>
298 - <?php delete_transient( 'mainwp_transient_deactivated_incomtible_exts' ); ?>
299 - <div class="ui yellow message">
300 - <div class="header"><?php esc_html_e( 'Important Note', 'mainwp' ); ?></div>
301 - <p><?php esc_html_e( 'MainWP Dashboard 4.0 or newer requires Extensions 4.0 or newer. MainWP will automatically deactivate older versions of MainWP Extensions in order to prevent compatibility problems.', 'mainwp' ); ?></p>
302 - <div class="header"><?php esc_html_e( 'Steps to Update Extensions', 'mainwp' ); ?></div>
303 - <div class="ui list">
304 - <div class="item">1. <?php esc_html_e( 'Go to the WP Admin > Plugins > Installed Plugins page', 'mainwp' ); ?></div>
305 - <div class="item">2. <?php esc_html_e( 'Delete Version 3 Extensions (extensions older than version 4) from your MainWP Dashboard', 'mainwp' ); ?></div>
306 - <div class="item">3. <?php esc_html_e( 'Go back to the MainWP > Extensions page and use the Install Extensions button', 'mainwp' ); ?></div>
417 + public static function render_intro_notice( $mainwp_api_key ) {
418 + $folder_url = MAINWP_PLUGIN_URL . 'assets/images/extensions/';
419 + ?>
420 + <div class="ui segment">
421 + <h2 class="ui massive header">
422 + <?php esc_html_e( 'Extend your MainWP Dashboard.', 'mainwp' ); ?><br/>
423 + <span class="ui green text"><?php esc_html_e( 'Add what you need.', 'mainwp' ); ?></span>
424 + </h2>
425 + <p style="max-width:700px"><span class="ui grey text"><?php esc_html_e( 'The MainWP Dashboard core keeps things lean. Add-ons let you expand with exactly the features you need, security, backups, performance monitoring, and more.', 'mainwp' ); ?></span></p>
426 + <div class="ui section hidden divider"></div>
427 + <div class="ui two column stacking grid">
428 + <div class="column">
429 + <div class="ui green padded secondary segment">
430 + <h2 class="ui header">
431 + <i class="key icon"></i>
432 + <div class="content">
433 + <?php esc_html_e( 'Connect your MainWP Account', 'mainwp' ); ?>
434 + <div class="sub header"><?php esc_html_e( 'All add-ons (including free MainWP add-ons) require an API key. Create a free account or enter your existing key to get started.', 'mainwp' ); ?></div>
435 + </div>
436 + </h2>
437 + <div class="ui hidden divider"></div>
438 + <div class="ui grid">
439 + <div class="nine wide column">
440 + <div class="ui form" id="mainwp-extensions-api-fields">
441 + <div class="field">
442 + <div class="ui fluid input">
443 + <input type="password" id="mainwp_com_api_key" autocomplete="new-password" autocorrect="off" autocapitalize="none" spellcheck="false" placeholder="<?php esc_attr_e( 'Enter your MainWP License Key', 'mainwp' ); ?>" value="<?php echo esc_attr( MainWP_Credential_Render::value_for_input( ! empty( $mainwp_api_key ) ) ); ?>"/>
444 + </div>
445 + </div>
446 + <div class="field">
447 + <div class="ui checkbox">
448 + <input type="checkbox" <?php echo '' !== $mainwp_api_key ? 'checked="checked"' : ''; ?> name="extensions_api_savemylogin_chk" id="extensions_api_savemylogin_chk">
449 + <label for="extensions_api_savemylogin_chk"><small><?php esc_html_e( 'Remember MainWP Main API Key', 'mainwp' ); ?></small></label>
450 + </div>
451 + </div>
452 + </div>
453 + </div>
454 + <div class="seven wide column">
455 + <input type="button" class="ui fluid green basic button" id="mainwp-extensions-savelogin" data-context="intro-notice" value="<?php esc_attr_e( 'Validate License & Install Add-ons', 'mainwp' ); ?>">
456 + </div>
457 + </div>
458 + <div class="ui section divider"></div>
459 + <div class="mainwp-extensions-api-loading" style="display:none">
460 + <div class="ui active page dimmer">
461 + <div class="ui double text loader"><?php esc_html_e( 'Validating...', 'mainwp' ); ?></div>
462 + </div>
463 + </div>
464 + <span class="ui grey text"><?php esc_html_e( 'Don\'t have an account?', 'mainwp' ); ?></span> &nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp; <a href="https://mainwp.com/signup/" rel="noopener noreferrer" target="_blank"><?php esc_html_e( 'Create Free Account', 'mainwp' ); ?> →</a>
465 + </div>
307 466 </div>
308 - <p><?php esc_html_e( 'This process does not affect your extensions settings.', 'mainwp' ); ?></p>
467 + <div class="column">
468 + <div class="ui padded segment" id="mainwp-pro-hero-segment">
469 + <span class="ui small green label" style="opacity:.8"><?php esc_html_e( 'PRO', 'mainwp' ); ?></span> <?php esc_html_e( 'Unlock the full toolkit', 'mainwp' ); ?>
470 + <h2 class="ui header"><?php esc_html_e( 'Want everything? MainWP Pro includes all add-ons.', 'mainwp' ); ?></h2>
471 + <p><span class="ui grey text" style="font-weight:300"><?php esc_html_e( 'Free gets you started. Pro gets you everything we make now and in the future, priority support, and automatic updates.', 'mainwp' ); ?></span></p>
472 + <div class="ui three column grid">
473 + <div class="column">
474 + <div class="ui small header">
475 + <em data-emoji=":ring_buoy:" class="small"></em>
476 + <div class="content">
477 + <?php esc_html_e( 'Priority Ticket Support', 'mainwp' ); ?>
478 + <div class="sub header"><?php esc_html_e( 'Faster response times', 'mainwp' ); ?></div>
479 + </div>
480 + </div>
481 + </div>
482 + <div class="column">
483 + <div class="ui small header">
484 + <em data-emoji=":arrow_upper_right:" class="small"></em>
485 + <div class="content">
486 + <?php esc_html_e( 'Auto Updates', 'mainwp' ); ?>
487 + <div class="sub header"><?php esc_html_e( 'Critical & security updates', 'mainwp' ); ?></div>
488 + </div>
489 + </div>
490 + </div>
491 + <div class="column">
492 + <div class="ui small header">
493 + <em data-emoji=":package:" class="small"></em>
494 + <div class="content">
495 + <?php esc_html_e( 'All Add-ons', 'mainwp' ); ?>
496 + <div class="sub header"><?php esc_html_e( 'Current & future', 'mainwp' ); ?></div>
497 + </div>
498 + </div>
499 + </div>
500 + </div>
501 + <div class="ui hidden divider"></div>
502 + <a href="https://mainwp.com/free-vs-pro/" rel="noopener noreferrer" target="_blank" class="ui grey basic button"><?php esc_html_e( 'Learn About Pro', 'mainwp' ); ?></a>
503 + </div>
504 + </div>
309 505 </div>
310 - <?php
311 - }
312 - }
313 -
314 - /**
315 - * Method render_intro_notice()
316 - *
317 - * Render Intro Notice.
318 - */
319 - public static function render_intro_notice() {
320 - ?>
321 - <div class="ui secondary segment">
322 - <h2 class="header"><?php esc_html_e( 'What are Extensions?', 'mainwp' ); ?></h2>
323 - <p><?php esc_html_e( 'Extensions are specific features or tools created to expand the basic functionality of MainWP. The core of MainWP is designed to provide the functions most needed for you and minimize code bloat.', 'mainwp' ); ?></p>
324 - <p><?php esc_html_e( 'Extensions offer custom functions and features so that each user can tailor the MainWP Dashboard to their specific needs.', 'mainwp' ); ?></p>
325 - <p><?php esc_html_e( 'MainWP Pro offers 40+ Free & Premium Extensions in multiple categories, such as Security, Backup, Performance, Administrative, etc. You can get all of them at a single price.', 'mainwp' ); ?></p>
326 - <h4><?php esc_html_e( 'MainWP Pro includes:', 'mainwp' ); ?></h4>
327 - <div class="ui bulleted list">
328 - <div class="item"><?php esc_html_e( 'All current MainWP Extensions (free & premium)', 'mainwp' ); ?></div>
329 - <div class="item"><?php esc_html_e( 'All future MainWP Extensions (free & premium)', 'mainwp' ); ?></div>
330 - <div class="item"><?php esc_html_e( 'Critical Security & Performance updates for MainWP Extensions', 'mainwp' ); ?></div>
331 - <div class="item"><?php esc_html_e( 'Priority support via Helpdesk & Community for MainWP products', 'mainwp' ); ?></div>
506 + <div class="ui hidden section divider"></div>
507 + <div class="ui two column grid">
508 + <div class="column"><?php esc_html_e( 'BROWSE BY CATEGORY', 'mainwp' ); ?></div>
509 + <div class="right aligned column"><span class="ui grey small text"><?php esc_html_e( '🔒 Validate license to install', 'mainwp' ); ?></span></div>
332 510 </div>
333 - <a class="ui basic green button" href="https://mainwp.com/mainwp-extensions/" target="_blank"><?php esc_html_e( 'Browse All Extensions', 'mainwp' ); ?></a> <a class="ui green button" href="https://mainwp.com/free-vs-pro/" target="_blank"><?php esc_html_e( 'Free Vs. Pro', 'mainwp' ); ?></a> <a class="ui green button" href="https://mainwp.com/signup/" target="_blank"><?php esc_html_e( 'Get Pro', 'mainwp' ); ?></a> <?php // NOSONAR - noopener - open safe. ?>
334 - <h2 class="header"><?php esc_html_e( 'How to install your MainWP Extensions?', 'mainwp' ); ?></h2>
335 - <p><?php printf( esc_html__( 'Once you have ordered MainWP Extensions, you can either use the %1$sautomatic extension installation%2$s option or %3$smanual installation%4$s.', 'mainwp' ), '<a href="https://kb.mainwp.com/docs/install-extensions/" target="_blank">', '</a> <i class="external alternate icon"></i>', '<a href="https://kb.mainwp.com/docs/my-downloads-and-api-keys/" target="_blank">', '</a> <i class="external alternate icon"></i>' ); ?></p> <?php // NOSONAR - noopener - open safe. ?>
336 - </div>
337 - <?php
338 - }
339 -
340 - /**
341 - * Method render_search_box()
342 - *
343 - * Render Search Box.
344 - */
345 - public static function render_search_box() {
346 - ?>
347 - <div class="mainwp-search-options ui fluid accordion mainwp-sidebar-accordion">
348 - <div class="title">
349 - <i class="dropdown icon"></i>
350 - <?php esc_html_e( 'Search Installed Extensions', 'mainwp' ); ?>
511 + <div class="ui twelve mini cards" id="mainwp-browse-add-ons-by-category-cards">
512 + <div class="ui card">
513 + <div class="content">
514 + <em data-emoji=":gear:" class="medium mainwp-greyscale"></em>
515 + <h3 class="ui header">
516 + <a href="https://mainwp.com/mainwp-add-ons/add-on-category/administrative/" rel="noopener noreferrer" target="_blank" class="ui grey text"><?php esc_html_e( 'Administrative', 'mainwp' ); ?> →</a>
517 + <div class="sub header"><?php esc_html_e( '4 Add-ons', 'mainwp' ); ?></div>
518 + </h3>
519 + </div>
520 + </div>
521 + <div class="ui card">
522 + <div class="content">
523 + <em data-emoji=":office:" class="medium mainwp-greyscale"></em>
524 + <h3 class="ui header">
525 + <a href="https://mainwp.com/mainwp-add-ons/add-on-category/agency/" rel="noopener noreferrer" target="_blank" class="ui grey text"><?php esc_html_e( 'Agency', 'mainwp' ); ?> →</a>
526 + <div class="sub header"><?php esc_html_e( '2 Add-ons', 'mainwp' ); ?></div>
527 + </h3>
528 + </div>
529 + </div>
530 + <div class="ui card">
531 + <div class="content">
532 + <em data-emoji=":minidisc:" class="medium mainwp-greyscale"></em>
533 + <h3 class="ui header">
534 + <a href="https://mainwp.com/mainwp-add-ons/add-on-category/backups/" rel="noopener noreferrer" target="_blank" class="ui grey text"><?php esc_html_e( 'Backups', 'mainwp' ); ?> →</a>
535 + <div class="sub header"><?php esc_html_e( '5 Add-ons', 'mainwp' ); ?></div>
536 + </h3>
537 + </div>
538 + </div>
539 + <div class="ui card">
540 + <div class="content">
541 + <em data-emoji=":man_office_worker:" class="medium mainwp-greyscale"></em>
542 + <h3 class="ui header">
543 + <a href="https://mainwp.com/mainwp-add-ons/add-on-category/client/" rel="noopener noreferrer" target="_blank" class="ui grey text"><?php esc_html_e( 'Client', 'mainwp' ); ?> →</a>
544 + <div class="sub header"><?php esc_html_e( '2 Add-ons', 'mainwp' ); ?></div>
545 + </h3>
546 + </div>
547 + </div>
548 + <div class="ui card">
549 + <div class="content">
550 + <em data-emoji=":newspaper:" class="medium mainwp-greyscale"></em>
551 + <h3 class="ui header">
552 + <a href="https://mainwp.com/mainwp-add-ons/add-on-category/content/" rel="noopener noreferrer" target="_blank" class="ui grey text"><?php esc_html_e( 'Content Operations', 'mainwp' ); ?> →</a>
553 + <div class="sub header"><?php esc_html_e( '7 Add-ons', 'mainwp' ); ?></div>
554 + </h3>
555 + </div>
556 + </div>
557 + <div class="ui card">
558 + <div class="content">
559 + <em data-emoji=":satellite_orbital:" class="medium mainwp-greyscale"></em>
560 + <h3 class="ui header">
561 + <a href="https://mainwp.com/mainwp-add-ons/add-on-category/monitoring/" rel="noopener noreferrer" target="_blank" class="ui grey text"><?php esc_html_e( 'Monitoring', 'mainwp' ); ?> →</a>
562 + <div class="sub header"><?php esc_html_e( '4 Add-ons', 'mainwp' ); ?></div>
563 + </h3>
564 + </div>
565 + </div>
566 + <div class="ui card">
567 + <div class="content">
568 + <em data-emoji=":zap:" class="medium mainwp-greyscale"></em>
569 + <h3 class="ui header">
570 + <a href="https://mainwp.com/mainwp-add-ons/add-on-category/performance/" rel="noopener noreferrer" target="_blank" class="ui grey text"><?php esc_html_e( 'Performance', 'mainwp' ); ?> →</a>
571 + <div class="sub header"><?php esc_html_e( '4 Add-ons', 'mainwp' ); ?></div>
572 + </h3>
573 + </div>
574 + </div>
575 + <div class="ui card">
576 + <div class="content">
577 + <em data-emoji=":shield:" class="medium mainwp-greyscale"></em>
578 + <h3 class="ui header">
579 + <a href="https://mainwp.com/mainwp-add-ons/add-on-category/security/" rel="noopener noreferrer" target="_blank" class="ui grey text"><?php esc_html_e( 'Security', 'mainwp' ); ?> →</a>
580 + <div class="sub header"><?php esc_html_e( '11 Add-ons', 'mainwp' ); ?></div>
581 + </h3>
582 + </div>
583 + </div>
584 + <div class="ui card">
585 + <div class="content">
586 + <em data-emoji=":chart_with_upwards_trend:" class="medium mainwp-greyscale"></em>
587 + <h3 class="ui header">
588 + <a href="https://mainwp.com/mainwp-add-ons/add-on-category/analytics/" rel="noopener noreferrer" target="_blank" class="ui grey text"><?php esc_html_e( 'Analytics', 'mainwp' ); ?> →</a>
589 + <div class="sub header"><?php esc_html_e( '4 Add-ons', 'mainwp' ); ?></div>
590 + </h3>
591 + </div>
592 + </div>
593 + <div class="ui card">
594 + <div class="content">
595 + <em data-emoji=":arrow_upper_right:" class="medium mainwp-greyscale"></em>
596 + <h3 class="ui header">
597 + <a href="https://mainwp.com/mainwp-add-ons/add-on-category/updates/" rel="noopener noreferrer" target="_blank" class="ui grey text"><?php esc_html_e( 'Updates', 'mainwp' ); ?> →</a>
598 + <div class="sub header"><?php esc_html_e( '2 Add-ons', 'mainwp' ); ?></div>
599 + </h3>
600 + </div>
601 + </div>
602 + <div class="ui card">
603 + <div class="content">
604 + <em data-emoji=":jigsaw:" class="medium"></em>
605 + <h3 class="ui header">
606 + <a href="https://mainwp.com/mainwp-add-ons/" rel="noopener noreferrer" target="_blank" class="ui grey text"><?php esc_html_e( 'All Add-ons', 'mainwp' ); ?> →</a>
607 + <div class="sub header"><?php esc_html_e( '40+ Add-ons', 'mainwp' ); ?></div>
608 + </h3>
609 + </div>
610 + </div>
351 611 </div>
352 - <div class="content">
353 - <div id="mainwp-search-extensions" class="ui fluid search">
354 - <div class="ui icon fluid input">
355 - <input class="prompt" id="mainwp-search-extensions-input" autocomplete="one-time-code" type="text" placeholder="<?php esc_attr_e( 'Find extension...', 'mainwp' ); ?>">
356 - <i class="search icon"></i>
612 + <div class="ui hidden section divider"></div>
613 + <div class="ui two column grid">
614 + <div class="column"><?php esc_html_e( 'POPULAR ADD-ONS', 'mainwp' ); ?></div>
615 + <div class="right aligned column"><a href="https://mainwp.com/mainwp-add-ons/" rel="noopener noreferrer" target="_blank"><span class="ui grey small text"><?php esc_html_e( 'View all', 'mainwp' ); ?> →</span></a></div>
616 + </div>
617 + <div class="ui five mini cards" id="mainwp-popular-add-ons-cards">
618 + <div class="ui card">
619 + <div class="content">
620 + <div class="ui mini grey right floated label"><?php esc_html_e( 'FREE', 'mainwp' ); ?></div>
621 + <div class="ui small image"><img class="ui mini image" src="<?php echo esc_attr( $folder_url . 'advanced-uptime-monitor.png' ); ?>" alt="<?php esc_attr_e( 'Advanced Uptime Monitor', 'mainwp' ); ?>"></div>
622 + <h3 class="ui header">
623 + <a href="https://mainwp.com/add-on/advanced-uptime-monitor/" rel="noopener noreferrer" target="_blank" class="ui grey text"><?php esc_html_e( 'Advanced Uptime Monitor', 'mainwp' ); ?> →</a>
624 + <div class="sub header"><?php esc_html_e( 'Real-time up time monitoring', 'mainwp' ); ?></div>
625 + </h3>
357 626 </div>
358 627 </div>
628 + <div class="ui card">
629 + <div class="content">
630 + <div class="ui mini green right floated label"><?php esc_html_e( 'PRO', 'mainwp' ); ?></div>
631 + <div class="ui small image"><img class="ui mini image" src="<?php echo esc_attr( $folder_url . 'branding.png' ); ?>" alt="<?php esc_attr_e( 'White Label', 'mainwp' ); ?>"></div>
632 + <h3 class="ui header">
633 + <a href="https://mainwp.com/add-on/white-label/" rel="noopener noreferrer" target="_blank" class="ui grey text"><?php esc_html_e( 'White Label', 'mainwp' ); ?> →</a>
634 + <div class="sub header"><?php esc_html_e( 'White label MainWP Child', 'mainwp' ); ?></div>
635 + </h3>
636 + </div>
637 + </div>
638 + <div class="ui card">
639 + <div class="content">
640 + <div class="ui mini green right floated label"><?php esc_html_e( 'PRO', 'mainwp' ); ?></div>
641 + <div class="ui small image"><img class="ui mini image" src="<?php echo esc_attr( $folder_url . 'pro-reports.png' ); ?>" alt="<?php esc_attr_e( 'Pro Reports', 'mainwp' ); ?>"></div>
642 + <h3 class="ui header">
643 + <a href="https://mainwp.com/add-on/pro-reports/" rel="noopener noreferrer" target="_blank" class="ui grey text"><?php esc_html_e( 'Pro Reports', 'mainwp' ); ?> →</a>
644 + <div class="sub header"><?php esc_html_e( 'Client reporting', 'mainwp' ); ?></div>
645 + </h3>
646 + </div>
647 + </div>
648 + <div class="ui card">
649 + <div class="content">
650 + <div class="ui mini grey right floated label"><?php esc_html_e( 'FREE', 'mainwp' ); ?></div>
651 + <div class="ui small image"><img class="ui mini image" src="<?php echo esc_attr( $folder_url . 'updraftplus.png' ); ?>" alt="<?php esc_attr_e( 'UpdraftPlus', 'mainwp' ); ?>"></div>
652 + <h3 class="ui header">
653 + <a href="https://mainwp.com/add-on/updraftplus/" rel="noopener noreferrer" target="_blank" class="ui grey text"><?php esc_html_e( 'UpdraftPlus', 'mainwp' ); ?> →</a>
654 + <div class="sub header"><?php esc_html_e( 'UpdraftPlus backups', 'mainwp' ); ?></div>
655 + </h3>
656 + </div>
657 + </div>
658 + <div class="ui card">
659 + <div class="content">
660 + <div class="ui mini green right floated label"><?php esc_html_e( 'PRO', 'mainwp' ); ?></div>
661 + <div class="ui small circular image"><img class="ui mini image" src="<?php echo esc_attr( $folder_url . 'maintenance.png' ); ?>" alt="<?php esc_attr_e( 'Maintenance', 'mainwp' ); ?>"></div>
662 + <h3 class="ui header">
663 + <a href="https://mainwp.com/add-on/maintenance/" rel="noopener noreferrer" target="_blank" class="ui grey text"><?php esc_html_e( 'Maintenance', 'mainwp' ); ?> →</a>
664 + <div class="sub header"><?php esc_html_e( 'Database optimization', 'mainwp' ); ?></div>
665 + </h3>
666 + </div>
667 + </div>
359 668 </div>
360 669 </div>
361 - <div class="ui fitted divider"></div>
362 - <script type="text/javascript">
363 - jQuery( document ).ready( function () {
364 - jQuery( '#mainwp-search-extensions-input' ).on( 'keyup', function () {
365 - var searchQuery = jQuery( this ).val().toLowerCase();
366 - var extensions = jQuery( '#mainwp-extensions-list' ).find( '.ui.extension.card' );
367 - for ( var i = 0; i < extensions.length; i++ ) {
368 - var currentExtension = jQuery( extensions[i] );
369 - var extensionTitle = jQuery( currentExtension ).attr( 'extension-title' ).toLowerCase();
370 - if ( extensionTitle.indexOf( searchQuery ) > -1 ) {
371 - currentExtension.show();
372 - currentExtension.addClass( 'mainwp-found' );
373 - } else {
374 - currentExtension.removeClass( 'mainwp-found' );
375 - currentExtension.hide();
376 - }
377 - var foundExtensions = jQuery( '#mainwp-extensions-list' ).find( '.ui.extension.card.mainwp-found' );
378 - if ( foundExtensions.length < 1 ) {
379 - jQuery( '#mainwp-extensions-search-no-results' ).show();
380 - } else {
381 - jQuery( '#mainwp-extensions-search-no-results' ).hide();
382 - }
383 - }
384 - } );
385 - } );
386 - </script>
387 - <?php
670 + <?php
388 671 }
389 672
390 673 /**
391 674 * Method render_extension_card()
@@ -413,9 +696,9 @@
413 696 $extension_page_url = admin_url( 'admin.php?page=Extensions' );
414 697 }
415 698
416 699 $active = MainWP_Extensions_Handler::is_extension_activated( $extension['slug'] );
417 - if ( empty( $extension['api_key'] ) ) {
700 + if ( empty( $extension['has_api_key'] ) ) {
418 701 $active = false;
419 702 }
420 703
421 704 if ( isset( $extension['apiManager'] ) && $extension['apiManager'] && ! isset( $extension['product_item_id'] ) ) {
@@ -434,18 +717,18 @@
434 717 $license_class = '';
435 718
436 719 if ( isset( $extensions_data['privacy'] ) ) {
437 720 if ( empty( $extensions_data['privacy'] ) ) {
438 - $privacy_class = '<i class="green check icon"></i>';
721 + $privacy_class = '<i class="fingerprint green icon"></i>';
439 722 } elseif ( 1 === (int) $extensions_data['privacy'] || 2 === (int) $extensions_data['privacy'] ) {
440 - $privacy_class = '<i class="yellow info icon"></i>';
723 + $privacy_class = '<i class="fingerprint yellow icon"></i>';
441 724 }
442 725 }
443 726
444 727 if ( $active ) {
445 - $license_class = '<i class="green cog icon"></i>';
728 + $license_class = '<i class="green key icon"></i>';
446 729 } else {
447 - $license_class = '<i class="red cog icon"></i>';
730 + $license_class = '<i class="red key icon"></i>';
448 731 }
449 732
450 733 $item_slug = MainWP_Utility::get_dir_slug( $extension['slug'] );
451 734
@@ -454,10 +737,14 @@
454 737 if ( isset( $extensions_data['release_date'] ) && ( time() - $extensions_data['release_date'] < MONTH_IN_SECONDS ) ) {
455 738 $new = '<span class="ui floating green mini label">NEW!</span>';
456 739 }
457 740
741 + $polish_name = ! empty( $extension['_polish_name'] ) ? $extension['_polish_name'] : MainWP_Extensions_Handler::polish_ext_name( $extension, true );
742 +
458 743 ?>
459 - <div class="ui card extension <?php echo $disabled ? 'grey mainwp-disabled-extension' : 'green mainwp-enabled-extension'; ?> extension-card-<?php echo esc_attr( $extension['name'] ); ?>" extension-title="<?php echo esc_attr( $extension['name'] ); ?>" base-slug="<?php echo esc_attr( $item_slug ); ?>" extension-slug="<?php echo esc_attr( $extension['slug'] ); ?>" status="<?php echo esc_attr( $queue_status ); ?>" license-status="<?php echo $active ? 'activated' : 'deactivated'; ?>">
744 +
745 + <!-- Fixed the issue extension missing model type. -->
746 + <div class="ui fluid card extension <?php echo $disabled ? 'grey mainwp-disabled-extension' : 'green mainwp-enabled-extension'; ?> extension-card-<?php echo esc_attr( sanitize_title( $extension['name'] ) ?? '' ); ?>" extension-model="<?php echo esc_attr( $extensions_data['model'] ?? '' ); ?>" extension-title="<?php echo esc_attr( MainWP_Extensions_Handler::polish_ext_name( $extension, true ) ); ?>" base-slug="<?php echo esc_attr( $item_slug ); ?>" extension-slug="<?php echo esc_attr( $extension['slug'] ?? '' ); ?>" status="<?php echo esc_attr( $queue_status ); ?>" license-status="<?php echo $active ? 'activated' : 'deactivated'; ?>">
460 747 <?php
461 748 /**
462 749 * Action: mainwp_extension_card_top
463 750 *
@@ -468,84 +755,67 @@
468 755 * @param array $extension Array containing the Extension information.
469 756 */
470 757 do_action( 'mainwp_extension_card_top', $extension );
471 758 ?>
472 - <div class="content">
473 - <img class="right floated mini ui image" alt="<?php echo esc_attr( MainWP_Extensions_Handler::polish_ext_name( $extension, true ) ); ?>" src="<?php echo esc_html( $img_url ); ?>">
474 - <div class="header">
759 + <div class="content">
760 + <img class="right floated mini ui image" alt="<?php echo esc_attr( $polish_name ); ?>" src="<?php echo esc_html( $img_url ); ?>">
761 + <div class="header">
762 + <?php if ( ! $disabled ) { ?>
763 + <a href="<?php echo esc_url( $extension_page_url ); ?>"><?php echo esc_html( $polish_name ); ?></a>
764 + <?php } else { ?>
765 + <?php echo esc_html( $polish_name ); ?>
766 + <?php } ?>
767 + </div>
475 768
476 - <?php if ( ! $disabled ) { ?>
477 - <a href="<?php echo esc_url( $extension_page_url ); ?>"><?php echo esc_html( MainWP_Extensions_Handler::polish_ext_name( $extension, true ) ); ?></a>
478 - <?php
479 - } else {
480 - ?>
481 - <?php echo esc_html( MainWP_Extensions_Handler::polish_ext_name( $extension, true ) ); ?>
482 - <?php } ?>
483 - </div>
769 + <div class="meta">
770 + <span class="ui small grey text"><?php echo '<i class="code branch grey icon"></i> ' . esc_html( $extension['version'] ); ?> <?php echo isset( $extension['DocumentationURI'] ) && ! empty( $extension['DocumentationURI'] ) ? ' - <a href="' . esc_url( str_replace( array( 'http:', 'https:' ), '', $extension['DocumentationURI'] ) ) . '" target="_blank" rel="noopener noreferrer" class="ui grey text"><i class="book grey icon"></i> ' . esc_html__( 'Docs', 'mainwp' ) . '</a>' : ''; ?> - <a class="extension-privacy-info-link ui grey text" base-slug="<?php echo esc_attr( $item_slug ); ?>"><?php echo $privacy_class; ?> <?php esc_html_e( 'Privacy', 'mainwp' ); ?></a></span> <?php // phpcs:ignore WordPress.Security.EscapeOutput ?>
771 + </div>
484 772
485 - <div class="meta">
486 - <?php echo '<i class="code branch icon"></i>' . esc_html( $extension['version'] ); ?> <?php echo isset( $extension['DocumentationURI'] ) && ! empty( $extension['DocumentationURI'] ) ? ' - <a href="' . esc_url( str_replace( array( 'http:', 'https:' ), '', $extension['DocumentationURI'] ) ) . '" target="_blank">' . esc_html__( 'Documentation', 'mainwp' ) . '</a> <i class="external alternate icon"></i>' : ''; ?>
487 - </div>
773 + <div class="description">
774 + <?php echo esc_html( preg_replace( '/\<cite\>.*\<\/cite\>/', '', $extension['description'] ) ); ?>
775 + </div>
776 + </div>
488 777
489 - <?php if ( isset( $extension['apiManager'] ) && $extension['apiManager'] ) { ?>
490 - <?php if ( ! $active && ! $disabled ) { ?>
491 - <span class="ui red ribbon label"><?php esc_html_e( 'License not activated', 'mainwp' ); ?></span>
492 - <?php } ?>
778 + <?php echo $new; // phpcs:ignore WordPress.Security.EscapeOutput ?>
779 +
780 + <?php if ( ! $simple ) { ?>
781 + <div class="extra content">
782 + <div class="">
783 + <?php if ( \mainwp_current_user_can( 'dashboard', 'manage_extensions' ) ) { ?>
784 + <a class="ui mini basic button extension-the-plugin-action" plugin-action="<?php echo $disabled ? 'active' : 'disable'; ?>"><?php echo $disabled ? '<i class="toggle off icon"></i> ' . esc_html__( 'Enable', 'mainwp' ) : '<i class="toggle on green icon"></i> ' . esc_html__( 'Disable', 'mainwp' ); ?></a>
493 785 <?php } ?>
494 - <?php if ( isset( $extension_update->response[ $extension['slug'] ] ) ) { ?>
495 - <a href="<?php echo esc_url( admin_url( 'plugins.php' ) ); ?>" class="ui yellow ribbon label"><?php esc_html_e( 'Update available', 'mainwp' ); ?></a>
786 + <?php if ( $disabled && \mainwp_current_user_can( 'dashboard', 'manage_extensions' ) ) { ?>
787 + <a class="ui mini basic right floated button extension-the-plugin-action" plugin-action="remove"><i class="trash icon"></i> <?php esc_html_e( 'Remove', 'mainwp' ); ?></a>
496 788 <?php } ?>
789 + <?php if ( isset( $extension['apiManager'] ) && $extension['apiManager'] && \mainwp_current_user_can( 'dashboard', 'manage_extensions' ) ) { ?>
790 + <a class="ui mini activate-api-status mainwp-manage-extension-license basic right floated button" data-tooltip="<?php echo $active ? esc_html__( 'License activated.', 'mainwp' ) : esc_html__( 'License not activated. Click activate.', 'mainwp' ); ?>" api-actived="<?php echo $active ? '1' : '0'; ?>" data-position="top right" data-inverted=""><?php echo $license_class; ?> <?php echo $active ? esc_html__( 'Licensed', 'mainwp' ) : esc_html__( 'Activate License', 'mainwp' ); ?></a> <?php // phpcs:ignore WordPress.Security.EscapeOutput ?>
791 + <?php } ?>
792 + </div>
793 + </div>
794 + <?php } ?>
497 795
498 - <div class="description">
499 - <?php echo esc_html( preg_replace( '/\<cite\>.*\<\/cite\>/', '', $extension['description'] ) ); ?>
796 + <div class="ui active dimmer action-feedback" style="display:none;">
797 + <div class="ui text loader"></div>
798 + </div>
799 +
800 + <?php if ( isset( $extension['apiManager'] ) && $extension['apiManager'] ) { ?>
801 + <?php if ( $active ) { ?>
802 + <div class="ui active dimmer" id="mainwp-extensions-api-form" style="display: none;">
803 + <input type="hidden" class="extension-api-key" value="<?php echo esc_attr( MainWP_Credential_Render::value_for_input( ! empty( $extension['has_api_key'] ) ) ); ?>"/>
804 + <div class="ui center aligned secondary segment">
805 + <p><?php esc_html_e( 'Deactivate license for this add-on?', 'mainwp' ); ?></p>
806 + <button class="ui red mini button mainwp-extensions-deactivate"><?php esc_html_e( 'Deactivate', 'mainwp' ); ?></button>
807 + <button class="ui button mini mainwp-extension-license-cancel"><?php esc_html_e( 'Cancel', 'mainwp' ); ?></button>
808 + </div>
500 809 </div>
501 - </div>
502 - <?php echo $new; // phpcs:ignore WordPress.Security.EscapeOutput ?>
503 - <?php if ( ! $simple ) { ?>
504 - <div class="extra content">
505 - <div class="ui mini fluid stackable buttons">
506 - <a class="ui basic button extension-the-plugin-action" plugin-action="<?php echo $disabled ? 'active' : 'disable'; ?>"><?php echo $disabled ? '<i class="toggle on icon"></i> ' . esc_html__( 'Enable', 'mainwp' ) : '<i class="toggle off icon"></i> ' . esc_html__( 'Disable', 'mainwp' ); ?></a>
507 - <a class="ui extension-privacy-info-link icon basic button" base-slug="<?php echo esc_attr( $item_slug ); ?>" data-tooltip="<?php echo esc_html__( 'Click to see more about extension privacy.', 'mainwp' ); ?>" data-position="top left" data-inverted=""><?php echo $privacy_class; ?> <?php echo esc_html__( 'Privacy', 'mainwp' ); ?></a> <?php // phpcs:ignore WordPress.Security.EscapeOutput ?>
508 - <?php if ( $disabled ) { ?>
509 - <a class="ui basic button extension-the-plugin-action" plugin-action="remove"><i class="trash icon"></i> <?php echo esc_html__( 'Delete', 'mainwp' ); ?></a>
510 - <?php } ?>
511 - <?php if ( isset( $extension['apiManager'] ) && $extension['apiManager'] ) { ?>
512 - <a class="ui activate-api-status mainwp-manage-extension-license icon basic button" data-tooltip="<?php echo $active ? esc_html__( 'Extension API license is activated properly. Click here to Deactivate it if needed.', 'mainwp' ) : esc_html__( 'Extension API license is not activated. Click here to activate it.', 'mainwp' ); ?>" api-actived="<?php echo $active ? '1' : '0'; ?>" data-position="top left" data-inverted=""><?php echo $license_class; ?> <?php echo esc_html__( 'License', 'mainwp' ); ?></a> <?php // phpcs:ignore WordPress.Security.EscapeOutput ?>
513 - <?php } ?>
514 - </div>
515 - </div>
516 810 <?php } ?>
517 - <div class="extra content action-feedback" style="display:none;">
518 - <div class="ui mini message"></div>
519 - </div>
520 811
521 812 <?php if ( isset( $extension['apiManager'] ) && $extension['apiManager'] ) { ?>
522 - <?php if ( $active ) { ?>
523 - <div class="extra content" id="mainwp-extensions-api-form" style="display: none;">
524 - <div class="ui form">
525 - <div class="field">
526 - <div class="ui input fluid">
527 - <input type="text" class="extension-api-key" placeholder="<?php esc_attr_e( 'API license key', 'mainwp' ); ?>" value="<?php echo esc_attr( $extension['api_key'] ); ?>"/>
528 - </div>
529 - </div>
530 - <div class="field">
531 - <div class="ui checkbox">
532 - <input type="checkbox" id="extension-deactivate-cb" class="mainwp-extensions-deactivate-chkbox" <?php echo 'on' === $extension['deactivate_checkbox'] ? 'checked' : ''; ?>>
533 - <label for="extension-deactivate-cb"><?php esc_html_e( 'Deactivate License Key', 'mainwp' ); ?></label>
534 - </div>
535 - </div>
536 - <input type="button" class="ui basic red fluid button mainwp-extensions-deactivate" value="<?php esc_html_e( 'Deactivate License', 'mainwp' ); ?>">
537 -
538 - </div>
539 - </div>
540 - <?php } ?>
541 -
542 - <?php if ( isset( $extension['apiManager'] ) && $extension['apiManager'] ) { ?>
543 - <div class="extra content api-feedback" style="display:none;">
544 - <div class="ui mini message"></div>
545 - </div>
546 - <?php } ?>
813 + <div class="ui active dimmer api-feedback" style="display:none;">
814 + <div class="ui text loader"></div>
815 + </div>
547 816 <?php } ?>
817 + <?php } ?>
548 818 <?php
549 819 /**
550 820 * Action: mainwp_extension_card_bottom
551 821 *
@@ -578,20 +848,23 @@
578 848
579 849 if ( ! isset( $extension['version'] ) ) {
580 850 $extension['version'] = '';
581 851 }
852 +
853 + $polish_name = ! empty( $extension['_polish_name'] ) ? $extension['_polish_name'] : MainWP_Extensions_Handler::polish_ext_name( $extension, true );
854 +
582 855 ?>
583 - <div class="ui card extension grey mainwp-disabled-extension extension-card-<?php echo esc_attr( $extension['name'] ); ?>" extension-title="<?php echo esc_attr( $extension['name'] ); ?>" base-slug="<?php echo esc_attr( $extension['slug'] ); ?>">
856 + <div class="ui card extension grey mainwp-disabled-extension extension-card-<?php echo esc_attr( $extension['name'] ); ?>" extension-title="<?php echo esc_attr( $polish_name ); ?>" base-slug="<?php echo esc_attr( $extension['slug'] ); ?>">
584 857 <div class="content">
585 - <img class="right floated mini ui image" alt="<?php echo esc_attr( MainWP_Extensions_Handler::polish_ext_name( $extension, true ) ); ?>" src="<?php echo esc_html( $img_url ); ?>">
858 + <img class="right floated mini ui image" alt="<?php echo esc_attr( $polish_name ); ?>" src="<?php echo esc_html( $img_url ); ?>">
586 859 <div class="header">
587 - <?php echo esc_html( MainWP_Extensions_Handler::polish_ext_name( $extension, true ) ); ?>
860 + <?php echo esc_html( $polish_name ); ?>
588 861 </div>
589 862
590 863 <?php if ( $installed ) : ?>
591 - <a href="admin.php?page=Extensions" class="ui black ribbon label"><?php echo esc_html__( 'Activate extension', 'mainwp' ); ?></a>
864 + <a href="admin.php?page=Extensions" class="ui black ribbon label"><?php echo esc_html__( 'Activate Add-on', 'mainwp' ); ?></a>
592 865 <?php else : ?>
593 - <a href="admin.php?page=Extensions&message=install-ext-<?php echo esc_attr( $extension['slug'] ); ?>" class="ui grey ribbon label"><?php echo esc_html__( 'Install extension', 'mainwp' ); ?></a>
866 + <a href="admin.php?page=Extensions&message=install-ext-<?php echo esc_attr( $extension['slug'] ); ?>" class="ui grey ribbon label"><?php echo esc_html__( 'Install Add-on', 'mainwp' ); ?></a>
594 867 <?php endif; ?>
595 868 <div class="description">
596 869 <?php echo esc_html( preg_replace( '/\<cite\>.*\<\/cite\>/', '', $extension['description'] ) ); ?>
597 870 </div>
@@ -605,29 +878,22 @@
605 878 *
606 879 * Render Purchase Notice.
607 880 */
608 881 public static function render_purchase_notice() {
609 - $is_demo = MainWP_Demo_Handle::is_demo_mode();
610 - $is_pro = MainWP_Hooks::is_pro_member();
882 + $is_pro = MainWP_Hooks::is_pro_member();
611 883 ?>
612 - <div id="mainwp-get-purchased-extensions-modal" class="ui first coupled large modal">
884 + <div id="mainwp-get-purchased-extensions-modal" class="ui first coupled modal">
613 885 <i class="close icon"></i>
614 - <div class="header"><?php esc_html_e( 'Install Extensions', 'mainwp' ); ?></div>
886 + <div class="header"><?php esc_html_e( 'Install Add-ons', 'mainwp' ); ?></div>
615 887 <div class="scrolling content"></div>
616 888 <div class="actions">
617 889 <div class="ui two columns stackable grid">
618 890 <div class="left aligned column">
619 - <?php
620 - if ( $is_demo ) {
621 - MainWP_Demo_Handle::get_instance()->render_demo_disable_button( '<input type="button" id="mainwp-extensions-installnow-disabled" class="ui green button disabled" disabled="disabled" value="' . esc_attr__( 'Install Selected Extensions', 'mainwp' ) . '">' );
622 - } else {
623 - ?>
624 - <input type="button" class="ui green button" id="mainwp-extensions-installnow" value="<?php esc_attr_e( 'Install Selected Extensions', 'mainwp' ); ?>">
625 - <?php } ?>
891 + <input type="button" class="ui green button" id="mainwp-extensions-installnow" value="<?php esc_attr_e( 'Install Selected Add-ons', 'mainwp' ); ?>">
626 892 </div>
627 893 <div class="right aligned column">
628 894 <?php if ( ! $is_pro ) : ?>
629 - <a href="https://mainwp.com/signup/?utm_campaign=Dashboard%20-%20Upgrade%20to%20Pro&utm_source=Dashboard&utm_medium=install%20modal&utm_term=get%20mainwp%20pro" class="ui green basic button" target="_blank"><?php esc_html_e( 'Get MainWP Pro', 'mainwp' ); ?></a>
895 + <a href="<?php echo esc_url( 'https://mainwp.com/signup/?utm_campaign=Dashboard%20-%20Upgrade%20to%20Pro&utm_source=Dashboard&utm_medium=install%20modal&utm_term=get%20mainwp%20pro' ); ?>" class="ui green basic button" target="_blank"><?php esc_html_e( 'Upgrade to Pro', 'mainwp' ); ?></a>
630 896 <?php endif; ?>
631 897 </div>
632 898 </div>
633 899 </div>
@@ -635,51 +901,111 @@
635 901 <?php
636 902 }
637 903
638 904 /**
639 - * Render the Sidebar.
905 + * Render licensing actions bar.
640 906 *
641 - * @param string $mainwp_api_key MainWP.com api key.
907 + * Displays the licensing status header and action buttons for managing add-ons,
908 + * including license validation, bulk installation, and activation options.
909 + *
910 + * @param string|false $mainwp_api_key The MainWP API key or false if not set.
911 + * @return void
642 912 */
643 - public static function render_side_box( $mainwp_api_key ) {
644 - $is_demo = MainWP_Demo_Handle::is_demo_mode();
913 + public static function render_licensing_actions_bar( $mainwp_api_key ) { //phpcs:ignore -- NOSONAR -Current complexity is the only way to achieve desired results, pull request solutions appreciated.
914 + $extensions = MainWP_Extensions_Handler::get_extensions();
915 +
916 + $count_enabled = is_array( $extensions ) ? count( $extensions ) : 0;
917 +
918 + $has_api_key = ! empty( $mainwp_api_key );
919 +
920 + $count_not_activated = 0;
921 + if ( $has_api_key && is_array( $extensions ) ) {
922 + foreach ( $extensions as $extension ) {
923 + if ( isset( $extension['apiManager'] ) && $extension['apiManager'] && empty( $extension['has_api_key'] ) ) {
924 + ++$count_not_activated;
925 + }
926 + }
927 + }
928 + $count_activated = $count_enabled - $count_not_activated;
645 929 ?>
646 - <div class="mainwp-search-options ui fluid accordion mainwp-sidebar-accordion">
647 - <div class="title active">
648 - <i class="dropdown icon"></i>
649 - <?php esc_html_e( 'Install and Activate Extensions', 'mainwp' ); ?>
650 - </div>
651 - <div class="content active">
652 - <?php if ( empty( $mainwp_api_key ) ) { ?>
653 - <div class="ui message info">
654 - <?php printf( esc_html__( 'Not sure how to find your MainWP Main API Key? %1$sClick here to get it.%2$s', 'mainwp' ), '<a href="https://mainwp.com/my-account/my-api-keys/" target="_blank">', '</a> <i class="external alternate icon"></i>' ); // NOSONAR - noopener - open safe. ?>
655 - </div>
656 - <?php } ?>
657 - <div class="ui form" id="mainwp-extensions-api-fields">
658 - <div class="field">
659 - <label for="mainwp_com_api_key"><?php esc_html_e( 'Enter your MainWP Main API Key.', 'mainwp' ); ?></label>
660 - <div class="ui input fluid">
661 - <input type="password" id="mainwp_com_api_key" autocomplete="one-time-code" autocorrect="off" autocapitalize="none" spellcheck="false" placeholder="<?php esc_attr_e( '', 'mainwp' ); ?>" value="<?php echo esc_attr( $mainwp_api_key ); ?>"/>
930 + <div class="mainwp-actions-bar" style="margin:0!important;">
931 + <div class="ui stacking two column grid">
932 + <div class="left aligned middle aligned column" id="mainwp-extensions-status-header">
933 + <?php if ( ! $has_api_key ) : ?>
934 + <h2 class="ui small header">
935 + <i class="large yellow warning icon"></i>
936 + <div class="content">
937 + <?php esc_html_e( 'License Inactive', 'mainwp' ); ?>
938 + <div class="sub header">
939 + <?php
940 + printf(
941 + /* translators: %s: number of enabled add-ons */
942 + esc_html__( '%s add-ons enabled • Missing License key • Updates Disabled', 'mainwp' ),
943 + esc_html( $count_enabled )
944 + );
945 + ?>
946 + </div>
947 + </div>
948 + </h2>
949 + <?php elseif ( $count_not_activated > 0 ) : ?>
950 + <h2 class="ui small header">
951 + <i class="large yellow warning icon"></i>
952 + <div class="content">
953 + <?php
954 + printf(
955 + /* translators: %s: number of add-ons not activated */
956 + esc_html( _n( '%s add-on not activated', '%s add-ons not activated', $count_not_activated, 'mainwp' ) ),
957 + esc_html( $count_not_activated )
958 + );
959 + ?>
960 + <div class="sub header">
961 + <?php
962 + printf(
963 + /* translators: 1: number of enabled add-ons, 2: number of activated add-ons */
964 + esc_html__( '%1$s add-ons enabled • %2$s activated • Updates enabled for activated add-ons', 'mainwp' ),
965 + esc_html( $count_enabled ),
966 + esc_html( $count_activated )
967 + );
968 + ?>
969 + </div>
970 + </div>
971 + </h2>
972 + <?php else : ?>
973 + <h2 class="ui small header">
974 + <i class="large green check icon"></i>
975 + <div class="content">
976 + <?php esc_html_e( 'License Active', 'mainwp' ); ?>
977 + <div class="sub header">
978 + <?php
979 + printf(
980 + /* translators: %s: number of enabled add-ons */
981 + esc_html__( '%s add-ons enabled • All activated • Updates enabled', 'mainwp' ),
982 + esc_html( $count_enabled )
983 + );
984 + ?>
985 + </div>
986 + </div>
987 + </h2>
988 + <?php endif; ?>
662 989 </div>
663 - </div>
664 - <div class="field">
665 - <div class="ui checkbox">
666 - <input type="checkbox" <?php echo '' !== $mainwp_api_key ? 'checked="checked"' : ''; ?> name="extensions_api_savemylogin_chk" id="extensions_api_savemylogin_chk">
667 - <label for="extensions_api_savemylogin_chk"><small><?php esc_html_e( 'Remember MainWP Main API Key', 'mainwp' ); ?></small></label>
990 + <div class="right aligned middle aligned column">
991 + <div id="mainwp-manage-add-ons-buttons">
992 + <a href="javascript:void(0);" class="ui grey basic tiny button" id="mainwp-extensions-bulkinstall"><i class="download icon"></i> <?php esc_html_e( 'Install Add-ons', 'mainwp' ); ?></a>
993 + <a href="javascript:void(0);" class="ui grey basic tiny button" id="mainwp-extensions-grabkeys"><i class="unlock icon"></i> <?php esc_html_e( 'Activate Add-ons', 'mainwp' ); ?></a>
994 + <a href="javascript:void(0);" class="ui green basic tiny button" id="mainwp-extensions-manage-toggle-on"><i class="key icon"></i> <?php echo empty( $mainwp_api_key ) ? esc_html__( 'Add License Key', 'mainwp' ) : esc_html__( 'Manage License', 'mainwp' ); ?></a>
995 + </div>
996 + <div id="mainwp-manage-license-buttons" class="hidden">
997 + <span class="ui left icon tiny input"><i class="key icon"></i><input type="password" id="mainwp_com_api_key" autocomplete="new-password" autocorrect="off" autocapitalize="none" spellcheck="false" placeholder="<?php esc_attr_e( 'Enter your MainWP License Key', 'mainwp' ); ?>" value="<?php echo esc_attr( MainWP_Credential_Render::value_for_input( ! empty( $mainwp_api_key ) ) ); ?>"/></span>&nbsp;&nbsp;
998 + <div class="ui checkbox">
999 + <input type="checkbox" <?php echo '' !== $mainwp_api_key ? 'checked="checked"' : ''; ?> name="extensions_api_savemylogin_chk" id="extensions_api_savemylogin_chk">
1000 + <label for="extensions_api_savemylogin_chk"><small><?php esc_html_e( 'Remember Key', 'mainwp' ); ?></small></label>
1001 + </div>&nbsp;&nbsp;
1002 + <a href="javascript:void(0);" class="ui green basic tiny button" id="mainwp-extensions-savelogin"><i class="check icon"></i> <?php esc_html_e( 'Validate License', 'mainwp' ); // NOSONAR - id ok. ?></a>
1003 + <a href="javascript:void(0);" class="ui grey basic tiny button" id="mainwp-extensions-manage-toggle-off"><?php esc_html_e( 'Close', 'mainwp' ); ?></a>
1004 + </div>
668 1005 </div>
669 1006 </div>
670 1007 </div>
671 - <div class="ui compact hidden divider"></div>
672 -
673 - <input type="button" class="ui fluid button" id="mainwp-extensions-savelogin" value="<?php esc_attr_e( 'Validate my MainWP Main API Key', 'mainwp' ); ?>">
674 - <?php if ( ! $is_demo ) { ?>
675 - <div class="ui divider"></div>
676 - <input type="button" class="ui fluid basic green button" id="mainwp-extensions-bulkinstall" value="<?php esc_attr_e( 'Install Extensions', 'mainwp' ); ?>">
677 - <br/>
678 - <input type="button" class="ui fluid green button" id="mainwp-extensions-grabkeys" value="<?php esc_attr_e( 'Activate Extensions', 'mainwp' ); ?>">
679 - <?php } ?>
680 - </div>
681 - </div>
682 1008 <?php
683 1009 $install_ext_slug = '';
684 1010 if ( isset( $_GET['message'] ) && 0 === strpos( wp_unslash( $_GET['message'] ), 'install-ext-' ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
685 1011 $install_ext_slug = str_replace( 'install-ext-', '', wp_unslash( $_GET['message'] ) ); //phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
@@ -701,9 +1027,32 @@
701 1027 </script>
702 1028 <?php
703 1029 }
704 1030
1031 +
1032 +
705 1033 /**
1034 + * Method sort_extensions().
1035 + *
1036 + * @param array $exts Array of extensions.
1037 + *
1038 + * @return void
1039 + */
1040 + public static function sort_extensions( &$exts ) {
1041 +
1042 + if ( ! is_array( $exts ) ) {
1043 + return;
1044 + }
1045 + foreach ( $exts as $idx => $ext ) {
1046 + if ( isset( $ext['name'] ) ) {
1047 + $exts[ $idx ]['_polish_name'] = MainWP_Extensions_Handler::polish_ext_name( $ext, true );
1048 +
1049 + }
1050 + }
1051 + MainWP_Utility::array_sort_existed_keys( $exts, '_polish_name' ); //phpcs:ignore Squiz.PHP.CommentedOutCode.Found -- 4 => 'leftsub_order'.
1052 + }
1053 +
1054 + /**
706 1055 * Metod get_extension_groups()
707 1056 *
708 1057 * Grab current MainWP Extension Groups.
709 1058 *
@@ -714,10 +1063,9 @@
714 1063 'admin' => esc_html__( 'Administrative', 'mainwp' ),
715 1064 'agency' => esc_html__( 'Agency', 'mainwp' ),
716 1065 'backup' => esc_html__( 'Backups', 'mainwp' ),
717 1066 'client' => esc_html__( 'Client', 'mainwp' ),
718 - 'content' => esc_html__( 'Posts/Pages', 'mainwp' ),
719 - 'development' => esc_html__( 'Development', 'mainwp' ),
1067 + 'content' => esc_html__( 'Content Operations', 'mainwp' ),
720 1068 'monitoring' => esc_html__( 'Monitoring', 'mainwp' ),
721 1069 'performance' => esc_html__( 'Performance', 'mainwp' ),
722 1070 'security' => esc_html__( 'Security', 'mainwp' ),
723 1071 'visitor' => esc_html__( 'Analytics', 'mainwp' ),
@@ -741,12 +1089,13 @@
741 1089 $all_exts = array(
742 1090 'advanced-uptime-monitor-extension' =>
743 1091 array(
744 1092 'type' => 'free',
1093 + 'model' => 'integration',
745 1094 'slug' => 'advanced-uptime-monitor-extension',
746 1095 'title' => 'MainWP Advanced Uptime Monitor',
747 1096 'desc' => 'MainWP Extension for real-time up time monitoring.',
748 - 'link' => 'https://mainwp.com/extension/advanced-uptime-monitor/',
1097 + 'link' => 'https://mainwp.com/add-on/advanced-uptime-monitor/',
749 1098 'changelog_url' => 'https://mainwp.com/changelog/mainwp-advanced-uptime-monitor-extension/',
750 1099 'img' => $folder_url . 'advanced-uptime-monitor.png',
751 1100 'product_id' => 'Advanced Uptime Monitor Extension',
752 1101 'product_item_id' => 0,
@@ -772,12 +1121,13 @@
772 1121 ),
773 1122 'mainwp-article-uploader-extension' =>
774 1123 array(
775 1124 'type' => 'pro',
1125 + 'model' => 'extension',
776 1126 'slug' => 'mainwp-article-uploader-extension',
777 1127 'title' => 'MainWP Article Uploader Extension',
778 1128 'desc' => 'MainWP Article Uploader Extension allows you to bulk upload articles to your dashboard and publish to child sites.',
779 - 'link' => 'https://mainwp.com/extension/article-uploader/',
1129 + 'link' => 'https://mainwp.com/add-on/article-uploader/',
780 1130 'changelog_url' => 'https://mainwp.com/changelog/mainwp-article-uploader-extension/',
781 1131 'img' => $folder_url . 'article-uploader.png',
782 1132 'product_id' => 'MainWP Article Uploader Extension',
783 1133 'product_item_id' => 0,
@@ -791,18 +1141,19 @@
791 1141 ),
792 1142 'mainwp-atarim-extension' =>
793 1143 array(
794 1144 'type' => 'pro',
1145 + 'model' => 'integration',
795 1146 'slug' => 'mainwp-atarim-extension',
796 1147 'title' => 'MainWP Atarim Extension',
797 1148 'desc' => 'MainWP Atarim Extension allows you get your Atarim info about managed sites to your MainWP Dashboard.',
798 - 'link' => 'https://mainwp.com/extension/atarim/',
1149 + 'link' => 'https://mainwp.com/add-on/atarim/',
799 1150 'changelog_url' => 'https://mainwp.com/changelog/mainwp-atarim-extension/',
800 1151 'img' => $folder_url . 'atarim.png',
801 1152 'product_id' => 'MainWP Atarim Extension',
802 1153 'product_item_id' => 0,
803 1154 'catalog_id' => '1251161',
804 - 'group' => array( 'development' ),
1155 + 'group' => array( 'admin' ),
805 1156 'privacy' => 1,
806 1157 'integration' => 'Atarim API',
807 1158 'integration_url' => 'https://atarim.io/',
808 1159 'integration_owner' => 'WP FeedBack LTD',
@@ -810,12 +1161,13 @@
810 1161 ),
811 1162 'mainwp-backwpup-extension' =>
812 1163 array(
813 1164 'type' => 'free',
1165 + 'model' => 'integration',
814 1166 'slug' => 'mainwp-backwpup-extension',
815 1167 'title' => 'MainWP BackWPup Extension',
816 1168 'desc' => 'MainWP BackWPup Extension combines the power of your MainWP Dashboard with the popular WordPress BackWPup Plugin. It allows you to schedule backups on your child sites.',
817 - 'link' => 'https://mainwp.com/extension/backwpup/',
1169 + 'link' => 'https://mainwp.com/add-on/backwpup/',
818 1170 'changelog_url' => 'https://mainwp.com/changelog/mainwp-backwpup-extension/',
819 1171 'img' => $folder_url . 'backwpup.png',
820 1172 'product_id' => 'MainWP BackWPup Extension',
821 1173 'product_item_id' => 0,
@@ -829,12 +1181,13 @@
829 1181 ),
830 1182 'boilerplate-extension' =>
831 1183 array(
832 1184 'type' => 'pro',
1185 + 'model' => 'extension',
833 1186 'slug' => 'boilerplate-extension',
834 1187 'title' => 'MainWP Boilerplate Extension',
835 1188 'desc' => 'MainWP Boilerplate extension allows you to create, edit and share repetitive pages across your network of child sites. The available placeholders allow these pages to be customized for each site without needing to be rewritten. The Boilerplate extension is the perfect solution for commonly repeated pages such as your "Privacy Policy", "About Us", "Terms of Use", "Support Policy", or any other page with standard text that needs to be distributed across your network.',
836 - 'link' => 'https://mainwp.com/extension/boilerplate/',
1189 + 'link' => 'https://mainwp.com/add-on/boilerplate/',
837 1190 'changelog_url' => 'https://mainwp.com/changelog/mainwp-boilerplate-extension/',
838 1191 'img' => $folder_url . 'boilerplate.png',
839 1192 'product_id' => 'Boilerplate Extension',
840 1193 'product_item_id' => 0,
@@ -848,12 +1201,13 @@
848 1201 ),
849 1202 'mainwp-buddy-extension' =>
850 1203 array(
851 1204 'type' => 'free',
1205 + 'model' => 'integration',
852 1206 'slug' => 'mainwp-buddy-extension',
853 1207 'title' => 'MainWP Buddy Extension',
854 1208 'desc' => 'With the MainWP Buddy Extension, you can control the BackupBuddy Plugin settings for all your child sites directly from your MainWP Dashboard. This includes giving you the ability to create your child site backups and even set Backup schedules directly from your MainWP Dashboard.',
855 - 'link' => 'https://mainwp.com/extension/mainwpbuddy/',
1209 + 'link' => 'https://mainwp.com/add-on/mainwpbuddy/',
856 1210 'changelog_url' => 'https://mainwp.com/changelog/mainwp-buddy-extension/',
857 1211 'img' => $folder_url . 'mainwp-buddy.png',
858 1212 'product_id' => 'MainWP Buddy Extension',
859 1213 'product_item_id' => 0,
@@ -867,18 +1221,19 @@
867 1221 ),
868 1222 'mainwp-bulk-settings-manager' =>
869 1223 array(
870 1224 'type' => 'pro',
1225 + 'model' => 'extension',
871 1226 'slug' => 'mainwp-bulk-settings-manager',
872 1227 'title' => 'MainWP Bulk Settings Manager',
873 1228 'desc' => 'The Bulk Settings Manager Extension unlocks the world of WordPress directly from your MainWP Dashboard. With Bulk Settings Manager you can adjust your Child site settings for the WordPress Core and almost any WordPress Plugin or Theme.',
874 - 'link' => 'https://mainwp.com/extension/bulk-settings-manager/',
1229 + 'link' => 'https://mainwp.com/add-on/bulk-settings-manager/',
875 1230 'changelog_url' => 'https://mainwp.com/changelog/mainwp-bulk-settings-manager-extension/',
876 1231 'img' => $folder_url . 'bulk-settings-manager.png',
877 1232 'product_id' => 'MainWP Bulk Settings Manager',
878 1233 'product_item_id' => 0,
879 1234 'catalog_id' => '347704',
880 - 'group' => array( 'development' ),
1235 + 'group' => array( 'admin' ),
881 1236 'privacy' => 0,
882 1237 'integration' => '',
883 1238 'integration_url' => '',
884 1239 'integration_owner' => '',
@@ -886,12 +1241,13 @@
886 1241 ),
887 1242 'mainwp-cache-control-extension' =>
888 1243 array(
889 1244 'type' => 'pro',
1245 + 'model' => 'extension',
890 1246 'slug' => 'mainwp-cache-control-extension',
891 1247 'title' => 'MainWP Cache Control Extension',
892 1248 'desc' => 'MainWP Cache Control allows you to automatically purge the Cache on your child sites after performing an update of WP Core, Theme, or a Plugin through the MainWP Dashboard.',
893 - 'link' => 'https://mainwp.com/extension/cache-control/',
1249 + 'link' => 'https://mainwp.com/add-on/cache-control/',
894 1250 'changelog_url' => 'https://mainwp.com/changelog/mainwp-cache-control-extension/',
895 1251 'img' => $folder_url . 'cache-control.png',
896 1252 'product_id' => 'MainWP Cache Control Extension',
897 1253 'product_item_id' => 0,
@@ -906,18 +1262,19 @@
906 1262 ),
907 1263 'mainwp-clone-extension' =>
908 1264 array(
909 1265 'type' => 'pro',
1266 + 'model' => 'extension',
910 1267 'slug' => 'mainwp-clone-extension',
911 1268 'title' => 'MainWP Clone Extension',
912 1269 'desc' => 'MainWP Clone Extension is an extension for the MainWP plugin that enables you to clone your child sites with no technical knowledge required.',
913 - 'link' => 'https://mainwp.com/extension/clone/',
1270 + 'link' => 'https://mainwp.com/add-on/clone/',
914 1271 'changelog_url' => 'https://mainwp.com/changelog/mainwp-clone-extension/',
915 1272 'img' => $folder_url . 'clone.png',
916 1273 'product_id' => 'MainWP Clone Extension',
917 1274 'product_item_id' => 0,
918 1275 'catalog_id' => '1555',
919 - 'group' => array( 'development' ),
1276 + 'group' => array( 'admin' ),
920 1277 'privacy' => 0,
921 1278 'integration' => '',
922 1279 'integration_url' => '',
923 1280 'integration_owner' => '',
@@ -925,18 +1282,19 @@
925 1282 ),
926 1283 'mainwp-code-snippets-extension' =>
927 1284 array(
928 1285 'type' => 'pro',
1286 + 'model' => 'extension',
929 1287 'slug' => 'mainwp-code-snippets-extension',
930 1288 'title' => 'MainWP Code Snippets Extension',
931 1289 'desc' => 'The MainWP Code Snippets Extension is a powerful PHP platform that enables you to execute php code and scripts on your child sites and view the output on your Dashboard. Requires the MainWP Dashboard plugin.',
932 - 'link' => 'https://mainwp.com/extension/code-snippets/',
1290 + 'link' => 'https://mainwp.com/add-on/code-snippets/',
933 1291 'changelog_url' => 'https://mainwp.com/changelog/mainwp-code-snippets-extension/',
934 1292 'img' => $folder_url . 'code-snippets.png',
935 1293 'product_id' => 'MainWP Code Snippets Extension',
936 1294 'product_item_id' => 0,
937 1295 'catalog_id' => '11196',
938 - 'group' => array( 'development' ),
1296 + 'group' => array( 'admin' ),
939 1297 'privacy' => 0,
940 1298 'integration' => '',
941 1299 'integration_url' => '',
942 1300 'integration_owner' => '',
@@ -944,12 +1302,13 @@
944 1302 ),
945 1303 'mainwp-comments-extension' =>
946 1304 array(
947 1305 'type' => 'pro',
1306 + 'model' => 'extension',
948 1307 'slug' => 'mainwp-comments-extension',
949 1308 'title' => 'MainWP Comments Extension',
950 1309 'desc' => 'MainWP Comments Extension is an extension for the MainWP plugin that enables you to manage comments on your child sites.',
951 - 'link' => 'https://mainwp.com/extension/comments/',
1310 + 'link' => 'https://mainwp.com/add-on/comments/',
952 1311 'changelog_url' => 'https://mainwp.com/changelog/mainwp-comments-extension/',
953 1312 'img' => $folder_url . 'comments.png',
954 1313 'product_id' => 'MainWP Comments Extension',
955 1314 'product_item_id' => 0,
@@ -963,18 +1322,19 @@
963 1322 ),
964 1323 'mainwp-custom-dashboard-extension' =>
965 1324 array(
966 1325 'type' => 'free',
1326 + 'model' => 'extension',
967 1327 'slug' => 'mainwp-custom-dashboard-extension',
968 1328 'title' => 'MainWP Custom Dashboard Extension',
969 1329 'desc' => 'The purpose of this plugin is to contain your customisation snippets for your MainWP Dashboard.',
970 - 'link' => 'https://mainwp.com/extension/mainwp-custom-dashboard-extension/',
1330 + 'link' => 'https://mainwp.com/add-on/mainwp-custom-dashboard-extension/',
971 1331 'changelog_url' => 'https://mainwp.com/changelog/mainwp-custom-dashboard-extension/',
972 1332 'img' => $folder_url . 'custom-dashboard.png',
973 1333 'product_id' => 'MainWP Custom Dashboard Extension',
974 1334 'product_item_id' => 0,
975 1335 'catalog_id' => '1080528',
976 - 'group' => array( 'development' ),
1336 + 'group' => array( 'admin' ),
977 1337 'privacy' => 0,
978 1338 'integration' => '',
979 1339 'integration_url' => '',
980 1340 'integration_owner' => '',
@@ -982,18 +1342,19 @@
982 1342 ),
983 1343 'mainwp-custom-post-types' =>
984 1344 array(
985 1345 'type' => 'pro',
1346 + 'model' => 'extension',
986 1347 'slug' => 'mainwp-custom-post-types',
987 1348 'title' => 'MainWP Custom Post Type',
988 1349 'desc' => 'Custom Post Types Extension is an extension for the MainWP Plugin that allows you to manage almost any custom post type on your child sites and that includes Publishing, Editing, and Deleting custom post type content.',
989 - 'link' => 'https://mainwp.com/extension/custom-post-types/',
1350 + 'link' => 'https://mainwp.com/add-on/custom-post-types/',
990 1351 'changelog_url' => 'https://mainwp.com/changelog/mainwp-custom-post-types-extension/',
991 1352 'img' => $folder_url . 'custom-post.png',
992 1353 'product_id' => 'MainWP Custom Post Types',
993 1354 'product_item_id' => 0,
994 1355 'catalog_id' => '1002564',
995 - 'group' => array( 'development' ),
1356 + 'group' => array( 'admin' ),
996 1357 'privacy' => 0,
997 1358 'integration' => '',
998 1359 'integration_url' => '',
999 1360 'integration_owner' => '',
@@ -1001,12 +1362,13 @@
1001 1362 ),
1002 1363 'mainwp-clean-and-lock-extension' =>
1003 1364 array(
1004 1365 'type' => 'free',
1366 + 'model' => 'extension',
1005 1367 'slug' => 'mainwp-clean-and-lock-extension',
1006 1368 'title' => 'MainWP Dashboard Lock Extension',
1007 1369 'desc' => 'MainWP Dashboard Lock Extension allows you to limit access to your wp-admin and even redirect non-wp-admin pages to a different site making your MainWP Dashboard virtually invisible.',
1008 - 'link' => 'https://mainwp.com/extension/clean-lock/',
1370 + 'link' => 'https://mainwp.com/add-on/dashboard-lock/',
1009 1371 'changelog_url' => 'https://mainwp.com/changelog/mainwp-dashboard-lock-extension/',
1010 1372 'img' => $folder_url . 'clean-and-lock.png',
1011 1373 'product_id' => 'MainWP Clean and Lock Extension',
1012 1374 'product_item_id' => 0,
@@ -1020,12 +1382,13 @@
1020 1382 ),
1021 1383 'mainwp-database-updater-extension' =>
1022 1384 array(
1023 1385 'type' => 'pro',
1386 + 'model' => 'extension',
1024 1387 'slug' => 'mainwp-database-updater-extension',
1025 1388 'title' => 'MainWP Database Updater Extension',
1026 1389 'desc' => 'MainWP Database Updater Extension detects available Database updates for the WooCommerce and Elementor plugins, and allows you to process them.',
1027 - 'link' => 'https://mainwp.com/extension/database-updater/',
1390 + 'link' => 'https://mainwp.com/add-on/database-updater/',
1028 1391 'changelog_url' => 'https://mainwp.com/changelog/mainwp-database-updater-extension/',
1029 1392 'img' => $folder_url . 'database-updater.png',
1030 1393 'product_id' => 'MainWP Database Updater Extension',
1031 1394 'product_item_id' => 0,
@@ -1040,12 +1403,13 @@
1040 1403 ),
1041 1404 'mainwp-domain-monitor-extension' =>
1042 1405 array(
1043 1406 'type' => 'pro',
1407 + 'model' => 'integration',
1044 1408 'slug' => 'mainwp-domain-monitor-extension',
1045 1409 'title' => 'MainWP Domain Monitor Extension',
1046 1410 'desc' => 'MainWP Domain Monitor Extension lets you keep a watchful eye on your domains. It alerts you via email when monitored domains are nearing expiration.',
1047 - 'link' => 'https://mainwp.com/extension/domain-monitor/',
1411 + 'link' => 'https://mainwp.com/add-on/domain-monitor/',
1048 1412 'changelog_url' => 'https://mainwp.com/changelog/mainwp-domain-monitor-extension/',
1049 1413 'img' => $folder_url . 'domain-monitor.png',
1050 1414 'product_id' => 'MainWP Domain Monitor Extension',
1051 1415 'product_item_id' => 0,
@@ -1056,21 +1420,42 @@
1056 1420 'integration_url' => '',
1057 1421 'integration_owner' => '',
1058 1422 'integration_owner_pp' => '',
1059 1423 ),
1424 + 'mainwp-early-access-extension' =>
1425 + array(
1426 + 'type' => 'free',
1427 + 'model' => 'extension',
1428 + 'slug' => 'mainwp-early-access-extension',
1429 + 'title' => 'MainWP Early Access Extension',
1430 + 'desc' => 'The MainWP Early Access Extension lets you safely opt into pre-release versions of MainWP plugins and add-ons, so you can test new features early, provide feedback, and stay ahead.',
1431 + 'link' => 'https://mainwp.com/add-on/early-access/',
1432 + 'changelog_url' => 'https://mainwp.com/changelog/mainwp-early-access-extension/',
1433 + 'img' => $folder_url . 'early-access.png',
1434 + 'product_id' => 'MainWP Early Access Extension',
1435 + 'product_item_id' => 0,
1436 + 'catalog_id' => '1318737',
1437 + 'group' => array( 'admin' ),
1438 + 'privacy' => 0,
1439 + 'integration' => '',
1440 + 'integration_url' => '',
1441 + 'integration_owner' => '',
1442 + 'integration_owner_pp' => '',
1443 + ),
1060 1444 'mainwp-favorites-extension' =>
1061 1445 array(
1062 1446 'type' => 'pro',
1447 + 'model' => 'extension',
1063 1448 'slug' => 'mainwp-favorites-extension',
1064 1449 'title' => 'MainWP Favorites Extension',
1065 1450 'desc' => 'MainWP Favorites is an extension for the MainWP plugin that allows you to store your favorite plugins and themes, and install them directly to child sites from the dashboard repository.',
1066 - 'link' => 'https://mainwp.com/extension/favorites/',
1451 + 'link' => 'https://mainwp.com/add-on/favorites/',
1067 1452 'changelog_url' => 'https://mainwp.com/changelog/mainwp-favorites-extension/',
1068 1453 'img' => $folder_url . 'favorites.png',
1069 1454 'product_id' => 'MainWP Favorites Extension',
1070 1455 'product_item_id' => 0,
1071 1456 'catalog_id' => '1379',
1072 - 'group' => array( 'development' ),
1457 + 'group' => array( 'admin' ),
1073 1458 'privacy' => 0,
1074 1459 'integration' => '',
1075 1460 'integration_url' => '',
1076 1461 'integration_owner' => '',
@@ -1078,12 +1463,13 @@
1078 1463 ),
1079 1464 'mainwp-fathom-extension' =>
1080 1465 array(
1081 1466 'type' => 'pro',
1467 + 'model' => 'integration',
1082 1468 'slug' => 'mainwp-fathom-extension',
1083 1469 'title' => 'MainWP Fathom Extension',
1084 1470 'desc' => 'MainWP Fathom Extension is an extension for the MainWP plugin that enables you to monitor detailed statistics about your child sites traffic. It integrates seamlessly with your Fathom account.',
1085 - 'link' => 'https://mainwp.com/extension/fathom/',
1471 + 'link' => 'https://mainwp.com/add-on/fathom/',
1086 1472 'changelog_url' => 'https://mainwp.com/changelog/mainwp-fathom-extension/',
1087 1473 'img' => $folder_url . 'fathom.png',
1088 1474 'product_id' => 'MainWP Fathom Extension',
1089 1475 'product_item_id' => 0,
@@ -1097,18 +1483,19 @@
1097 1483 ),
1098 1484 'mainwp-file-uploader-extension' =>
1099 1485 array(
1100 1486 'type' => 'pro',
1487 + 'model' => 'extension',
1101 1488 'slug' => 'mainwp-file-uploader-extension',
1102 1489 'title' => 'MainWP File Uploader Extension',
1103 1490 'desc' => 'MainWP File Uploader Extension gives you an simple way to upload files to your child sites! Requires the MainWP Dashboard plugin.',
1104 - 'link' => 'https://mainwp.com/extension/file-uploader/',
1491 + 'link' => 'https://mainwp.com/add-on/file-uploader/',
1105 1492 'changelog_url' => 'https://mainwp.com/changelog/mainwp-file-uploader-extension/',
1106 1493 'img' => $folder_url . 'file-uploader.png',
1107 1494 'product_id' => 'MainWP File Uploader Extension',
1108 1495 'product_item_id' => 0,
1109 1496 'catalog_id' => '11637',
1110 - 'group' => array( 'development' ),
1497 + 'group' => array( 'admin' ),
1111 1498 'privacy' => 0,
1112 1499 'integration' => '',
1113 1500 'integration_url' => '',
1114 1501 'integration_owner' => '',
@@ -1116,12 +1503,13 @@
1116 1503 ),
1117 1504 'mainwp-google-analytics-extension' =>
1118 1505 array(
1119 1506 'type' => 'pro',
1507 + 'model' => 'integration',
1120 1508 'slug' => 'mainwp-google-analytics-extension',
1121 1509 'title' => 'MainWP Google Analytics Extension',
1122 1510 'desc' => 'MainWP Google Analytics Extension is an extension for the MainWP plugin that enables you to monitor detailed statistics about your child sites traffic. It integrates seamlessly with your Google Analytics account.',
1123 - 'link' => 'https://mainwp.com/extension/google-analytics/',
1511 + 'link' => 'https://mainwp.com/add-on/google-analytics/',
1124 1512 'changelog_url' => 'https://mainwp.com/changelog/mainwp-google-analytics-extension/',
1125 1513 'img' => $folder_url . 'google-analytics.png',
1126 1514 'product_id' => 'MainWP Google Analytics Extension',
1127 1515 'product_item_id' => 0,
@@ -1132,15 +1520,36 @@
1132 1520 'integration_url' => 'https://analytics.google.com',
1133 1521 'integration_owner' => 'Google LLC',
1134 1522 'integration_owner_pp' => 'https://policies.google.com/privacy',
1135 1523 ),
1524 + 'mainwp-google-search-console-extension' =>
1525 + array(
1526 + 'type' => 'pro',
1527 + 'model' => 'integration',
1528 + 'slug' => 'mainwp-google-search-console-extension',
1529 + 'title' => 'MainWP Google Search Console Extension',
1530 + 'desc' => 'Monitor search performance, indexing status, and search queries for all your WordPress sites from Google Search Console within your central MainWP Dashboard.',
1531 + 'link' => 'https://mainwp.com/add-on/google-search-console/',
1532 + 'changelog_url' => 'https://mainwp.com/changelog/mainwp-google-search-console-extension/',
1533 + 'img' => $folder_url . 'google-search-console.png',
1534 + 'product_id' => 'MainWP Google Search Console Extension',
1535 + 'product_item_id' => 0,
1536 + 'catalog_id' => '1312071',
1537 + 'group' => array( 'visitor' ),
1538 + 'privacy' => 1,
1539 + 'integration' => 'Google Search Console API',
1540 + 'integration_url' => 'https://search.google.com',
1541 + 'integration_owner' => 'Google LLC',
1542 + 'integration_owner_pp' => 'https://policies.google.com/privacy',
1543 + ),
1136 1544 'mainwp-jetpack-protect-extension' =>
1137 1545 array(
1138 1546 'type' => 'free',
1547 + 'model' => 'integration',
1139 1548 'slug' => 'mainwp-jetpack-protect-extension',
1140 1549 'title' => 'MainWP Jetpack Protect Extension',
1141 1550 'desc' => 'MainWP Jetpack Protect Extension uses the Jetpack Protect plugin to bring you information about vulnerable plugins and themes on your Child Sites so you can act accordingly.',
1142 - 'link' => 'https://mainwp.com/extension/jetpack-protect/',
1551 + 'link' => 'https://mainwp.com/add-on/jetpack-protect/',
1143 1552 'changelog_url' => 'https://mainwp.com/changelog/mainwp-jetpack-protect-extension/',
1144 1553 'img' => $folder_url . 'jetpack-protect.png',
1145 1554 'product_id' => 'MainWP Jetpack Protect Extension',
1146 1555 'product_item_id' => 0,
@@ -1155,12 +1564,13 @@
1155 1564 ),
1156 1565 'mainwp-jetpack-scan-extension' =>
1157 1566 array(
1158 1567 'type' => 'pro',
1568 + 'model' => 'integration',
1159 1569 'slug' => 'mainwp-jetpack-scan-extension',
1160 1570 'title' => 'MainWP Jetpack Scan Extension',
1161 1571 'desc' => 'MainWP Jetpack Scan Extension uses the Jetpack Scan API to bring you information about vulnerable plugins and themes on your Child Sites so you can act accordingly.',
1162 - 'link' => 'https://mainwp.com/extension/jetpack-scan/',
1572 + 'link' => 'https://mainwp.com/add-on/jetpack-scan/',
1163 1573 'changelog_url' => 'https://mainwp.com/changelog/mainwp-jetpack-scan-extension/',
1164 1574 'img' => $folder_url . 'jetpack-scan.png',
1165 1575 'product_id' => 'MainWP Jetpack Scan Extension',
1166 1576 'product_item_id' => 0,
@@ -1175,12 +1585,13 @@
1175 1585 ),
1176 1586 'mainwp-lighthouse-extension' =>
1177 1587 array(
1178 1588 'type' => 'pro',
1589 + 'model' => 'integration',
1179 1590 'slug' => 'mainwp-lighthouse-extension',
1180 1591 'title' => 'MainWP Lighthouse Extension',
1181 1592 'desc' => 'MainWP Lighthouse Extension is used for measuring the quality of your websites. It uses the Google PageSpeed Insights API to audit performance, accessibility and search engine optimization of your WordPress sites.',
1182 - 'link' => 'https://mainwp.com/extension/lighthouse/',
1593 + 'link' => 'https://mainwp.com/add-on/lighthouse/',
1183 1594 'changelog_url' => 'https://mainwp.com/changelog/mainwp-lighthouse-extension/',
1184 1595 'img' => $folder_url . 'lighthouse.png',
1185 1596 'product_id' => 'MainWP Lighthouse Extension',
1186 1597 'product_item_id' => 0,
@@ -1194,12 +1605,13 @@
1194 1605 ),
1195 1606 'mainwp-maintenance-extension' =>
1196 1607 array(
1197 1608 'type' => 'pro',
1609 + 'model' => 'extension',
1198 1610 'slug' => 'mainwp-maintenance-extension',
1199 1611 'title' => 'MainWP Maintenance Extension',
1200 1612 'desc' => 'MainWP Maintenance Extension is MainWP Dashboard extension that clears unwanted entries from child sites in your network. You can delete post revisions, delete auto draft pots, delete trash posts, delete spam, pending and trash comments, delete unused tags and categories and optimize database tables on selected child sites.',
1201 - 'link' => 'https://mainwp.com/extension/maintenance/',
1613 + 'link' => 'https://mainwp.com/add-on/maintenance/',
1202 1614 'changelog_url' => 'https://mainwp.com/changelog/mainwp-maintenance-extension/',
1203 1615 'img' => $folder_url . 'maintenance.png',
1204 1616 'product_id' => 'MainWP Maintenance Extension',
1205 1617 'product_item_id' => 0,
@@ -1210,15 +1622,36 @@
1210 1622 'integration_url' => '',
1211 1623 'integration_owner' => '',
1212 1624 'integration_owner_pp' => '',
1213 1625 ),
1626 + 'mainwp-patchstack-extension' =>
1627 + array(
1628 + 'type' => 'free',
1629 + 'model' => 'integration',
1630 + 'slug' => 'mainwp-patchstack-extension',
1631 + 'title' => 'Patchstack Integration',
1632 + 'desc' => 'MainWP Patchstack Add-on integrates with Patchstack\'s security services to monitor your Child Sites for vulnerabilities and provide virtual patching protection, helping you maintain secure WordPress installations across your network.',
1633 + 'link' => 'https://mainwp.com/add-on/patchstack-integration/',
1634 + 'changelog_url' => 'https://mainwp.com/changelog/mainwp-patchstack-extension/',
1635 + 'img' => $folder_url . 'patchstack.png',
1636 + 'product_id' => 'MainWP Patchstack Integration',
1637 + 'product_item_id' => 0,
1638 + 'catalog_id' => '1313231',
1639 + 'group' => array( 'security' ),
1640 + 'privacy' => 1,
1641 + 'integration' => 'Patchstack API',
1642 + 'integration_url' => 'https://patchstack.com/',
1643 + 'integration_owner' => 'Patchstack OÜ',
1644 + 'integration_owner_pp' => 'https://patchstack.com/privacy-policy/',
1645 + ),
1214 1646 'mainwp-piwik-extension' =>
1215 1647 array(
1216 1648 'type' => 'pro',
1649 + 'model' => 'integration',
1217 1650 'slug' => 'mainwp-piwik-extension',
1218 1651 'title' => 'MainWP Piwik Extension',
1219 1652 'desc' => 'MainWP Matomo Extension is an extension for the MainWP plugin that enables you to monitor detailed statistics about your child sites traffic. It integrates seamlessly with your Piwik account.',
1220 - 'link' => 'https://mainwp.com/extension/matomo/',
1653 + 'link' => 'https://mainwp.com/add-on/matomo/',
1221 1654 'changelog_url' => 'https://mainwp.com/changelog/mainwp-matomo-extension/',
1222 1655 'img' => $folder_url . 'piwik.png',
1223 1656 'product_id' => 'MainWP Piwik Extension',
1224 1657 'product_item_id' => 0,
@@ -1232,12 +1665,13 @@
1232 1665 ),
1233 1666 'mainwp-post-dripper-extension' =>
1234 1667 array(
1235 1668 'type' => 'pro',
1669 + 'model' => 'extension',
1236 1670 'slug' => 'mainwp-post-dripper-extension',
1237 1671 'title' => 'MainWP Post Dripper Extension',
1238 1672 'desc' => 'MainWP Post Dripper Extension allows you to deliver posts or pages to your network of sites over a pre-scheduled period of time. Requires MainWP Dashboard plugin.',
1239 - 'link' => 'https://mainwp.com/extension/post-dripper/',
1673 + 'link' => 'https://mainwp.com/add-on/post-dripper/',
1240 1674 'changelog_url' => 'https://mainwp.com/changelog/mainwp-post-dripper-extension/',
1241 1675 'img' => $folder_url . 'post-dripper.png',
1242 1676 'product_id' => 'MainWP Post Dripper Extension',
1243 1677 'product_item_id' => 0,
@@ -1251,12 +1685,13 @@
1251 1685 ),
1252 1686 'mainwp-post-plus-extension' =>
1253 1687 array(
1254 1688 'type' => 'pro',
1689 + 'model' => 'extension',
1255 1690 'slug' => 'mainwp-post-plus-extension',
1256 1691 'title' => 'MainWP Post Plus Extension',
1257 1692 'desc' => 'Enhance your MainWP publishing experience. The MainWP Post Plus Extension allows you to save work in progress as Post and Page drafts. That is not all, it allows you to use random authors, dates and categories for your posts and pages. Requires the MainWP Dashboard plugin.',
1258 - 'link' => 'https://mainwp.com/extension/post-plus/',
1693 + 'link' => 'https://mainwp.com/add-on/post-plus/',
1259 1694 'changelog_url' => 'https://mainwp.com/changelog/mainwp-post-plus-extension/',
1260 1695 'img' => $folder_url . 'post-plus.png',
1261 1696 'product_id' => 'MainWP Post Plus Extension',
1262 1697 'product_item_id' => 0,
@@ -1270,18 +1705,19 @@
1270 1705 ),
1271 1706 'mainwp-pressable-extension' =>
1272 1707 array(
1273 1708 'type' => 'pro',
1709 + 'model' => 'integration',
1274 1710 'slug' => 'mainwp-pressable-extension',
1275 1711 'title' => 'MainWP Pressable Extension',
1276 1712 'desc' => 'MainWP Pressable Extension simplifies your Pressable hosting management experience, such as creating, disabling, and deleting websites, enabling/disabling CDN, managing backups, and more without the need to log in to your Pressable account.',
1277 - 'link' => 'https://mainwp.com/extension/pressable/',
1713 + 'link' => 'https://mainwp.com/add-on/pressable/',
1278 1714 'changelog_url' => 'https://mainwp.com/changelog/mainwp-pressable-extension/',
1279 1715 'img' => $folder_url . 'pressable.png',
1280 1716 'product_id' => 'MainWP Pressable Extension',
1281 1717 'product_item_id' => 0,
1282 1718 'catalog_id' => '1271427',
1283 - 'group' => array( 'development' ),
1719 + 'group' => array( 'admin' ),
1284 1720 'privacy' => 1,
1285 1721 'integration' => 'Pressable API',
1286 1722 'integration_url' => 'https://pressable.com/',
1287 1723 'integration_owner' => 'Pressable, Inc.',
@@ -1289,12 +1725,13 @@
1289 1725 ),
1290 1726 'mainwp-pro-reports-extension' =>
1291 1727 array(
1292 1728 'type' => 'pro',
1729 + 'model' => 'extension',
1293 1730 'slug' => 'mainwp-pro-reports-extension',
1294 1731 'title' => 'MainWP Pro Reports Extension',
1295 1732 'desc' => 'The MainWP Pro Reports extension is a fully customizable reporting engine that allows you to create the type of report you are proud to send to your clients.',
1296 - 'link' => 'https://mainwp.com/extension/pro-reports/',
1733 + 'link' => 'https://mainwp.com/add-on/pro-reports/',
1297 1734 'changelog_url' => 'https://mainwp.com/changelog/mainwp-pro-reports-extension/',
1298 1735 'img' => $folder_url . 'pro-reports.png',
1299 1736 'product_id' => 'MainWP Pro Reports Extension',
1300 1737 'product_item_id' => 0,
@@ -1305,15 +1742,36 @@
1305 1742 'integration_url' => '',
1306 1743 'integration_owner' => '',
1307 1744 'integration_owner_pp' => '',
1308 1745 ),
1746 + 'mainwp-regression-testing-extension' =>
1747 + array(
1748 + 'type' => 'pro',
1749 + 'model' => 'extension',
1750 + 'slug' => 'mainwp-regression-testing-extension',
1751 + 'title' => 'MainWP Regression Testing Extension',
1752 + 'desc' => 'Easily spot changes in your child site\'s source code to ensure updates don\'t introduce unexpected changes.',
1753 + 'link' => 'https://mainwp.com/add-on/regression-testing/',
1754 + 'changelog_url' => 'https://mainwp.com/changelog/mainwp-regression-testing-extension/',
1755 + 'img' => $folder_url . 'regression-testing.png',
1756 + 'product_id' => 'MainWP Regression Testing Extension',
1757 + 'product_item_id' => 0,
1758 + 'catalog_id' => '1305199',
1759 + 'group' => array( 'updates' ),
1760 + 'privacy' => 0,
1761 + 'integration' => '',
1762 + 'integration_url' => '',
1763 + 'integration_owner' => '',
1764 + 'integration_owner_pp' => '',
1765 + ),
1309 1766 'mainwp-rocket-extension' =>
1310 1767 array(
1311 1768 'type' => 'pro',
1769 + 'model' => 'integration',
1312 1770 'slug' => 'mainwp-rocket-extension',
1313 1771 'title' => 'MainWP Rocket Extension',
1314 1772 'desc' => 'MainWP Rocket Extension combines the power of your MainWP Dashboard with the popular WP Rocket Plugin. It allows you to mange WP Rocket settings and quickly Clear and Preload cache on your child sites.',
1315 - 'link' => 'https://mainwp.com/extension/rocket/',
1773 + 'link' => 'https://mainwp.com/add-on/rocket/',
1316 1774 'changelog_url' => 'https://mainwp.com/changelog/mainwp-rocket-extension/',
1317 1775 'img' => $folder_url . 'rocket.png',
1318 1776 'product_id' => 'MainWP Rocket Extension',
1319 1777 'product_item_id' => 0,
@@ -1327,12 +1785,13 @@
1327 1785 ),
1328 1786 'mainwp-sucuri-extension' =>
1329 1787 array(
1330 1788 'type' => 'free',
1789 + 'model' => 'integration',
1331 1790 'slug' => 'mainwp-sucuri-extension',
1332 1791 'title' => 'MainWP Sucuri Extension',
1333 1792 'desc' => 'MainWP Sucuri Extension enables you to scan your child sites for various types of malware, spam injections, website errors, and much more. Requires the MainWP Dashboard.',
1334 - 'link' => 'https://mainwp.com/extension/sucuri/',
1793 + 'link' => 'https://mainwp.com/add-on/sucuri/',
1335 1794 'changelog_url' => 'https://mainwp.com/changelog/mainwp-sucuri-extension/',
1336 1795 'img' => $folder_url . 'sucuri.png',
1337 1796 'product_id' => 'MainWP Sucuri Extension',
1338 1797 'product_item_id' => 0,
@@ -1346,12 +1805,13 @@
1346 1805 ),
1347 1806 'mainwp-ithemes-security-extension' =>
1348 1807 array(
1349 1808 'type' => 'pro',
1809 + 'model' => 'integration',
1350 1810 'slug' => 'mainwp-ithemes-security-extension',
1351 - 'title' => 'MainWP iThemes Security Extension',
1352 - 'desc' => 'The iThemes Security Extension combines the power of your MainWP Dashboard with the popular iThemes Security Plugin. It allows you to manage iThemes Security plugin settings directly from your dashboard. Requires MainWP Dashboard plugin.',
1353 - 'link' => 'https://mainwp.com/extension/ithemes-security/',
1811 + 'title' => 'MainWP Solid Security Integration Extension',
1812 + 'desc' => 'The Solid Security Integration Extension combines the power of your MainWP Dashboard with the popular Solid Security Integration Plugin. It allows you to manage Solid Security Integration plugin settings directly from your dashboard. Requires MainWP Dashboard plugin.',
1813 + 'link' => 'https://mainwp.com/add-on/ithemes-security/',
1354 1814 'changelog_url' => 'https://mainwp.com/changelog/mainwp-ithemes-security-extension/',
1355 1815 'img' => $folder_url . 'ithemes.png',
1356 1816 'product_id' => 'MainWP Security Extension',
1357 1817 'product_item_id' => 0,
@@ -1357,9 +1817,9 @@
1357 1817 'product_item_id' => 0,
1358 1818 'catalog_id' => '113355',
1359 1819 'group' => array( 'security' ),
1360 1820 'privacy' => 2,
1361 - 'integration' => 'iThemes Security Plugin',
1821 + 'integration' => 'Solid Security Integration Plugin',
1362 1822 'integration_url' => 'https://ithemes.com/',
1363 1823 'integration_owner' => 'Liquid Web, LLC',
1364 1824 'integration_owner_pp' => 'https://www.liquidweb.com/about-us/policies/privacy-policy/',
1365 1825 ),
@@ -1365,12 +1825,13 @@
1365 1825 ),
1366 1826 'mainwp-ssl-monitor-extension' =>
1367 1827 array(
1368 1828 'type' => 'pro',
1829 + 'model' => 'extension',
1369 1830 'slug' => 'mainwp-ssl-monitor-extension',
1370 1831 'title' => 'MainWP SSL Monitor Extension',
1371 1832 'desc' => 'MainWP SSL Monitor Extension lets you keep a watchful eye on your SSL Certificates. It alerts you via email when monitored certificates are nearing expiration.',
1372 - 'link' => 'https://mainwp.com/extension/ssl-monitor/',
1833 + 'link' => 'https://mainwp.com/add-on/ssl-monitor/',
1373 1834 'changelog_url' => 'https://mainwp.com/changelog/mainwp-ssl-monitor-extension/',
1374 1835 'img' => $folder_url . 'ssl-monitor.png',
1375 1836 'product_id' => 'MainWP SSL Monitor Extension',
1376 1837 'product_item_id' => 0,
@@ -1385,18 +1846,19 @@
1385 1846 ),
1386 1847 'mainwp-staging-extension' =>
1387 1848 array(
1388 1849 'type' => 'pro',
1850 + 'model' => 'integration',
1389 1851 'slug' => 'mainwp-staging-extension',
1390 1852 'title' => 'MainWP Staging Extension',
1391 1853 'desc' => 'MainWP Staging Extension along with the WP Staging plugin, allows you to create and manage staging sites for your child sites.',
1392 - 'link' => 'https://mainwp.com/extension/staging/',
1854 + 'link' => 'https://mainwp.com/add-on/staging/',
1393 1855 'changelog_url' => 'https://mainwp.com/changelog/mainwp-staging-extension/',
1394 1856 'img' => $folder_url . 'staging.png',
1395 1857 'product_id' => 'MainWP Staging Extension',
1396 1858 'product_item_id' => 0,
1397 1859 'catalog_id' => '1034878',
1398 - 'group' => array( 'development' ),
1860 + 'group' => array( 'admin' ),
1399 1861 'privacy' => 2,
1400 1862 'integration' => 'WP STAGING Backup Duplicator & Migration Plugin',
1401 1863 'integration_url' => 'https://wp-staging.com/',
1402 1864 'integration_owner' => 'WP STAGING',
@@ -1404,12 +1866,13 @@
1404 1866 ),
1405 1867 'mainwp-team-control' =>
1406 1868 array(
1407 1869 'type' => 'pro',
1870 + 'model' => 'extension',
1408 1871 'slug' => 'mainwp-team-control',
1409 1872 'title' => 'MainWP Team Control',
1410 1873 'desc' => 'MainWP Team Control extension allows you to create a custom roles for your dashboard site users and limiting their access to MainWP features. Requires MainWP Dashboard plugin.',
1411 - 'link' => 'https://mainwp.com/extension/team-control/',
1874 + 'link' => 'https://mainwp.com/add-on/team-control/',
1412 1875 'changelog_url' => 'https://mainwp.com/changelog/mainwp-team-control-extension/',
1413 1876 'img' => $folder_url . 'team-control.png',
1414 1877 'product_id' => 'MainWP Team Control',
1415 1878 'product_item_id' => 0,
@@ -1423,12 +1886,13 @@
1423 1886 ),
1424 1887 'termageddon-for-mainwp' =>
1425 1888 array(
1426 1889 'type' => 'free',
1890 + 'model' => 'integration',
1427 1891 'slug' => 'termageddon-for-mainwp',
1428 1892 'title' => 'Termageddon for MainWP',
1429 1893 'desc' => 'This extension is used for creating Privacy Policy, ToS, Disclaimer and Cookie Policy & Consent Tool pages automatically on your websites.',
1430 - 'link' => 'https://mainwp.com/extension/termageddon-for-mainwp/',
1894 + 'link' => 'https://mainwp.com/add-on/termageddon-for-mainwp/',
1431 1895 'changelog_url' => 'https://mainwp.com/changelog/termageddon-for-mainwp/',
1432 1896 'img' => $folder_url . 'termageddon.png',
1433 1897 'product_id' => 'Termageddon for MainWP',
1434 1898 'product_item_id' => 0,
@@ -1443,12 +1907,13 @@
1443 1907 ),
1444 1908 'mainwp-timecapsule-extension' =>
1445 1909 array(
1446 1910 'type' => 'free',
1911 + 'model' => 'integration',
1447 1912 'slug' => 'mainwp-timecapsule-extension',
1448 1913 'title' => 'MainWP Time Capsule Extension',
1449 1914 'desc' => 'With the MainWP Time Capsule Extension, you can control the WP Time Capsule Plugin on all your child sites directly from your MainWP Dashboard. This includes the ability to create your child site backups and even restore your child sites to a point back in time directly from your dashboard.',
1450 - 'link' => 'https://mainwp.com/extension/time-capsule/',
1915 + 'link' => 'https://mainwp.com/add-on/time-capsule/',
1451 1916 'changelog_url' => 'https://mainwp.com/changelog/mainwp-time-capsule-extension/',
1452 1917 'img' => $folder_url . 'time-capsule.png',
1453 1918 'product_id' => 'MainWP Time Capsule Extension',
1454 1919 'product_item_id' => 0,
@@ -1462,12 +1927,13 @@
1462 1927 ),
1463 1928 'mainwp-time-tracker-extension' =>
1464 1929 array(
1465 1930 'type' => 'pro',
1931 + 'model' => 'extension',
1466 1932 'slug' => 'mainwp-time-tracker-extension',
1467 1933 'title' => 'MainWP Time Tracker Extension',
1468 1934 'desc' => 'Simplify client billing with precise project hour logging and detailed reporting. This tool integrates directly into your Dashboard for streamlined billing, ensuring accuracy and transparency in client charges.',
1469 - 'link' => 'https://mainwp.com/extension/time-tracker/',
1935 + 'link' => 'https://mainwp.com/add-on/time-tracker/',
1470 1936 'changelog_url' => 'https://mainwp.com/changelog/mainwp-time-tracker-extension/',
1471 1937 'img' => $folder_url . 'time-tracker.png',
1472 1938 'product_id' => 'MainWP Time Tracker Extension',
1473 1939 'product_item_id' => 0,
@@ -1481,12 +1947,13 @@
1481 1947 ),
1482 1948 'mainwp-cost-tracker-assistant-extension' =>
1483 1949 array(
1484 1950 'type' => 'pro',
1951 + 'model' => 'extension',
1485 1952 'slug' => 'mainwp-cost-tracker-assistant-extension',
1486 1953 'title' => 'MainWP Cost Tracker Assistant Extension',
1487 1954 'desc' => 'Enhance your MainWP Dashboard by adding timely notifications for upcoming subscription renewals and automates cost tracking for newly installed plugins and themes through zip uploads, streamlining cost management tasks.',
1488 - 'link' => 'https://mainwp.com/extension/cost-tracker-assistant/',
1955 + 'link' => 'https://mainwp.com/add-on/cost-tracker-assistant/',
1489 1956 'changelog_url' => 'https://mainwp.com/changelog/mainwp-cost-tracker-assistant-extension/',
1490 1957 'img' => $folder_url . 'cost-tracker-assistant.png',
1491 1958 'product_id' => 'MainWP Cost Tracker Assistant Extension',
1492 1959 'product_item_id' => 0,
@@ -1500,12 +1967,13 @@
1500 1967 ),
1501 1968 'mainwp-updraftplus-extension' =>
1502 1969 array(
1503 1970 'type' => 'free',
1971 + 'model' => 'integration',
1504 1972 'slug' => 'mainwp-updraftplus-extension',
1505 1973 'title' => 'MainWP UpdraftPlus Extension',
1506 1974 'desc' => 'MainWP UpdraftPlus Extension combines the power of your MainWP Dashboard with the popular WordPress UpdraftPlus Plugin. It allows you to quickly back up your child sites.',
1507 - 'link' => 'https://mainwp.com/extension/updraftplus/',
1975 + 'link' => 'https://mainwp.com/add-on/updraftplus/',
1508 1976 'changelog_url' => 'https://mainwp.com/changelog/mainwp-updraftplus-extension/',
1509 1977 'img' => $folder_url . 'updraftplus.png',
1510 1978 'product_id' => 'MainWP UpdraftPlus Extension',
1511 1979 'product_item_id' => 0,
@@ -1519,18 +1987,19 @@
1519 1987 ),
1520 1988 'mainwp-url-extractor-extension' =>
1521 1989 array(
1522 1990 'type' => 'pro',
1991 + 'model' => 'extension',
1523 1992 'slug' => 'mainwp-url-extractor-extension',
1524 1993 'title' => 'MainWP URL Extractor Extension',
1525 1994 'desc' => 'MainWP URL Extractor allows you to search your child sites post and pages and export URLs in customized format. Requires MainWP Dashboard plugin.',
1526 - 'link' => 'https://mainwp.com/extension/url-extractor/',
1995 + 'link' => 'https://mainwp.com/add-on/url-extractor/',
1527 1996 'changelog_url' => 'https://mainwp.com/changelog/mainwp-url-extractor-extension/',
1528 1997 'img' => $folder_url . 'url-extractor.png',
1529 1998 'product_id' => 'MainWP Url Extractor Extension',
1530 1999 'product_item_id' => 0,
1531 2000 'catalog_id' => '11965',
1532 - 'group' => array( 'development' ),
2001 + 'group' => array( 'admin' ),
1533 2002 'privacy' => 0,
1534 2003 'integration' => '',
1535 2004 'integration_url' => '',
1536 2005 'integration_owner' => '',
@@ -1538,12 +2007,13 @@
1538 2007 ),
1539 2008 'mainwp-virusdie-extension' =>
1540 2009 array(
1541 2010 'type' => 'pro',
2011 + 'model' => 'integration',
1542 2012 'slug' => 'mainwp-virusdie-extension',
1543 2013 'title' => 'MainWP Virusdie Extension',
1544 2014 'desc' => 'MainWP Virusdie Extension enables you to scan your child sites for various types of malware, spam injections, website errors, and much more. Requires the MainWP Dashboard.',
1545 - 'link' => 'https://mainwp.com/extension/virusdie/',
2015 + 'link' => 'https://mainwp.com/add-on/virusdie/',
1546 2016 'changelog_url' => 'https://mainwp.com/changelog/mainwp-virusdie-extension/',
1547 2017 'img' => $folder_url . 'virusdie.png',
1548 2018 'product_id' => 'MainWP Virusdie Extension',
1549 2019 'product_item_id' => 0,
@@ -1556,13 +2026,14 @@
1556 2026 'integration_owner_pp' => 'https://virusdie.com/rules/privacypolicy/',
1557 2027 ),
1558 2028 'mainwp-vulnerability-checker-extension' =>
1559 2029 array(
1560 - 'type' => 'pro',
2030 + 'type' => 'free',
2031 + 'model' => 'integration',
1561 2032 'slug' => 'mainwp-vulnerability-checker-extension',
1562 2033 'title' => 'MainWP Vulnerability Checker Extension',
1563 2034 'desc' => 'MainWP Vulnerability Checker extension uses WPScan Vulnerability Database API to bring you information about vulnerable plugins on your Child Sites so you can act accordingly.',
1564 - 'link' => 'https://mainwp.com/extension/vulnerability-checker/',
2035 + 'link' => 'https://mainwp.com/add-on/vulnerability-checker/',
1565 2036 'changelog_url' => 'https://mainwp.com/changelog/mainwp-vulnerability-checker-extension/',
1566 2037 'img' => $folder_url . 'vulnerability-checker.png',
1567 2038 'product_id' => 'MainWP Vulnerability Checker Extension',
1568 2039 'product_item_id' => 0,
@@ -1580,12 +2051,13 @@
1580 2051 ),
1581 2052 'mainwp-branding-extension' =>
1582 2053 array(
1583 2054 'type' => 'pro',
2055 + 'model' => 'extension',
1584 2056 'slug' => 'mainwp-branding-extension',
1585 2057 'title' => 'MainWP White Label Extension',
1586 2058 'desc' => 'The MainWP White Label extension allows you to alter the details of the MianWP Child Plugin to reflect your companies brand or completely hide the plugin from the installed plugins list.',
1587 - 'link' => 'https://mainwp.com/extension/white-label/',
2059 + 'link' => 'https://mainwp.com/add-on/white-label/',
1588 2060 'changelog_url' => 'https://mainwp.com/changelog/mainwp-white-label-extension/',
1589 2061 'img' => $folder_url . 'branding.png',
1590 2062 'product_id' => 'MainWP Branding Extension',
1591 2063 'product_item_id' => 0,
@@ -1599,12 +2071,13 @@
1599 2071 ),
1600 2072 'mainwp-woocommerce-shortcuts-extension' =>
1601 2073 array(
1602 2074 'type' => 'free',
2075 + 'model' => 'integration',
1603 2076 'slug' => 'mainwp-woocommerce-shortcuts-extension',
1604 2077 'title' => 'MainWP WooCommerce Shortcuts Extension',
1605 2078 'desc' => 'MainWP WooCommerce Shortcuts provides you a quick access WooCommerce pages in your network. Requires MainWP Dashboard plugin.',
1606 - 'link' => 'https://mainwp.com/extension/woocommerce-shortcuts/',
2079 + 'link' => 'https://mainwp.com/add-on/woocommerce-shortcuts/',
1607 2080 'changelog_url' => 'https://mainwp.com/changelog/mainwp-woocommerce-shortcuts-extension/',
1608 2081 'img' => $folder_url . 'woo-shortcuts.png',
1609 2082 'product_id' => 'MainWP WooCommerce Shortcuts Extension',
1610 2083 'product_item_id' => 0,
@@ -1618,12 +2091,13 @@
1618 2091 ),
1619 2092 'mainwp-woocommerce-status-extension' =>
1620 2093 array(
1621 2094 'type' => 'pro',
2095 + 'model' => 'integration',
1622 2096 'slug' => 'mainwp-woocommerce-status-extension',
1623 2097 'title' => 'MainWP WooCommerce Status Extension',
1624 2098 'desc' => 'MainWP WooCommerce Status provides you a quick overview of your WooCommerce stores in your network. Requires MainWP Dashboard plugin.',
1625 - 'link' => 'https://mainwp.com/extension/woocommerce-status/',
2099 + 'link' => 'https://mainwp.com/add-on/woocommerce-status/',
1626 2100 'changelog_url' => 'https://mainwp.com/changelog/mainwp-woocommerce-status-extension/',
1627 2101 'img' => $folder_url . 'woo-status.png',
1628 2102 'product_id' => 'MainWP WooCommerce Status Extension',
1629 2103 'product_item_id' => 0,
@@ -1637,12 +2111,13 @@
1637 2111 ),
1638 2112 'mainwp-wordfence-extension' =>
1639 2113 array(
1640 2114 'type' => 'pro',
2115 + 'model' => 'integration',
1641 2116 'slug' => 'mainwp-wordfence-extension',
1642 2117 'title' => 'MainWP WordFence Extension',
1643 2118 'desc' => 'The WordFence Extension combines the power of your MainWP Dashboard with the popular WordPress Wordfence Plugin. It allows you to manage WordFence settings, Monitor Live Traffic and Scan your child sites directly from your dashboard. Requires MainWP Dashboard plugin.',
1644 - 'link' => 'https://mainwp.com/extension/wordfence/',
2119 + 'link' => 'https://mainwp.com/add-on/wordfence/',
1645 2120 'changelog_url' => 'https://mainwp.com/changelog/mainwp-wordfence-extension/',
1646 2121 'img' => $folder_url . 'wordfence.png',
1647 2122 'product_id' => 'MainWP Wordfence Extension',
1648 2123 'product_item_id' => 0,
@@ -1656,12 +2131,13 @@
1656 2131 ),
1657 2132 'wordpress-seo-extension' =>
1658 2133 array(
1659 2134 'type' => 'pro',
2135 + 'model' => 'integration',
1660 2136 'slug' => 'wordpress-seo-extension',
1661 - 'title' => 'MainWP WordPress SEO Extension',
1662 - 'desc' => 'MainWP WordPress SEO extension by MainWP enables you to manage all your WordPress SEO by Yoast plugins across your network. Create and quickly set settings templates from one central dashboard. Requires MainWP Dashboard plugin.',
1663 - 'link' => 'https://mainwp.com/extension/wordpress-seo/',
2137 + 'title' => 'MainWP Yoast SEO Extension',
2138 + 'desc' => 'MainWP Yoast SEO extension by MainWP enables you to manage all your WordPress SEO by Yoast plugins across your network. Create and quickly set settings templates from one central dashboard. Requires MainWP Dashboard plugin.',
2139 + 'link' => 'https://mainwp.com/add-on/wordpress-seo/',
1664 2140 'changelog_url' => 'https://mainwp.com/changelog/mainwp-wordpress-seo-extension/',
1665 2141 'img' => $folder_url . 'wordpress-seo.png',
1666 2142 'product_id' => 'MainWP WordPress SEO Extension',
1667 2143 'product_item_id' => 0,
@@ -1672,16 +2148,17 @@
1672 2148 'integration_url' => 'https://yoast.com/',
1673 2149 'integration_owner' => 'Newfold Capital Inc.',
1674 2150 'integration_owner_pp' => 'https://yoast.com/privacy-policy/',
1675 2151 ),
1676 - 'activity-log-mainwp' => array(
2152 + 'wp-security-audit-log' => array(
1677 2153 'type' => 'org',
1678 - 'product_id' => 'activity-log-mainwp',
1679 - 'slug' => 'activity-log-mainwp/activity-log-mainwp.php',
2154 + 'model' => 'integration',
2155 + 'product_id' => 'wp-security-audit-log',
2156 + 'slug' => 'wp-security-audit-log/wp-security-audit-log.php',
1680 2157 'title' => 'Activity Log For MainWP',
1681 - 'link' => 'https://wordpress.org/plugins/activity-log-mainwp/',
1682 - 'changelog_url' => 'https://wordpress.org/plugins/activity-log-mainwp/#developers',
1683 - 'url' => 'https://wordpress.org/plugins/activity-log-mainwp/',
2158 + 'link' => 'https://wordpress.org/plugins/wp-security-audit-log/',
2159 + 'changelog_url' => 'https://wordpress.org/plugins/wp-security-audit-log/#developers',
2160 + 'url' => 'https://wordpress.org/plugins/wp-security-audit-log/',
1684 2161 'group' => array( 'security' ),
1685 2162 'privacy' => 2,
1686 2163 'integration' => 'WP Activity Log',
1687 2164 'integration_url' => 'https://wpactivitylog.com/',
@@ -1688,10 +2165,28 @@
1688 2165 'integration_owner' => 'WP White Security',
1689 2166 'integration_owner_pp' => 'https://www.wpwhitesecurity.com/privacy-policy/',
1690 2167 'desc' => 'Add the Activity Logs for MainWP extension to also keep a log of all the user activity and other changes that happen both on the MainWP dashboard, collate child site activity logs',
1691 2168 ),
2169 + 'aam-extension-mainwp' => array(
2170 + 'type' => 'org',
2171 + 'model' => 'integration',
2172 + 'product_id' => 'aam-extension-mainwp',
2173 + 'slug' => 'aam-extension-mainwp/aam-extension-mainwp.php',
2174 + 'title' => 'AAM Extension for MainWP',
2175 + 'link' => 'https://wordpress.org/plugins/aam-extension-mainwp/',
2176 + 'changelog_url' => 'https://wordpress.org/plugins/aam-extension-mainwp/#developers',
2177 + 'url' => 'https://wordpress.org/plugins/aam-extension-mainwp/',
2178 + 'group' => array( 'security' ),
2179 + 'privacy' => 2,
2180 + 'integration' => 'Advanced Access Manager',
2181 + 'integration_url' => 'https://aamportal.com/',
2182 + 'integration_owner' => 'AAM Plugin',
2183 + 'integration_owner_pp' => 'https://wordpress.org/plugins/advanced-access-manager/',
2184 + 'desc' => 'This extension integrates Advanced Access Manager (AAM) with MainWP, enabling seamless synchronization of AAM security scan results with your MainWP dashboard.',
2185 + ),
1692 2186 'security-ninja-for-mainwp' => array(
1693 2187 'type' => 'org',
2188 + 'model' => 'integration',
1694 2189 'product_id' => 'security-ninja-for-mainwp',
1695 2190 'slug' => 'security-ninja-for-mainwp/security-ninja-mainwp.php',
1696 2191 'title' => 'Security Ninja For MainWP',
1697 2192 'link' => 'https://wordpress.org/plugins/security-ninja-for-mainwp/',
@@ -1706,8 +2201,9 @@
1706 2201 'desc' => 'Security Ninja is a strong plugin that helps you find vulnerabilites and improve the security on your website.',
1707 2202 ),
1708 2203 'wp-compress-mainwp' => array(
1709 2204 'type' => 'org',
2205 + 'model' => 'integration',
1710 2206 'product_id' => 'wp-compress-mainwp',
1711 2207 'slug' => 'wp-compress-mainwp/wp-compress-main-wp.php',
1712 2208 'title' => 'WP Compress for MainWP',
1713 2209 'link' => 'https://wordpress.org/plugins/wp-compress-mainwp/',
@@ -1721,8 +2217,9 @@
1721 2217 'integration_owner_pp' => 'https://wpcompress.com/privacy-policy/',
1722 2218 ),
1723 2219 'seopress-for-mainwp' => array(
1724 2220 'type' => 'org',
2221 + 'model' => 'integration',
1725 2222 'product_id' => 'seopress-for-mainwp',
1726 2223 'slug' => 'seopress-for-mainwp/seopress-for-mainwp.php',
1727 2224 'title' => 'SEOPress for MainWP',
1728 2225 'link' => 'https://wordpress.org/plugins/seopress-for-mainwp/',
@@ -1736,8 +2233,9 @@
1736 2233 'integration_owner_pp' => 'https://www.seopress.org/privacy-policy/',
1737 2234 ),
1738 2235 'wpvivid-backup-mainwp' => array(
1739 2236 'type' => 'org',
2237 + 'model' => 'integration',
1740 2238 'product_id' => 'wpvivid-backup-mainwp',
1741 2239 'slug' => 'wpvivid-backup-mainwp/wpvivid-backup-mainwp.php',
1742 2240 'title' => 'WPvivid Backup for MainWP',
1743 2241 'link' => 'https://wordpress.org/plugins/wpvivid-backup-mainwp/',
@@ -1749,8 +2247,93 @@
1749 2247 'integration_url' => 'https://wpvivid.com/',
1750 2248 'integration_owner' => 'VPSrobots Inc.',
1751 2249 'integration_owner_pp' => 'https://wpvivid.com/privacy-policy',
1752 2250 'desc' => 'WPvivid Backup for MainWP enables you to create and download backups of a specific child site, set backup schedules, set WPvivid Backup Plugin settings for all of your child sites directly from your MainWP Dashboard.',
2251 + ),
2252 + 'independent-analytics-for-mainwp' => array(
2253 + 'type' => 'org',
2254 + 'model' => 'integration',
2255 + 'product_id' => 'independent-analytics-for-mainwp',
2256 + 'slug' => 'independent-analytics-for-mainwp/independent-analytics-for-mainwp.php',
2257 + 'title' => 'Independent Analytics for MainWP',
2258 + 'link' => 'https://wordpress.org/plugins/independent-analytics-for-mainwp/',
2259 + 'changelog_url' => 'https://wordpress.org/plugins/independent-analytics-for-mainwp/#developers',
2260 + 'url' => 'https://wordpress.org/plugins/independent-analytics-for-mainwp/',
2261 + 'group' => array( 'visitor' ),
2262 + 'privacy' => 2,
2263 + 'integration' => 'Independent Analytics',
2264 + 'integration_url' => 'https://independentwp.com/',
2265 + 'integration_owner' => 'Independent Insights',
2266 + 'integration_owner_pp' => 'https://independentwp.com/privacy-policy/',
2267 + 'desc' => 'This is a free extension for MainWP that lets you view stats from all of your sites using Independent Analytics in the main Overview menu.',
2268 + ),
2269 + 'update-brief-mainwp' => array(
2270 + 'type' => 'org',
2271 + 'model' => 'integration',
2272 + 'product_id' => 'update-brief-mainwp',
2273 + 'slug' => 'update-brief-mainwp/update-brief-mainwp.php',
2274 + 'title' => 'Update Brief for MainWP',
2275 + 'link' => 'https://wordpress.org/plugins/update-brief-mainwp/',
2276 + 'changelog_url' => 'https://wordpress.org/plugins/update-brief-mainwp/#developers',
2277 + 'url' => 'https://wordpress.org/plugins/update-brief-mainwp/',
2278 + 'group' => array( 'client' ),
2279 + 'privacy' => 1,
2280 + 'integration' => 'Update Brief',
2281 + 'integration_url' => 'https://updatebrief.com/',
2282 + 'integration_owner' => 'Ascend Online Media Limited',
2283 + 'integration_owner_pp' => 'https://updatebrief.com/policy/',
2284 + 'desc' => 'Turn WP and plugin updates into compelling client reports that clearly show your maintenance value through concise, professional update summaries.',
2285 + ),
2286 + 'burst-mainwp' => array(
2287 + 'type' => 'org',
2288 + 'model' => 'integration',
2289 + 'product_id' => 'burst-mainwp',
2290 + 'slug' => 'burst-mainwp/burst-mainwp.php',
2291 + 'title' => 'Burst Statistics for MainWP',
2292 + 'link' => 'https://wordpress.org/plugins/burst-mainwp/',
2293 + 'changelog_url' => 'https://wordpress.org/plugins/burst-mainwp/#developers',
2294 + 'url' => 'https://wordpress.org/plugins/burst-mainwp/',
2295 + 'group' => array( 'visitor' ),
2296 + 'privacy' => 2,
2297 + 'integration' => 'Burst Statistics',
2298 + 'integration_url' => 'https://burst-statistics.com/',
2299 + 'integration_owner' => 'Burst Statistics BV',
2300 + 'integration_owner_pp' => 'https://burst-statistics.com/legal/privacy-statement-eu/',
2301 + 'desc' => 'The Burst Statistics MainWP Extension brings your privacy-friendly analytics into the MainWP dashboard. Monitor visitors, pageviews, and top content across all your child sites without leaving MainWP.',
2302 + ),
2303 + 'adsanity-for-mainwp' => array(
2304 + 'type' => 'org',
2305 + 'model' => 'integration',
2306 + 'product_id' => 'adsanity-for-mainwp',
2307 + 'slug' => 'adsanity-for-mainwp/adsanity-for-mainwp.php',
2308 + 'title' => 'AdSanity for MainWP',
2309 + 'link' => 'https://wordpress.org/plugins/adsanity-for-mainwp/',
2310 + 'changelog_url' => 'https://wordpress.org/plugins/adsanity-for-mainwp/#developers',
2311 + 'url' => 'https://wordpress.org/plugins/adsanity-for-mainwp/',
2312 + 'group' => array( 'visitor' ),
2313 + 'privacy' => 2,
2314 + 'integration' => 'AdSanity',
2315 + 'integration_url' => 'https://adsanityplugin.com/',
2316 + 'integration_owner' => 'Pixel Jar Corporation',
2317 + 'integration_owner_pp' => 'https://adsanityplugin.com/privacy-policy/',
2318 + 'desc' => 'See AdSanity ad performance across your whole MainWP fleet from one dashboard, and catch expiring ads before your advertisers do.',
2319 + ),
2320 + 'site-lockdown-security-for-mainwp' => array(
2321 + 'type' => 'org',
2322 + 'model' => 'integration',
2323 + 'product_id' => 'site-lockdown-security-for-mainwp',
2324 + 'slug' => 'site-lockdown-security-for-mainwp/mainwp-site-lockdown-security.php',
2325 + 'title' => 'Site Lockdown Security for MainWP',
2326 + 'link' => 'https://wordpress.org/plugins/site-lockdown-security-for-mainwp/',
2327 + 'changelog_url' => 'https://wordpress.org/plugins/site-lockdown-security-for-mainwp/#developers',
2328 + 'url' => 'https://wordpress.org/plugins/site-lockdown-security-for-mainwp/',
2329 + 'group' => array( 'security' ),
2330 + 'privacy' => 2,
2331 + 'integration' => 'Site Lockdown Security',
2332 + 'integration_url' => 'https://wordpress.org/plugins/folder-auditor/',
2333 + 'integration_owner' => 'WP Fix It LLC',
2334 + 'integration_owner_pp' => 'https://www.wpfixit.com/privacy-policy/',
2335 + 'desc' => 'Manage Site Lockdown Security across your MainWP child sites with fast lock-status visibility, bulk sync tools, and one-click lock actions.',
1753 2336 ),
1754 2337 );
1755 2338
1756 2339 $list = array();