PluginProbe
MainWP Dashboard: Self-hosted WordPress Management for Agencies / 5.2.2
MainWP Dashboard: Self-hosted WordPress Management for Agencies v5.2.2
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 5.2.2 5.3 All 153 releases
mainwp / class / class-mainwp-extensions-view.php

class-mainwp-extensions-view.php in MainWP Dashboard: Self-hosted WordPress Management for Agencies 5.2.2, at class/class-mainwp-extensions-view.php

1,798 lines 109.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * MainWP Extensions View
4 *
5 * Renders MainWP Extensions Page.
6 *
7 * @package MainWP/Dashboard
8 */
9
10 namespace MainWP\Dashboard;
11
12 /**
13 * Class MainWP_Extensions_View
14 *
15 * @package MainWP\Dashboard
16 */
17 class MainWP_Extensions_View { // phpcs:ignore Generic.Classes.OpeningBraceSameLine.ContentAfterBrace -- NOSONAR.
18 /**
19 * Get Class name.
20 *
21 * @return string __CLASS__.
22 */
23 public static function get_class_name() {
24 return __CLASS__;
25 }
26
27 /**
28 * Method init_menu()
29 *
30 * Add MainWP > Extensions Submenu
31 *
32 * @return $page
33 *
34 * @uses \MainWP\Dashboard\MainWP_Extensions::get_class_name()
35 */
36 public static function init_menu() {
37 return add_submenu_page(
38 'mainwp_tab',
39 __( 'Extensions', 'mainwp' ),
40 ' <span id="mainwp-Extensions">' . esc_html__( 'Extensions', 'mainwp' ) . '</span>',
41 'read',
42 'Extensions',
43 array(
44 MainWP_Extensions::get_class_name(),
45 'render',
46 )
47 );
48 }
49
50 /**
51 * Method render_header()
52 *
53 * Render page header.
54 *
55 * @param string $shownPage The page slug shown at this moment.
56 *
57 * @uses \MainWP\Dashboard\MainWP_UI::render_top_header()
58 * @uses \MainWP\Dashboard\MainWP_UI::render_page_navigation()
59 * @uses \MainWP\Dashboard\MainWP_Extensions_Handler::get_extensions()
60 */
61 public static function render_header( $shownPage = '' ) {
62 $page = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
63 if ( ! empty( $page ) && 'Extensions' === $_GET['page'] ) { // phpcs:ignore WordPress.Security.NonceVerification,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
64 $params = array(
65 'title' => esc_html__( 'Extensions', 'mainwp' ),
66 );
67 } else {
68 $extension_name_raw = $page;
69 $extension_name = str_replace( array( '-' ), ' ', $extension_name_raw );
70 $extension_name = MainWP_Extensions_Handler::polish_string_name( $extension_name );
71 $extension_name = apply_filters( 'mainwp_extensions_page_top_header', $extension_name, $extension_name_raw );
72 $params = array(
73 'title' => $extension_name,
74 );
75 }
76
77 MainWP_UI::render_top_header( $params );
78
79 $renderItems = array();
80 $renderItems[] = array(
81 'title' => esc_html__( 'Manage Extensions', 'mainwp' ),
82 'href' => 'admin.php?page=Extensions',
83 'active' => ( '' === $shownPage ) ? true : false,
84 );
85
86 // get extensions to generate manage site page header.
87 $extensions = MainWP_Extensions_Handler::get_extensions();
88 foreach ( $extensions as $extension ) {
89 if ( $extension['plugin'] === $shownPage ) {
90 $renderItems[] = array(
91 'title' => $extension['name'],
92 'href' => 'admin.php?page=' . $extension['page'],
93 'active' => true,
94 );
95 break;
96 }
97 }
98 MainWP_UI::render_page_navigation( $renderItems );
99 do_action( 'mainwp_extensions_top_header_after_tab', $shownPage );
100 }
101
102 /**
103 * Method render_footer()
104 *
105 * Render page footer.
106 */
107 public static function render_footer() {
108 echo '</div>';
109 }
110
111 /**
112 * Method render()
113 *
114 * Render the extensions page.
115 *
116 * @uses \MainWP\Dashboard\MainWP_Extensions_Handler::get_extensions()
117 * @uses \MainWP\Dashboard\MainWP_Extensions_Handler::added_on_menu()
118 * @uses \MainWP\Dashboard\MainWP_Utility::remove_http_prefix()
119 */
120 public static function render() { // phpcs:ignore -- NOSONAR -Current complexity is the only way to achieve desired results, pull request solutions appreciated.
121 $mainwp_api_key = false;
122 if ( get_option( 'mainwp_extensions_api_save_login' ) ) {
123 $mainwp_api_key = MainWP_Api_Manager_Key::instance()->get_decrypt_master_api_key();
124 }
125
126 if ( 1 === (int) get_option( 'mainwp_api_sslVerifyCertificate' ) ) {
127 update_option( 'mainwp_api_sslVerifyCertificate', 0 );
128 }
129
130 $all_available_extensions = static::get_available_extensions( 'all' );
131
132 $extensions_disabled = MainWP_Extensions_Handler::get_extensions_disabled();
133
134 $extensions = MainWP_Extensions_Handler::get_extensions();
135 $extension_update = get_site_transient( 'update_plugins' );
136 $is_demo = MainWP_Demo_Handle::is_demo_mode();
137 ?>
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">
145 <?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
154 }
155 ?>
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">
163 <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 </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>
169 </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 }
177
178 $extensions_data = isset( $all_available_extensions[ dirname( $extension['slug'] ) ] ) ? $all_available_extensions[ dirname( $extension['slug'] ) ] : array();
179
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 }
189
190 static::render_extension_card( $extension, $extension_update, $img_url );
191 ?>
192
193 <?php } ?>
194 <?php } ?>
195
196 <?php if ( is_array( $extensions_disabled ) ) { ?>
197 <?php foreach ( $extensions_disabled as $extension ) { ?>
198 <?php
199 $slug = dirname( $extension['slug'] );
200
201 if ( ! isset( $all_available_extensions[ $slug ] ) ) {
202 continue;
203 }
204
205 $extensions_data = $all_available_extensions[ $slug ];
206
207 if ( isset( $extensions_data['img'] ) && ! empty( $extensions_data['img'] ) ) {
208 $img_url = $extensions_data['img']; // icon from the available extensions in dashboard.
209 } elseif ( isset( $extension['icon'] ) && ! empty( $extension['icon'] ) ) {
210 $img_url = $extension['icon']; // icon from the get_this_extension().
211 } elseif ( isset( $extension['iconURI'] ) && '' !== $extension['iconURI'] ) {
212 $img_url = MainWP_Utility::remove_http_prefix( $extension['iconURI'] ); // icon from the extension header.
213 } else {
214 $img_url = MAINWP_PLUGIN_URL . 'assets/images/extensions/placeholder.png';
215 }
216
217 static::render_extension_card( $extension, $extension_update, $img_url, true );
218 ?>
219
220 <?php } ?>
221
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>
233 <div id="mainwp-extensions-privacy-info">
234 <?php $priv_extensions = static::get_available_extensions( 'all' ); ?>
235 <?php
236 foreach ( $priv_extensions as $priv_extension ) {
237 $item_slug = MainWP_Utility::get_dir_slug( $priv_extension['slug'] );
238 ?>
239 <?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
269 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'] ); ?>"
275 />
276 <?php } ?>
277 <?php } ?>
278 </div>
279 </div>
280
281 <div class="ui tiny second coupled modal" id="mainwp-privacy-info-modal">
282 <i class="close icon"></i>
283 <div class="header"></div>
284 <div class="content"></div>
285 </div>
286 <?php
287 }
288
289 /**
290 * Method render_incompatible_notice()
291 *
292 * Render Incompatability Notice.
293 */
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>
307 </div>
308 <p><?php esc_html_e( 'This process does not affect your extensions settings.', 'mainwp' ); ?></p>
309 </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>
332 </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' ); ?>
351 </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>
357 </div>
358 </div>
359 </div>
360 </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
388 }
389
390 /**
391 * Method render_extension_card()
392 *
393 * Render the MainWP Extension Cards.
394 *
395 * @param mixed $extension Extention to render.
396 * @param mixed $extension_update Extension update.
397 * @param mixed $img_url Extension image.
398 * @param mixed $disabled Disabled extension.
399 * @param bool $simple Simple info.
400 *
401 * @uses \MainWP\Dashboard\MainWP_Extensions_Handler::is_extension_activated()
402 * @uses \MainWP\Dashboard\MainWP_Extensions_Handler::polish_ext_name()
403 */
404 public static function render_extension_card( $extension, $extension_update, $img_url, $disabled = false, $simple = false ) { // phpcs:ignore -- NOSONAR -Current complexity is the only way to achieve desired results, pull request solutions appreciated.
405
406 if ( isset( $extension['href'] ) && ! empty( $extension['href'] ) ) {
407 $extension_page_url = $extension['href'];
408 } elseif ( isset( $extension['direct_page'] ) && ! empty( $extension['direct_page'] ) ) {
409 $extension_page_url = admin_url( 'admin.php?page=' . $extension['direct_page'] );
410 } elseif ( isset( $extension['callback'] ) ) {
411 $extension_page_url = admin_url( 'admin.php?page=' . $extension['page'] );
412 } else {
413 $extension_page_url = admin_url( 'admin.php?page=Extensions' );
414 }
415
416 $active = MainWP_Extensions_Handler::is_extension_activated( $extension['slug'] );
417 if ( empty( $extension['api_key'] ) ) {
418 $active = false;
419 }
420
421 if ( isset( $extension['apiManager'] ) && $extension['apiManager'] && ! isset( $extension['product_item_id'] ) ) {
422 $extension['product_item_id'] = 0;
423 }
424
425 $queue_status = '';
426 if ( ! $disabled && isset( $extension['apiManager'] ) && $extension['apiManager'] ) {
427 $queue_status = 'queue';
428 }
429
430 $all_available_extensions = static::get_available_extensions( 'all' );
431 $extensions_data = isset( $all_available_extensions[ dirname( $extension['slug'] ) ] ) ? $all_available_extensions[ dirname( $extension['slug'] ) ] : array();
432
433 $privacy_class = '';
434 $license_class = '';
435
436 if ( isset( $extensions_data['privacy'] ) ) {
437 if ( empty( $extensions_data['privacy'] ) ) {
438 $privacy_class = '<i class="green check icon"></i>';
439 } elseif ( 1 === (int) $extensions_data['privacy'] || 2 === (int) $extensions_data['privacy'] ) {
440 $privacy_class = '<i class="yellow info icon"></i>';
441 }
442 }
443
444 if ( $active ) {
445 $license_class = '<i class="green cog icon"></i>';
446 } else {
447 $license_class = '<i class="red cog icon"></i>';
448 }
449
450 $item_slug = MainWP_Utility::get_dir_slug( $extension['slug'] );
451
452 $new = '';
453
454 if ( isset( $extensions_data['release_date'] ) && ( time() - $extensions_data['release_date'] < MONTH_IN_SECONDS ) ) {
455 $new = '<span class="ui floating green mini label">NEW!</span>';
456 }
457
458 ?>
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'; ?>">
460 <?php
461 /**
462 * Action: mainwp_extension_card_top
463 *
464 * Fires at the Extension card top
465 *
466 * @since 4.1.4.1
467 *
468 * @param array $extension Array containing the Extension information.
469 */
470 do_action( 'mainwp_extension_card_top', $extension );
471 ?>
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">
475
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>
484
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>
488
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 } ?>
493 <?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>
496 <?php } ?>
497
498 <div class="description">
499 <?php echo esc_html( preg_replace( '/\<cite\>.*\<\/cite\>/', '', $extension['description'] ) ); ?>
500 </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 <?php } ?>
517 <div class="extra content action-feedback" style="display:none;">
518 <div class="ui mini message"></div>
519 </div>
520
521 <?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 } ?>
547 <?php } ?>
548 <?php
549 /**
550 * Action: mainwp_extension_card_bottom
551 *
552 * Fires at the Extension card bottom
553 *
554 * @since 4.1.4.1
555 *
556 * @param array $extension Array containing the Extension information.
557 */
558 do_action( 'mainwp_extension_card_bottom', $extension );
559 ?>
560 </div>
561 <?php
562 }
563
564 /**
565 * Method render_inactive_extension_card()
566 *
567 * Render the MainWP Extension Cards.
568 *
569 * @param mixed $extension Extention to render.
570 * @param mixed $img_url Extension image.
571 * @param bool $installed Extension installed.
572 */
573 public static function render_inactive_extension_card( $extension, $img_url, $installed = false ) {
574
575 if ( ! isset( $extension['link'] ) && isset( $extension['DocumentationURI'] ) ) {
576 $extension['link'] = $extension['DocumentationURI'];
577 }
578
579 if ( ! isset( $extension['version'] ) ) {
580 $extension['version'] = '';
581 }
582 ?>
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'] ); ?>">
584 <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 ); ?>">
586 <div class="header">
587 <?php echo esc_html( MainWP_Extensions_Handler::polish_ext_name( $extension, true ) ); ?>
588 </div>
589
590 <?php if ( $installed ) : ?>
591 <a href="admin.php?page=Extensions" class="ui black ribbon label"><?php echo esc_html__( 'Activate extension', 'mainwp' ); ?></a>
592 <?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>
594 <?php endif; ?>
595 <div class="description">
596 <?php echo esc_html( preg_replace( '/\<cite\>.*\<\/cite\>/', '', $extension['description'] ) ); ?>
597 </div>
598 </div>
599 </div>
600 <?php
601 }
602
603 /**
604 * Method render_purchase_notice()
605 *
606 * Render Purchase Notice.
607 */
608 public static function render_purchase_notice() {
609 $is_demo = MainWP_Demo_Handle::is_demo_mode();
610 $is_pro = MainWP_Hooks::is_pro_member();
611 ?>
612 <div id="mainwp-get-purchased-extensions-modal" class="ui first coupled large modal">
613 <i class="close icon"></i>
614 <div class="header"><?php esc_html_e( 'Install Extensions', 'mainwp' ); ?></div>
615 <div class="scrolling content"></div>
616 <div class="actions">
617 <div class="ui two columns stackable grid">
618 <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 } ?>
626 </div>
627 <div class="right aligned column">
628 <?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>
630 <?php endif; ?>
631 </div>
632 </div>
633 </div>
634 </div>
635 <?php
636 }
637
638 /**
639 * Render the Sidebar.
640 *
641 * @param string $mainwp_api_key MainWP.com api key.
642 */
643 public static function render_side_box( $mainwp_api_key ) {
644 $is_demo = MainWP_Demo_Handle::is_demo_mode();
645 ?>
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 echo esc_attr( '' ); ?>" value="<?php echo esc_attr( $mainwp_api_key ); ?>"/>
662 </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>
668 </div>
669 </div>
670 </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 <?php
683 $install_ext_slug = '';
684 if ( isset( $_GET['message'] ) && 0 === strpos( wp_unslash( $_GET['message'] ), 'install-ext-' ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
685 $install_ext_slug = str_replace( 'install-ext-', '', wp_unslash( $_GET['message'] ) ); //phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
686 ?>
687 <input type="hidden" id="extension_install_ext_slug" value="<?php echo esc_attr( $install_ext_slug ); ?>">
688 <?php
689 }
690 ?>
691 <script type="text/javascript">
692 jQuery( document ).ready( function ($) {
693 <?php
694 if ( ! empty( $install_ext_slug ) ) {
695 ?>
696 $('#mainwp-extensions-bulkinstall').trigger('click');
697 <?php
698 }
699 ?>
700 });
701 </script>
702 <?php
703 }
704
705 /**
706 * Metod get_extension_groups()
707 *
708 * Grab current MainWP Extension Groups.
709 *
710 * @return array $groups
711 */
712 public static function get_extension_groups() {
713 return array(
714 'admin' => esc_html__( 'Administrative', 'mainwp' ),
715 'agency' => esc_html__( 'Agency', 'mainwp' ),
716 'backup' => esc_html__( 'Backups', 'mainwp' ),
717 'client' => esc_html__( 'Client', 'mainwp' ),
718 'content' => esc_html__( 'Posts/Pages', 'mainwp' ),
719 'development' => esc_html__( 'Development', 'mainwp' ),
720 'monitoring' => esc_html__( 'Monitoring', 'mainwp' ),
721 'performance' => esc_html__( 'Performance', 'mainwp' ),
722 'security' => esc_html__( 'Security', 'mainwp' ),
723 'visitor' => esc_html__( 'Analytics', 'mainwp' ),
724 'updates' => esc_html__( 'Updates', 'mainwp' ),
725 );
726 }
727
728 /**
729 * Method get_available_extensions()
730 *
731 * Static Arrays of all Available Extensions.
732 *
733 * @param mixed $types Extensions type. Default: array( 'free', 'pro' ).
734 * @param array $ext_grouped Extensions grouped. Default: array().
735 *
736 * @devtodo Move to MainWP Server via an XML file.
737 */
738 public static function get_available_extensions( $types = array( 'free', 'pro' ), $ext_grouped = array() ) { //phpcs:ignore -- NOSONAR - complex.
739
740 $folder_url = MAINWP_PLUGIN_URL . 'assets/images/extensions/';
741 $all_exts = array(
742 'advanced-uptime-monitor-extension' =>
743 array(
744 'type' => 'free',
745 'slug' => 'advanced-uptime-monitor-extension',
746 'title' => 'MainWP Advanced Uptime Monitor',
747 'desc' => 'MainWP Extension for real-time up time monitoring.',
748 'link' => 'https://mainwp.com/extension/advanced-uptime-monitor/',
749 'changelog_url' => 'https://mainwp.com/changelog/mainwp-advanced-uptime-monitor-extension/',
750 'img' => $folder_url . 'advanced-uptime-monitor.png',
751 'product_id' => 'Advanced Uptime Monitor Extension',
752 'product_item_id' => 0,
753 'catalog_id' => '218',
754 'group' => array( 'monitoring' ),
755 'privacy' => 1, // 0 -standalone, 1 - API integration, 2 - 3rd party plugin integration
756 'integration' => 'Uptime Robot API',
757 'integration_url' => 'https://uptimerobot.com/',
758 'integration_owner' => 'Uptime Robot Service Provider Ltd.',
759 'integration_owner_pp' => 'https://uptimerobot.com/privacy/',
760 'integration_1' => 'Better Uptime API',
761 'integration_url_1' => 'https://betteruptime.com/',
762 'integration_owner_1' => 'Better Stack, Inc.',
763 'integration_owner_pp_1' => 'https://betterstack.com/privacy',
764 'integration_2' => 'NodePing API',
765 'integration_url_2' => 'https://nodeping.com/',
766 'integration_owner_2' => 'NodePing LLC',
767 'integration_owner_pp_2' => 'https://nodeping.com/privacy.html',
768 'integration_3' => 'Site24x7 API',
769 'integration_url_3' => 'https://www.site24x7.com/',
770 'integration_owner_3' => 'Zoho Corporation Pvt. Ltd.',
771 'integration_owner_pp_3' => 'https://www.zoho.com/privacy.html',
772 ),
773 'mainwp-article-uploader-extension' =>
774 array(
775 'type' => 'pro',
776 'slug' => 'mainwp-article-uploader-extension',
777 'title' => 'MainWP Article Uploader Extension',
778 '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/',
780 'changelog_url' => 'https://mainwp.com/changelog/mainwp-article-uploader-extension/',
781 'img' => $folder_url . 'article-uploader.png',
782 'product_id' => 'MainWP Article Uploader Extension',
783 'product_item_id' => 0,
784 'catalog_id' => '15340',
785 'group' => array( 'content' ),
786 'privacy' => 0,
787 'integration' => '',
788 'integration_url' => '',
789 'integration_owner' => '',
790 'integration_owner_pp' => '',
791 ),
792 'mainwp-atarim-extension' =>
793 array(
794 'type' => 'pro',
795 'slug' => 'mainwp-atarim-extension',
796 'title' => 'MainWP Atarim Extension',
797 'desc' => 'MainWP Atarim Extension allows you get your Atarim info about managed sites to your MainWP Dashboard.',
798 'link' => 'https://mainwp.com/extension/atarim/',
799 'changelog_url' => 'https://mainwp.com/changelog/mainwp-atarim-extension/',
800 'img' => $folder_url . 'atarim.png',
801 'product_id' => 'MainWP Atarim Extension',
802 'product_item_id' => 0,
803 'catalog_id' => '1251161',
804 'group' => array( 'development' ),
805 'privacy' => 1,
806 'integration' => 'Atarim API',
807 'integration_url' => 'https://atarim.io/',
808 'integration_owner' => 'WP FeedBack LTD',
809 'integration_owner_pp' => 'https://atarim.io/privacy-policy/',
810 ),
811 'mainwp-backwpup-extension' =>
812 array(
813 'type' => 'free',
814 'slug' => 'mainwp-backwpup-extension',
815 'title' => 'MainWP BackWPup Extension',
816 '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/',
818 'changelog_url' => 'https://mainwp.com/changelog/mainwp-backwpup-extension/',
819 'img' => $folder_url . 'backwpup.png',
820 'product_id' => 'MainWP BackWPup Extension',
821 'product_item_id' => 0,
822 'catalog_id' => '995008',
823 'group' => array( 'backup' ),
824 'privacy' => 2,
825 'integration' => 'BackWPup WordPress Backup Plugin',
826 'integration_url' => 'https://backwpup.com/',
827 'integration_owner' => 'Inpsyde GmbH',
828 'integration_owner_pp' => 'https://backwpup.com/privacy/',
829 ),
830 'boilerplate-extension' =>
831 array(
832 'type' => 'pro',
833 'slug' => 'boilerplate-extension',
834 'title' => 'MainWP Boilerplate Extension',
835 '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/',
837 'changelog_url' => 'https://mainwp.com/changelog/mainwp-boilerplate-extension/',
838 'img' => $folder_url . 'boilerplate.png',
839 'product_id' => 'Boilerplate Extension',
840 'product_item_id' => 0,
841 'catalog_id' => '1188',
842 'group' => array( 'content' ),
843 'privacy' => 0,
844 'integration' => '',
845 'integration_url' => '',
846 'integration_owner' => '',
847 'integration_owner_pp' => '',
848 ),
849 'mainwp-buddy-extension' =>
850 array(
851 'type' => 'free',
852 'slug' => 'mainwp-buddy-extension',
853 'title' => 'MainWP Buddy Extension',
854 '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/',
856 'changelog_url' => 'https://mainwp.com/changelog/mainwp-buddy-extension/',
857 'img' => $folder_url . 'mainwp-buddy.png',
858 'product_id' => 'MainWP Buddy Extension',
859 'product_item_id' => 0,
860 'catalog_id' => '1006044',
861 'group' => array( 'backup' ),
862 'privacy' => 2,
863 'integration' => 'BackupBuddy Plugin',
864 'integration_url' => 'https://ithemes.com/',
865 'integration_owner' => 'Liquid Web, LLC',
866 'integration_owner_pp' => 'https://www.liquidweb.com/about-us/policies/privacy-policy/',
867 ),
868 'mainwp-bulk-settings-manager' =>
869 array(
870 'type' => 'pro',
871 'slug' => 'mainwp-bulk-settings-manager',
872 'title' => 'MainWP Bulk Settings Manager',
873 '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/',
875 'changelog_url' => 'https://mainwp.com/changelog/mainwp-bulk-settings-manager-extension/',
876 'img' => $folder_url . 'bulk-settings-manager.png',
877 'product_id' => 'MainWP Bulk Settings Manager',
878 'product_item_id' => 0,
879 'catalog_id' => '347704',
880 'group' => array( 'development' ),
881 'privacy' => 0,
882 'integration' => '',
883 'integration_url' => '',
884 'integration_owner' => '',
885 'integration_owner_pp' => '',
886 ),
887 'mainwp-cache-control-extension' =>
888 array(
889 'type' => 'pro',
890 'slug' => 'mainwp-cache-control-extension',
891 'title' => 'MainWP Cache Control Extension',
892 '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/',
894 'changelog_url' => 'https://mainwp.com/changelog/mainwp-cache-control-extension/',
895 'img' => $folder_url . 'cache-control.png',
896 'product_id' => 'MainWP Cache Control Extension',
897 'product_item_id' => 0,
898 'catalog_id' => '1263050',
899 'group' => array( 'performance' ),
900 'privacy' => 1,
901 'integration' => 'Cloudflare API',
902 'integration_url' => 'https://www.cloudflare.com/',
903 'integration_owner' => 'Cloudflare, Inc.',
904 'integration_owner_pp' => 'https://www.cloudflare.com/privacypolicy/',
905 'release_date' => 1676847600,
906 ),
907 'mainwp-clone-extension' =>
908 array(
909 'type' => 'pro',
910 'slug' => 'mainwp-clone-extension',
911 'title' => 'MainWP Clone Extension',
912 '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/',
914 'changelog_url' => 'https://mainwp.com/changelog/mainwp-clone-extension/',
915 'img' => $folder_url . 'clone.png',
916 'product_id' => 'MainWP Clone Extension',
917 'product_item_id' => 0,
918 'catalog_id' => '1555',
919 'group' => array( 'development' ),
920 'privacy' => 0,
921 'integration' => '',
922 'integration_url' => '',
923 'integration_owner' => '',
924 'integration_owner_pp' => '',
925 ),
926 'mainwp-code-snippets-extension' =>
927 array(
928 'type' => 'pro',
929 'slug' => 'mainwp-code-snippets-extension',
930 'title' => 'MainWP Code Snippets Extension',
931 '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/',
933 'changelog_url' => 'https://mainwp.com/changelog/mainwp-code-snippets-extension/',
934 'img' => $folder_url . 'code-snippets.png',
935 'product_id' => 'MainWP Code Snippets Extension',
936 'product_item_id' => 0,
937 'catalog_id' => '11196',
938 'group' => array( 'development' ),
939 'privacy' => 0,
940 'integration' => '',
941 'integration_url' => '',
942 'integration_owner' => '',
943 'integration_owner_pp' => '',
944 ),
945 'mainwp-comments-extension' =>
946 array(
947 'type' => 'pro',
948 'slug' => 'mainwp-comments-extension',
949 'title' => 'MainWP Comments Extension',
950 '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/',
952 'changelog_url' => 'https://mainwp.com/changelog/mainwp-comments-extension/',
953 'img' => $folder_url . 'comments.png',
954 'product_id' => 'MainWP Comments Extension',
955 'product_item_id' => 0,
956 'catalog_id' => '1551',
957 'group' => array( 'admin' ),
958 'privacy' => 0,
959 'integration' => '',
960 'integration_url' => '',
961 'integration_owner' => '',
962 'integration_owner_pp' => '',
963 ),
964 'mainwp-custom-dashboard-extension' =>
965 array(
966 'type' => 'free',
967 'slug' => 'mainwp-custom-dashboard-extension',
968 'title' => 'MainWP Custom Dashboard Extension',
969 '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/',
971 'changelog_url' => 'https://mainwp.com/changelog/mainwp-custom-dashboard-extension/',
972 'img' => $folder_url . 'custom-dashboard.png',
973 'product_id' => 'MainWP Custom Dashboard Extension',
974 'product_item_id' => 0,
975 'catalog_id' => '1080528',
976 'group' => array( 'development' ),
977 'privacy' => 0,
978 'integration' => '',
979 'integration_url' => '',
980 'integration_owner' => '',
981 'integration_owner_pp' => '',
982 ),
983 'mainwp-custom-post-types' =>
984 array(
985 'type' => 'pro',
986 'slug' => 'mainwp-custom-post-types',
987 'title' => 'MainWP Custom Post Type',
988 '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/',
990 'changelog_url' => 'https://mainwp.com/changelog/mainwp-custom-post-types-extension/',
991 'img' => $folder_url . 'custom-post.png',
992 'product_id' => 'MainWP Custom Post Types',
993 'product_item_id' => 0,
994 'catalog_id' => '1002564',
995 'group' => array( 'development' ),
996 'privacy' => 0,
997 'integration' => '',
998 'integration_url' => '',
999 'integration_owner' => '',
1000 'integration_owner_pp' => '',
1001 ),
1002 'mainwp-clean-and-lock-extension' =>
1003 array(
1004 'type' => 'free',
1005 'slug' => 'mainwp-clean-and-lock-extension',
1006 'title' => 'MainWP Dashboard Lock Extension',
1007 '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/',
1009 'changelog_url' => 'https://mainwp.com/changelog/mainwp-dashboard-lock-extension/',
1010 'img' => $folder_url . 'clean-and-lock.png',
1011 'product_id' => 'MainWP Clean and Lock Extension',
1012 'product_item_id' => 0,
1013 'catalog_id' => '12907',
1014 'group' => array( 'security' ),
1015 'privacy' => 0,
1016 'integration' => '',
1017 'integration_url' => '',
1018 'integration_owner' => '',
1019 'integration_owner_pp' => '',
1020 ),
1021 'mainwp-database-updater-extension' =>
1022 array(
1023 'type' => 'pro',
1024 'slug' => 'mainwp-database-updater-extension',
1025 'title' => 'MainWP Database Updater Extension',
1026 '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/',
1028 'changelog_url' => 'https://mainwp.com/changelog/mainwp-database-updater-extension/',
1029 'img' => $folder_url . 'database-updater.png',
1030 'product_id' => 'MainWP Database Updater Extension',
1031 'product_item_id' => 0,
1032 'catalog_id' => '1263539',
1033 'group' => array( 'updates' ),
1034 'privacy' => 0,
1035 'integration' => '',
1036 'integration_url' => '',
1037 'integration_owner' => '',
1038 'integration_owner_pp' => '',
1039 'release_date' => 1677106800,
1040 ),
1041 'mainwp-domain-monitor-extension' =>
1042 array(
1043 'type' => 'pro',
1044 'slug' => 'mainwp-domain-monitor-extension',
1045 'title' => 'MainWP Domain Monitor Extension',
1046 '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/',
1048 'changelog_url' => 'https://mainwp.com/changelog/mainwp-domain-monitor-extension/',
1049 'img' => $folder_url . 'domain-monitor.png',
1050 'product_id' => 'MainWP Domain Monitor Extension',
1051 'product_item_id' => 0,
1052 'catalog_id' => '1240624',
1053 'group' => array( 'monitoring' ),
1054 'privacy' => 0,
1055 'integration' => '',
1056 'integration_url' => '',
1057 'integration_owner' => '',
1058 'integration_owner_pp' => '',
1059 ),
1060 'mainwp-favorites-extension' =>
1061 array(
1062 'type' => 'pro',
1063 'slug' => 'mainwp-favorites-extension',
1064 'title' => 'MainWP Favorites Extension',
1065 '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/',
1067 'changelog_url' => 'https://mainwp.com/changelog/mainwp-favorites-extension/',
1068 'img' => $folder_url . 'favorites.png',
1069 'product_id' => 'MainWP Favorites Extension',
1070 'product_item_id' => 0,
1071 'catalog_id' => '1379',
1072 'group' => array( 'development' ),
1073 'privacy' => 0,
1074 'integration' => '',
1075 'integration_url' => '',
1076 'integration_owner' => '',
1077 'integration_owner_pp' => '',
1078 ),
1079 'mainwp-fathom-extension' =>
1080 array(
1081 'type' => 'pro',
1082 'slug' => 'mainwp-fathom-extension',
1083 'title' => 'MainWP Fathom Extension',
1084 '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/',
1086 'changelog_url' => 'https://mainwp.com/changelog/mainwp-fathom-extension/',
1087 'img' => $folder_url . 'fathom.png',
1088 'product_id' => 'MainWP Fathom Extension',
1089 'product_item_id' => 0,
1090 'catalog_id' => '1274704',
1091 'group' => array( 'visitor' ),
1092 'privacy' => 1,
1093 'integration' => 'Fathom Analytics API',
1094 'integration_url' => 'https://usefathom.com/',
1095 'integration_owner' => 'Conva Ventures Inc.',
1096 'integration_owner_pp' => 'https://usefathom.com/privacy',
1097 ),
1098 'mainwp-file-uploader-extension' =>
1099 array(
1100 'type' => 'pro',
1101 'slug' => 'mainwp-file-uploader-extension',
1102 'title' => 'MainWP File Uploader Extension',
1103 '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/',
1105 'changelog_url' => 'https://mainwp.com/changelog/mainwp-file-uploader-extension/',
1106 'img' => $folder_url . 'file-uploader.png',
1107 'product_id' => 'MainWP File Uploader Extension',
1108 'product_item_id' => 0,
1109 'catalog_id' => '11637',
1110 'group' => array( 'development' ),
1111 'privacy' => 0,
1112 'integration' => '',
1113 'integration_url' => '',
1114 'integration_owner' => '',
1115 'integration_owner_pp' => '',
1116 ),
1117 'mainwp-google-analytics-extension' =>
1118 array(
1119 'type' => 'pro',
1120 'slug' => 'mainwp-google-analytics-extension',
1121 'title' => 'MainWP Google Analytics Extension',
1122 '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/',
1124 'changelog_url' => 'https://mainwp.com/changelog/mainwp-google-analytics-extension/',
1125 'img' => $folder_url . 'google-analytics.png',
1126 'product_id' => 'MainWP Google Analytics Extension',
1127 'product_item_id' => 0,
1128 'catalog_id' => '1554',
1129 'group' => array( 'visitor' ),
1130 'privacy' => 1,
1131 'integration' => 'Google Analytics API',
1132 'integration_url' => 'https://analytics.google.com',
1133 'integration_owner' => 'Google LLC',
1134 'integration_owner_pp' => 'https://policies.google.com/privacy',
1135 ),
1136 'mainwp-jetpack-protect-extension' =>
1137 array(
1138 'type' => 'free',
1139 'slug' => 'mainwp-jetpack-protect-extension',
1140 'title' => 'MainWP Jetpack Protect Extension',
1141 '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/',
1143 'changelog_url' => 'https://mainwp.com/changelog/mainwp-jetpack-protect-extension/',
1144 'img' => $folder_url . 'jetpack-protect.png',
1145 'product_id' => 'MainWP Jetpack Protect Extension',
1146 'product_item_id' => 0,
1147 'catalog_id' => '1263547',
1148 'group' => array( 'security' ),
1149 'privacy' => 2,
1150 'integration' => 'Jetpack Protect',
1151 'integration_url' => 'https://jetpack.com/',
1152 'integration_owner' => 'Automattic Inc.',
1153 'integration_owner_pp' => 'https://automattic.com/privacy/',
1154 'release_date' => 1677020400,
1155 ),
1156 'mainwp-jetpack-scan-extension' =>
1157 array(
1158 'type' => 'pro',
1159 'slug' => 'mainwp-jetpack-scan-extension',
1160 'title' => 'MainWP Jetpack Scan Extension',
1161 '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/',
1163 'changelog_url' => 'https://mainwp.com/changelog/mainwp-jetpack-scan-extension/',
1164 'img' => $folder_url . 'jetpack-scan.png',
1165 'product_id' => 'MainWP Jetpack Scan Extension',
1166 'product_item_id' => 0,
1167 'catalog_id' => '1263551',
1168 'group' => array( 'security' ),
1169 'privacy' => 1,
1170 'integration' => 'Jetpack Scan API',
1171 'integration_url' => 'https://jetpack.com/',
1172 'integration_owner' => 'Automattic Inc.',
1173 'integration_owner_pp' => 'https://automattic.com/privacy/',
1174 'release_date' => 1677020400,
1175 ),
1176 'mainwp-lighthouse-extension' =>
1177 array(
1178 'type' => 'pro',
1179 'slug' => 'mainwp-lighthouse-extension',
1180 'title' => 'MainWP Lighthouse Extension',
1181 '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/',
1183 'changelog_url' => 'https://mainwp.com/changelog/mainwp-lighthouse-extension/',
1184 'img' => $folder_url . 'lighthouse.png',
1185 'product_id' => 'MainWP Lighthouse Extension',
1186 'product_item_id' => 0,
1187 'catalog_id' => '1233934',
1188 'group' => array( 'monitoring' ),
1189 'privacy' => 1,
1190 'integration' => 'Google PageSpeed Insights API',
1191 'integration_url' => 'https://pagespeed.web.dev/',
1192 'integration_owner' => 'Google LLC',
1193 'integration_owner_pp' => 'https://policies.google.com/privacy',
1194 ),
1195 'mainwp-maintenance-extension' =>
1196 array(
1197 'type' => 'pro',
1198 'slug' => 'mainwp-maintenance-extension',
1199 'title' => 'MainWP Maintenance Extension',
1200 '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/',
1202 'changelog_url' => 'https://mainwp.com/changelog/mainwp-maintenance-extension/',
1203 'img' => $folder_url . 'maintenance.png',
1204 'product_id' => 'MainWP Maintenance Extension',
1205 'product_item_id' => 0,
1206 'catalog_id' => '1141',
1207 'group' => array( 'performance' ),
1208 'privacy' => 0,
1209 'integration' => '',
1210 'integration_url' => '',
1211 'integration_owner' => '',
1212 'integration_owner_pp' => '',
1213 ),
1214 'mainwp-piwik-extension' =>
1215 array(
1216 'type' => 'pro',
1217 'slug' => 'mainwp-piwik-extension',
1218 'title' => 'MainWP Piwik Extension',
1219 '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/',
1221 'changelog_url' => 'https://mainwp.com/changelog/mainwp-matomo-extension/',
1222 'img' => $folder_url . 'piwik.png',
1223 'product_id' => 'MainWP Piwik Extension',
1224 'product_item_id' => 0,
1225 'catalog_id' => '10523',
1226 'group' => array( 'visitor' ),
1227 'privacy' => 1,
1228 'integration' => 'Matomo API',
1229 'integration_url' => 'https://matomo.org/',
1230 'integration_owner' => 'InnoCraft',
1231 'integration_owner_pp' => 'https://matomo.org/privacy-policy/',
1232 ),
1233 'mainwp-post-dripper-extension' =>
1234 array(
1235 'type' => 'pro',
1236 'slug' => 'mainwp-post-dripper-extension',
1237 'title' => 'MainWP Post Dripper Extension',
1238 '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/',
1240 'changelog_url' => 'https://mainwp.com/changelog/mainwp-post-dripper-extension/',
1241 'img' => $folder_url . 'post-dripper.png',
1242 'product_id' => 'MainWP Post Dripper Extension',
1243 'product_item_id' => 0,
1244 'catalog_id' => '11756',
1245 'group' => array( 'content' ),
1246 'privacy' => 0,
1247 'integration' => '',
1248 'integration_url' => '',
1249 'integration_owner' => '',
1250 'integration_owner_pp' => '',
1251 ),
1252 'mainwp-post-plus-extension' =>
1253 array(
1254 'type' => 'pro',
1255 'slug' => 'mainwp-post-plus-extension',
1256 'title' => 'MainWP Post Plus Extension',
1257 '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/',
1259 'changelog_url' => 'https://mainwp.com/changelog/mainwp-post-plus-extension/',
1260 'img' => $folder_url . 'post-plus.png',
1261 'product_id' => 'MainWP Post Plus Extension',
1262 'product_item_id' => 0,
1263 'catalog_id' => '12458',
1264 'group' => array( 'content' ),
1265 'privacy' => 0,
1266 'integration' => '',
1267 'integration_url' => '',
1268 'integration_owner' => '',
1269 'integration_owner_pp' => '',
1270 ),
1271 'mainwp-pressable-extension' =>
1272 array(
1273 'type' => 'pro',
1274 'slug' => 'mainwp-pressable-extension',
1275 'title' => 'MainWP Pressable Extension',
1276 '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/',
1278 'changelog_url' => 'https://mainwp.com/changelog/mainwp-pressable-extension/',
1279 'img' => $folder_url . 'pressable.png',
1280 'product_id' => 'MainWP Pressable Extension',
1281 'product_item_id' => 0,
1282 'catalog_id' => '1271427',
1283 'group' => array( 'development' ),
1284 'privacy' => 1,
1285 'integration' => 'Pressable API',
1286 'integration_url' => 'https://pressable.com/',
1287 'integration_owner' => 'Pressable, Inc.',
1288 'integration_owner_pp' => 'https://automattic.com/privacy/',
1289 ),
1290 'mainwp-pro-reports-extension' =>
1291 array(
1292 'type' => 'pro',
1293 'slug' => 'mainwp-pro-reports-extension',
1294 'title' => 'MainWP Pro Reports Extension',
1295 '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/',
1297 'changelog_url' => 'https://mainwp.com/changelog/mainwp-pro-reports-extension/',
1298 'img' => $folder_url . 'pro-reports.png',
1299 'product_id' => 'MainWP Pro Reports Extension',
1300 'product_item_id' => 0,
1301 'catalog_id' => '1133708',
1302 'group' => array( 'client' ),
1303 'privacy' => 0,
1304 'integration' => '',
1305 'integration_url' => '',
1306 'integration_owner' => '',
1307 'integration_owner_pp' => '',
1308 ),
1309 'mainwp-rocket-extension' =>
1310 array(
1311 'type' => 'pro',
1312 'slug' => 'mainwp-rocket-extension',
1313 'title' => 'MainWP Rocket Extension',
1314 '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/',
1316 'changelog_url' => 'https://mainwp.com/changelog/mainwp-rocket-extension/',
1317 'img' => $folder_url . 'rocket.png',
1318 'product_id' => 'MainWP Rocket Extension',
1319 'product_item_id' => 0,
1320 'catalog_id' => '335257',
1321 'group' => array( 'performance' ),
1322 'privacy' => 2,
1323 'integration' => 'WP Rocket Plugin',
1324 'integration_url' => 'https://wp-rocket.me/',
1325 'integration_owner' => 'WP Media, Inc.',
1326 'integration_owner_pp' => 'https://wp-rocket.me/privacy-policy/',
1327 ),
1328 'mainwp-sucuri-extension' =>
1329 array(
1330 'type' => 'free',
1331 'slug' => 'mainwp-sucuri-extension',
1332 'title' => 'MainWP Sucuri Extension',
1333 '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/',
1335 'changelog_url' => 'https://mainwp.com/changelog/mainwp-sucuri-extension/',
1336 'img' => $folder_url . 'sucuri.png',
1337 'product_id' => 'MainWP Sucuri Extension',
1338 'product_item_id' => 0,
1339 'catalog_id' => '10777',
1340 'group' => array( 'security' ),
1341 'privacy' => 1,
1342 'integration' => 'Sucuri API',
1343 'integration_url' => 'https://sucuri.net/',
1344 'integration_owner' => 'GoDaddy Mediatemple, Inc., d/b/a Sucuri.',
1345 'integration_owner_pp' => 'https://sucuri.net/privacy/',
1346 ),
1347 'mainwp-ithemes-security-extension' =>
1348 array(
1349 'type' => 'pro',
1350 '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/',
1354 'changelog_url' => 'https://mainwp.com/changelog/mainwp-ithemes-security-extension/',
1355 'img' => $folder_url . 'ithemes.png',
1356 'product_id' => 'MainWP Security Extension',
1357 'product_item_id' => 0,
1358 'catalog_id' => '113355',
1359 'group' => array( 'security' ),
1360 'privacy' => 2,
1361 'integration' => 'iThemes Security Plugin',
1362 'integration_url' => 'https://ithemes.com/',
1363 'integration_owner' => 'Liquid Web, LLC',
1364 'integration_owner_pp' => 'https://www.liquidweb.com/about-us/policies/privacy-policy/',
1365 ),
1366 'mainwp-ssl-monitor-extension' =>
1367 array(
1368 'type' => 'pro',
1369 'slug' => 'mainwp-ssl-monitor-extension',
1370 'title' => 'MainWP SSL Monitor Extension',
1371 '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/',
1373 'changelog_url' => 'https://mainwp.com/changelog/mainwp-ssl-monitor-extension/',
1374 'img' => $folder_url . 'ssl-monitor.png',
1375 'product_id' => 'MainWP SSL Monitor Extension',
1376 'product_item_id' => 0,
1377 'catalog_id' => '1263543',
1378 'group' => array( 'monitoring' ),
1379 'privacy' => 0,
1380 'integration' => '',
1381 'integration_url' => '',
1382 'integration_owner' => '',
1383 'integration_owner_pp' => '',
1384 'release_date' => 1676934000,
1385 ),
1386 'mainwp-staging-extension' =>
1387 array(
1388 'type' => 'pro',
1389 'slug' => 'mainwp-staging-extension',
1390 'title' => 'MainWP Staging Extension',
1391 '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/',
1393 'changelog_url' => 'https://mainwp.com/changelog/mainwp-staging-extension/',
1394 'img' => $folder_url . 'staging.png',
1395 'product_id' => 'MainWP Staging Extension',
1396 'product_item_id' => 0,
1397 'catalog_id' => '1034878',
1398 'group' => array( 'development' ),
1399 'privacy' => 2,
1400 'integration' => 'WP STAGING Backup Duplicator & Migration Plugin',
1401 'integration_url' => 'https://wp-staging.com/',
1402 'integration_owner' => 'WP STAGING',
1403 'integration_owner_pp' => 'https://wp-staging.com/privacy-policy/',
1404 ),
1405 'mainwp-team-control' =>
1406 array(
1407 'type' => 'pro',
1408 'slug' => 'mainwp-team-control',
1409 'title' => 'MainWP Team Control',
1410 '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/',
1412 'changelog_url' => 'https://mainwp.com/changelog/mainwp-team-control-extension/',
1413 'img' => $folder_url . 'team-control.png',
1414 'product_id' => 'MainWP Team Control',
1415 'product_item_id' => 0,
1416 'catalog_id' => '23936',
1417 'group' => array( 'agency' ),
1418 'privacy' => 0,
1419 'integration' => '',
1420 'integration_url' => '',
1421 'integration_owner' => '',
1422 'integration_owner_pp' => '',
1423 ),
1424 'termageddon-for-mainwp' =>
1425 array(
1426 'type' => 'free',
1427 'slug' => 'termageddon-for-mainwp',
1428 'title' => 'Termageddon for MainWP',
1429 '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/',
1431 'changelog_url' => 'https://mainwp.com/changelog/termageddon-for-mainwp/',
1432 'img' => $folder_url . 'termageddon.png',
1433 'product_id' => 'Termageddon for MainWP',
1434 'product_item_id' => 0,
1435 'catalog_id' => '1200201',
1436 'group' => array( 'content' ),
1437 'privacy' => 1,
1438 'integration' => 'Termageddon API',
1439 'integration_url' => 'https://termageddon.com/',
1440 'integration_owner' => 'Termageddon, LLC',
1441 'integration_owner_pp' => 'https://termageddon.com/privacy-policy/',
1442 'release_date' => 1678921200,
1443 ),
1444 'mainwp-timecapsule-extension' =>
1445 array(
1446 'type' => 'free',
1447 'slug' => 'mainwp-timecapsule-extension',
1448 'title' => 'MainWP Time Capsule Extension',
1449 '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/',
1451 'changelog_url' => 'https://mainwp.com/changelog/mainwp-time-capsule-extension/',
1452 'img' => $folder_url . 'time-capsule.png',
1453 'product_id' => 'MainWP Time Capsule Extension',
1454 'product_item_id' => 0,
1455 'catalog_id' => '1049003',
1456 'group' => array( 'backup' ),
1457 'privacy' => 2,
1458 'integration' => 'Backup and Staging by WP Time Capsule',
1459 'integration_url' => 'https://wptimecapsule.com/',
1460 'integration_owner' => 'Revmakx, LLC.',
1461 'integration_owner_pp' => 'https://wptimecapsule.com/privacy-policy/',
1462 ),
1463 'mainwp-time-tracker-extension' =>
1464 array(
1465 'type' => 'pro',
1466 'slug' => 'mainwp-time-tracker-extension',
1467 'title' => 'MainWP Time Tracker Extension',
1468 '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/',
1470 'changelog_url' => 'https://mainwp.com/changelog/mainwp-time-tracker-extension/',
1471 'img' => $folder_url . 'time-tracker.png',
1472 'product_id' => 'MainWP Time Tracker Extension',
1473 'product_item_id' => 0,
1474 'catalog_id' => '1284683',
1475 'group' => array( 'client' ),
1476 'privacy' => 0,
1477 'integration' => '',
1478 'integration_url' => '',
1479 'integration_owner' => '',
1480 'integration_owner_pp' => '',
1481 ),
1482 'mainwp-cost-tracker-assistant-extension' =>
1483 array(
1484 'type' => 'pro',
1485 'slug' => 'mainwp-cost-tracker-assistant-extension',
1486 'title' => 'MainWP Cost Tracker Assistant Extension',
1487 '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/',
1489 'changelog_url' => 'https://mainwp.com/changelog/mainwp-cost-tracker-assistant-extension/',
1490 'img' => $folder_url . 'cost-tracker-assistant.png',
1491 'product_id' => 'MainWP Cost Tracker Assistant Extension',
1492 'product_item_id' => 0,
1493 'catalog_id' => '1284687',
1494 'group' => array( 'admin' ),
1495 'privacy' => 0,
1496 'integration' => '',
1497 'integration_url' => '',
1498 'integration_owner' => '',
1499 'integration_owner_pp' => '',
1500 ),
1501 'mainwp-updraftplus-extension' =>
1502 array(
1503 'type' => 'free',
1504 'slug' => 'mainwp-updraftplus-extension',
1505 'title' => 'MainWP UpdraftPlus Extension',
1506 '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/',
1508 'changelog_url' => 'https://mainwp.com/changelog/mainwp-updraftplus-extension/',
1509 'img' => $folder_url . 'updraftplus.png',
1510 'product_id' => 'MainWP UpdraftPlus Extension',
1511 'product_item_id' => 0,
1512 'catalog_id' => '165843',
1513 'group' => array( 'backup' ),
1514 'privacy' => 2,
1515 'integration' => 'UpdraftPlus WordPress Backup Plugin',
1516 'integration_url' => 'https://updraftplus.com/',
1517 'integration_owner' => 'Updraft WP Software Ltd.',
1518 'integration_owner_pp' => 'https://updraftplus.com/data-protection-and-privacy-centre/',
1519 ),
1520 'mainwp-url-extractor-extension' =>
1521 array(
1522 'type' => 'pro',
1523 'slug' => 'mainwp-url-extractor-extension',
1524 'title' => 'MainWP URL Extractor Extension',
1525 '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/',
1527 'changelog_url' => 'https://mainwp.com/changelog/mainwp-url-extractor-extension/',
1528 'img' => $folder_url . 'url-extractor.png',
1529 'product_id' => 'MainWP Url Extractor Extension',
1530 'product_item_id' => 0,
1531 'catalog_id' => '11965',
1532 'group' => array( 'development' ),
1533 'privacy' => 0,
1534 'integration' => '',
1535 'integration_url' => '',
1536 'integration_owner' => '',
1537 'integration_owner_pp' => '',
1538 ),
1539 'mainwp-virusdie-extension' =>
1540 array(
1541 'type' => 'pro',
1542 'slug' => 'mainwp-virusdie-extension',
1543 'title' => 'MainWP Virusdie Extension',
1544 '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/',
1546 'changelog_url' => 'https://mainwp.com/changelog/mainwp-virusdie-extension/',
1547 'img' => $folder_url . 'virusdie.png',
1548 'product_id' => 'MainWP Virusdie Extension',
1549 'product_item_id' => 0,
1550 'catalog_id' => '1213235',
1551 'group' => array( 'security' ),
1552 'privacy' => 1,
1553 'integration' => 'Virusdie API',
1554 'integration_url' => 'https://virusdie.com/',
1555 'integration_owner' => 'Virusdie OU',
1556 'integration_owner_pp' => 'https://virusdie.com/rules/privacypolicy/',
1557 ),
1558 'mainwp-vulnerability-checker-extension' =>
1559 array(
1560 'type' => 'pro',
1561 'slug' => 'mainwp-vulnerability-checker-extension',
1562 'title' => 'MainWP Vulnerability Checker Extension',
1563 '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/',
1565 'changelog_url' => 'https://mainwp.com/changelog/mainwp-vulnerability-checker-extension/',
1566 'img' => $folder_url . 'vulnerability-checker.png',
1567 'product_id' => 'MainWP Vulnerability Checker Extension',
1568 'product_item_id' => 0,
1569 'catalog_id' => '12458',
1570 'group' => array( 'security' ),
1571 'privacy' => 1,
1572 'integration' => 'WPScan API',
1573 'integration_url' => 'https://wpscan.com/',
1574 'integration_owner' => 'Automattic Inc.',
1575 'integration_owner_pp' => 'https://automattic.com/privacy/',
1576 'integration_1' => 'NVD NIST API',
1577 'integration_url_1' => 'https://nvd.nist.gov/',
1578 'integration_owner_1' => 'National Institute of Standards and Technology',
1579 'integration_owner_pp_1' => 'https://www.nist.gov/privacy-policy',
1580 ),
1581 'mainwp-branding-extension' =>
1582 array(
1583 'type' => 'pro',
1584 'slug' => 'mainwp-branding-extension',
1585 'title' => 'MainWP White Label Extension',
1586 '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/',
1588 'changelog_url' => 'https://mainwp.com/changelog/mainwp-white-label-extension/',
1589 'img' => $folder_url . 'branding.png',
1590 'product_id' => 'MainWP Branding Extension',
1591 'product_item_id' => 0,
1592 'catalog_id' => '10679',
1593 'group' => array( 'agency' ),
1594 'privacy' => 0,
1595 'integration' => '',
1596 'integration_url' => '',
1597 'integration_owner' => '',
1598 'integration_owner_pp' => '',
1599 ),
1600 'mainwp-woocommerce-shortcuts-extension' =>
1601 array(
1602 'type' => 'free',
1603 'slug' => 'mainwp-woocommerce-shortcuts-extension',
1604 'title' => 'MainWP WooCommerce Shortcuts Extension',
1605 '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/',
1607 'changelog_url' => 'https://mainwp.com/changelog/mainwp-woocommerce-shortcuts-extension/',
1608 'img' => $folder_url . 'woo-shortcuts.png',
1609 'product_id' => 'MainWP WooCommerce Shortcuts Extension',
1610 'product_item_id' => 0,
1611 'catalog_id' => '12706',
1612 'group' => array( 'admin' ),
1613 'privacy' => 2,
1614 'integration' => 'WooCommerce Plugin',
1615 'integration_url' => 'https://woocommerce.com',
1616 'integration_owner' => 'Automattic Inc.',
1617 'integration_owner_pp' => 'https://automattic.com/privacy/',
1618 ),
1619 'mainwp-woocommerce-status-extension' =>
1620 array(
1621 'type' => 'pro',
1622 'slug' => 'mainwp-woocommerce-status-extension',
1623 'title' => 'MainWP WooCommerce Status Extension',
1624 '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/',
1626 'changelog_url' => 'https://mainwp.com/changelog/mainwp-woocommerce-status-extension/',
1627 'img' => $folder_url . 'woo-status.png',
1628 'product_id' => 'MainWP WooCommerce Status Extension',
1629 'product_item_id' => 0,
1630 'catalog_id' => '12671',
1631 'group' => array( 'admin' ),
1632 'privacy' => 2,
1633 'integration' => 'WooCommerce Plugin',
1634 'integration_url' => 'https://woocommerce.com',
1635 'integration_owner' => 'Automattic Inc.',
1636 'integration_owner_pp' => 'https://automattic.com/privacy/',
1637 ),
1638 'mainwp-wordfence-extension' =>
1639 array(
1640 'type' => 'pro',
1641 'slug' => 'mainwp-wordfence-extension',
1642 'title' => 'MainWP WordFence Extension',
1643 '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/',
1645 'changelog_url' => 'https://mainwp.com/changelog/mainwp-wordfence-extension/',
1646 'img' => $folder_url . 'wordfence.png',
1647 'product_id' => 'MainWP Wordfence Extension',
1648 'product_item_id' => 0,
1649 'catalog_id' => '19678',
1650 'group' => array( 'security' ),
1651 'privacy' => 2,
1652 'integration' => 'Wordfence Security � Firewall & Malware Scan Plugin',
1653 'integration_url' => 'https://www.wordfence.com/',
1654 'integration_owner' => 'Defiant, Inc.',
1655 'integration_owner_pp' => 'https://www.wordfence.com/privacy-policy/',
1656 ),
1657 'wordpress-seo-extension' =>
1658 array(
1659 'type' => 'pro',
1660 '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/',
1664 'changelog_url' => 'https://mainwp.com/changelog/mainwp-wordpress-seo-extension/',
1665 'img' => $folder_url . 'wordpress-seo.png',
1666 'product_id' => 'MainWP WordPress SEO Extension',
1667 'product_item_id' => 0,
1668 'catalog_id' => '12080',
1669 'group' => array( 'content' ),
1670 'privacy' => 2,
1671 'integration' => 'Yoast SEO Plugin',
1672 'integration_url' => 'https://yoast.com/',
1673 'integration_owner' => 'Newfold Capital Inc.',
1674 'integration_owner_pp' => 'https://yoast.com/privacy-policy/',
1675 ),
1676 'activity-log-mainwp' => array(
1677 'type' => 'org',
1678 'product_id' => 'activity-log-mainwp',
1679 'slug' => 'activity-log-mainwp/activity-log-mainwp.php',
1680 '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/',
1684 'group' => array( 'security' ),
1685 'privacy' => 2,
1686 'integration' => 'WP Activity Log',
1687 'integration_url' => 'https://wpactivitylog.com/',
1688 'integration_owner' => 'WP White Security',
1689 'integration_owner_pp' => 'https://www.wpwhitesecurity.com/privacy-policy/',
1690 '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 ),
1692 'security-ninja-for-mainwp' => array(
1693 'type' => 'org',
1694 'product_id' => 'security-ninja-for-mainwp',
1695 'slug' => 'security-ninja-for-mainwp/security-ninja-mainwp.php',
1696 'title' => 'Security Ninja For MainWP',
1697 'link' => 'https://wordpress.org/plugins/security-ninja-for-mainwp/',
1698 'changelog_url' => 'https://wordpress.org/plugins/security-ninja-for-mainwp/#developers',
1699 'url' => 'https://wordpress.org/plugins/security-ninja-for-mainwp/',
1700 'group' => array( 'security' ),
1701 'privacy' => 2,
1702 'integration' => 'Security Ninja',
1703 'integration_url' => 'https://wpsecurityninja.com/',
1704 'integration_owner' => 'Larsik Corp',
1705 'integration_owner_pp' => 'https://larsik.com/privacy/',
1706 'desc' => 'Security Ninja is a strong plugin that helps you find vulnerabilites and improve the security on your website.',
1707 ),
1708 'wp-compress-mainwp' => array(
1709 'type' => 'org',
1710 'product_id' => 'wp-compress-mainwp',
1711 'slug' => 'wp-compress-mainwp/wp-compress-main-wp.php',
1712 'title' => 'WP Compress for MainWP',
1713 'link' => 'https://wordpress.org/plugins/wp-compress-mainwp/',
1714 'changelog_url' => 'https://wordpress.org/plugins/wp-compress-mainwp/#developers',
1715 'url' => 'https://wordpress.org/plugins/wp-compress-mainwp/',
1716 'group' => array( 'performance' ),
1717 'privacy' => 2,
1718 'integration' => 'WP Compress',
1719 'integration_url' => 'https://wpcompress.com/',
1720 'integration_owner' => 'WP Compress',
1721 'integration_owner_pp' => 'https://wpcompress.com/privacy-policy/',
1722 ),
1723 'seopress-for-mainwp' => array(
1724 'type' => 'org',
1725 'product_id' => 'seopress-for-mainwp',
1726 'slug' => 'seopress-for-mainwp/seopress-for-mainwp.php',
1727 'title' => 'SEOPress for MainWP',
1728 'link' => 'https://wordpress.org/plugins/seopress-for-mainwp/',
1729 'changelog_url' => 'https://wordpress.org/plugins/seopress-for-mainwp/#developers',
1730 'url' => 'https://wordpress.org/plugins/seopress-for-mainwp/',
1731 'group' => array( 'content' ),
1732 'privacy' => 2,
1733 'integration' => 'SEOPress',
1734 'integration_url' => 'https://www.seopress.org/',
1735 'integration_owner' => 'SEOPRESS',
1736 'integration_owner_pp' => 'https://www.seopress.org/privacy-policy/',
1737 ),
1738 'wpvivid-backup-mainwp' => array(
1739 'type' => 'org',
1740 'product_id' => 'wpvivid-backup-mainwp',
1741 'slug' => 'wpvivid-backup-mainwp/wpvivid-backup-mainwp.php',
1742 'title' => 'WPvivid Backup for MainWP',
1743 'link' => 'https://wordpress.org/plugins/wpvivid-backup-mainwp/',
1744 'changelog_url' => 'https://wordpress.org/plugins/wpvivid-backup-mainwp/#developers',
1745 'url' => 'https://wordpress.org/plugins/wpvivid-backup-mainwp/',
1746 'group' => array( 'backup' ),
1747 'privacy' => 2,
1748 'integration' => 'WPvivid Backup',
1749 'integration_url' => 'https://wpvivid.com/',
1750 'integration_owner' => 'VPSrobots Inc.',
1751 'integration_owner_pp' => 'https://wpvivid.com/privacy-policy',
1752 '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.',
1753 ),
1754 );
1755
1756 $list = array();
1757
1758 if ( is_string( $types ) ) {
1759 if ( 'all' === $types ) {
1760 return $all_exts;
1761 } elseif ( in_array( $types, array( 'free', 'pro', 'org' ) ) ) {
1762 $list = array();
1763 foreach ( $all_exts as $slug => $ext ) {
1764 if ( $ext['type'] === $types ) {
1765
1766 $list[ $slug ] = $ext;
1767
1768 }
1769 }
1770 return $list;
1771
1772 }
1773 }
1774
1775 if ( is_array( $types ) ) {
1776 $list = array();
1777 foreach ( $all_exts as $slug => $ext ) {
1778 if ( in_array( $ext['type'], $types ) ) {
1779 $list[ $slug ] = $ext;
1780 }
1781 }
1782 }
1783
1784 if ( is_array( $ext_grouped ) && ! empty( $ext_grouped ) ) {
1785 $list = array();
1786 foreach ( $all_exts as $slug => $ext ) {
1787 foreach ( $ext_grouped as $group ) {
1788 if ( in_array( $group, $ext['group'] ) ) {
1789 $list[ $slug ] = $ext;
1790 }
1791 }
1792 }
1793 }
1794
1795 return $list;
1796 }
1797 }
1798