PluginProbe
MainWP Dashboard: Self-hosted WordPress Management for Agencies / 5.0.3
MainWP Dashboard: Self-hosted WordPress Management for Agencies v5.0.3
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.0.3, at class/class-mainwp-extensions-view.php

1,761 lines 85.6 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 {
18
19 /**
20 * Get Class name.
21 *
22 * @return string __CLASS__.
23 */
24 public static function get_class_name() {
25 return __CLASS__;
26 }
27
28 /**
29 * Method init_menu()
30 *
31 * Add MainWP > Extensions Submenu
32 *
33 * @return $page
34 *
35 * @uses \MainWP\Dashboard\MainWP_Extensions::get_class_name()
36 */
37 public static function init_menu() {
38 $page = add_submenu_page(
39 'mainwp_tab',
40 __( 'Extensions', 'mainwp' ),
41 ' <span id="mainwp-Extensions">' . esc_html__( 'Extensions', 'mainwp' ) . '</span>',
42 'read',
43 'Extensions',
44 array(
45 MainWP_Extensions::get_class_name(),
46 'render',
47 )
48 );
49
50 return $page;
51 }
52
53 /**
54 * Method render_header()
55 *
56 * Render page header.
57 *
58 * @param string $shownPage The page slug shown at this moment.
59 *
60 * @uses \MainWP\Dashboard\MainWP_UI::render_top_header()
61 * @uses \MainWP\Dashboard\MainWP_UI::render_page_navigation()
62 * @uses \MainWP\Dashboard\MainWP_Extensions_Handler::get_extensions()
63 */
64 public static function render_header( $shownPage = '' ) {
65 $page = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
66 if ( ! empty( $page ) && 'Extensions' === $_GET['page'] ) { // phpcs:ignore WordPress.Security.NonceVerification,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
67 $params = array(
68 'title' => esc_html__( 'Extensions', 'mainwp' ),
69 );
70 } else {
71 $extension_name_raw = $page;
72 $extension_name = str_replace( array( '-' ), ' ', $extension_name_raw );
73 $extension_name = MainWP_Extensions_Handler::polish_string_name( $extension_name );
74 $extension_name = apply_filters( 'mainwp_extensions_page_top_header', $extension_name, $extension_name_raw );
75 $params = array(
76 'title' => $extension_name,
77 );
78 }
79
80 MainWP_UI::render_top_header( $params );
81
82 $renderItems = array();
83 $renderItems[] = array(
84 'title' => esc_html__( 'Manage Extensions', 'mainwp' ),
85 'href' => 'admin.php?page=Extensions',
86 'active' => ( '' === $shownPage ) ? true : false,
87 );
88
89 // get extensions to generate manage site page header.
90 $extensions = MainWP_Extensions_Handler::get_extensions();
91 foreach ( $extensions as $extension ) {
92 if ( $extension['plugin'] === $shownPage ) {
93 $renderItems[] = array(
94 'title' => $extension['name'],
95 'href' => 'admin.php?page=' . $extension['page'],
96 'active' => true,
97 );
98 break;
99 }
100 }
101 MainWP_UI::render_page_navigation( $renderItems );
102 do_action( 'mainwp_extensions_top_header_after_tab', $shownPage );
103 }
104
105 /**
106 * Method render_footer()
107 *
108 * Render page footer.
109 */
110 public static function render_footer() {
111 echo '</div>';
112 }
113
114 /**
115 * Method render()
116 *
117 * Render the extensions page.
118 *
119 * @uses \MainWP\Dashboard\MainWP_Extensions_Handler::get_extensions()
120 * @uses \MainWP\Dashboard\MainWP_Extensions_Handler::added_on_menu()
121 * @uses \MainWP\Dashboard\MainWP_Utility::remove_http_prefix()
122 */
123 public static function render() { // phpcs:ignore -- Current complexity is the only way to achieve desired results, pull request solutions appreciated.
124 $mainwp_api_key = false;
125 if ( get_option( 'mainwp_extensions_api_save_login' ) ) {
126 $mainwp_api_key = MainWP_Api_Manager_Key::instance()->get_decrypt_master_api_key();
127 }
128
129 if ( 1 === (int) get_option( 'mainwp_api_sslVerifyCertificate' ) ) {
130 update_option( 'mainwp_api_sslVerifyCertificate', 0 );
131 }
132
133 $all_available_extensions = self::get_available_extensions( 'all' );
134
135 $extensions_disabled = MainWP_Extensions_Handler::get_extensions_disabled();
136
137 $extensions = MainWP_Extensions_Handler::get_extensions();
138 $extension_update = get_site_transient( 'update_plugins' );
139 $is_demo = MainWP_Demo_Handle::is_demo_mode();
140 ?>
141 <div id="mainwp-manage-extensions" class="ui alt segment">
142 <div class="mainwp-extensions-api-loading" style="display:none">
143 <div class="ui active inverted page dimmer">
144 <div class="ui medium text loader"></div>
145 </div>
146 </div>
147 <div class="mainwp-main-content">
148 <?php
149 self::render_incompatible_notice();
150 if ( $is_demo ) {
151 ?>
152 <div class="ui yellow message">
153 <?php esc_html_e( 'Extensions are disabled in the Demo Mode.', 'mainwp' ); ?>
154 <i class="close icon"></i>
155 </div>
156 <?php
157 }
158 ?>
159 <?php if ( 0 === count( $extensions ) && empty( $extensions_disabled ) ) { ?>
160 <?php self::render_intro_notice(); ?>
161 <?php
162 } else {
163 ?>
164 <?php if ( MainWP_Utility::show_mainwp_message( 'notice', 'mainwp-extensions-info-message' ) ) { ?>
165 <div class="ui info message">
166 <i class="close icon mainwp-notice-dismiss" notice-id="mainwp-extensions-info-message"></i>
167 <?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>' ); ?>
168 </div>
169 <?php } ?>
170 <div class="ui segment" id="mainwp-extensions-search-no-results" style="display:none">
171 <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>
172 </div>
173 <div class="ui four stackable cards" id="mainwp-extensions-list">
174 <?php if ( isset( $extensions ) && is_array( $extensions ) ) { ?>
175 <?php foreach ( $extensions as $extension ) { ?>
176 <?php
177 if ( ! mainwp_current_user_have_right( 'extension', dirname( $extension['slug'] ) ) ) {
178 continue;
179 }
180
181 $extensions_data = isset( $all_available_extensions[ dirname( $extension['slug'] ) ] ) ? $all_available_extensions[ dirname( $extension['slug'] ) ] : array();
182
183 if ( isset( $extensions_data['img'] ) && ! empty( $extensions_data['img'] ) ) {
184 $img_url = $extensions_data['img'];
185 } elseif ( isset( $extension['icon'] ) && ! empty( $extension['icon'] ) ) {
186 $img_url = $extension['icon'];
187 } elseif ( isset( $extension['iconURI'] ) && '' !== $extension['iconURI'] ) {
188 $img_url = MainWP_Utility::remove_http_prefix( $extension['iconURI'] );
189 } else {
190 $img_url = MAINWP_PLUGIN_URL . 'assets/images/extensions/placeholder.png';
191 }
192
193 self::render_extension_card( $extension, $extension_update, $img_url );
194 ?>
195
196 <?php } ?>
197 <?php } ?>
198
199 <?php if ( is_array( $extensions_disabled ) ) { ?>
200 <?php foreach ( $extensions_disabled as $extension ) { ?>
201 <?php
202 $slug = dirname( $extension['slug'] );
203
204 if ( ! isset( $all_available_extensions[ $slug ] ) ) {
205 continue;
206 }
207
208 $extensions_data = $all_available_extensions[ $slug ];
209
210 if ( isset( $extensions_data['img'] ) && ! empty( $extensions_data['img'] ) ) {
211 $img_url = $extensions_data['img']; // icon from the available extensions in dashboard.
212 } elseif ( isset( $extension['icon'] ) && ! empty( $extension['icon'] ) ) {
213 $img_url = $extension['icon']; // icon from the get_this_extension().
214 } elseif ( isset( $extension['iconURI'] ) && '' !== $extension['iconURI'] ) {
215 $img_url = MainWP_Utility::remove_http_prefix( $extension['iconURI'] ); // icon from the extension header.
216 } else {
217 $img_url = MAINWP_PLUGIN_URL . 'assets/images/extensions/placeholder.png';
218 }
219
220 self::render_extension_card( $extension, $extension_update, $img_url, true );
221 ?>
222
223 <?php } ?>
224
225 <?php } ?>
226 </div>
227 <?php } ?>
228 <?php self::render_purchase_notice(); ?>
229 </div>
230 <div class="mainwp-side-content mainwp-no-padding">
231 <?php if ( 0 !== count( $extensions ) || 0 !== count( $extensions_disabled ) ) { ?>
232 <?php self::render_search_box(); ?>
233 <?php } ?>
234 <?php self::render_side_box( $mainwp_api_key ); ?>
235 </div>
236 <div id="mainwp-extensions-privacy-info">
237 <?php $priv_extensions = self::get_available_extensions( 'all' ); ?>
238 <?php
239 foreach ( $priv_extensions as $priv_extension ) {
240 $item_slug = MainWP_Utility::get_dir_slug( $priv_extension['slug'] );
241 ?>
242 <?php if ( isset( $priv_extension['privacy'] ) && ( 2 === $priv_extension['privacy'] || 1 === (int) $priv_extension['privacy'] ) ) { ?>
243 <input
244 type="hidden"
245 id="<?php esc_attr_e( $priv_extension['slug'] ); ?>"
246 name="<?php esc_attr_e( $priv_extension['slug'] ); ?>"
247 base-slug="<?php esc_attr_e( $item_slug ); ?>"
248 privacy="<?php esc_attr_e( $priv_extension['privacy'] ); ?>"
249 integration="<?php esc_attr_e( $priv_extension['integration'] ); ?>"
250 integration_url="<?php esc_attr_e( $priv_extension['integration_url'] ); ?>"
251 integration_owner="<?php esc_attr_e( $priv_extension['integration_owner'] ); ?>"
252 integration_owner_pp="<?php esc_attr_e( $priv_extension['integration_owner_pp'] ); ?>"
253 extension_title="<?php esc_attr_e( $priv_extension['title'] ); ?>"
254 value="<?php esc_attr_e( $priv_extension['title'] ); ?>"
255 />
256 <?php
257 } elseif ( isset( $priv_extension['privacy'] ) && 0 === (int) $priv_extension['privacy'] ) {
258 ?>
259 <input
260 type="hidden"
261 id="<?php esc_attr_e( $priv_extension['slug'] ); ?>"
262 name="<?php esc_attr_e( $priv_extension['slug'] ); ?>"
263 base-slug="<?php esc_attr_e( $item_slug ); ?>"
264 privacy="<?php esc_attr_e( $priv_extension['privacy'] ); ?>"
265 extension_title="<?php esc_attr_e( $priv_extension['title'] ); ?>"
266 value="<?php esc_attr_e( $priv_extension['title'] ); ?>"
267 />
268 <?php
269 } else {
270 ?>
271 <input
272 type="hidden"
273 id="<?php esc_attr_e( $priv_extension['slug'] ); ?>"
274 name="<?php esc_attr_e( $priv_extension['slug'] ); ?>"
275 base-slug="<?php esc_attr_e( $item_slug ); ?>"
276 extension_title="<?php esc_attr_e( $priv_extension['title'] ); ?>"
277 value="<?php esc_attr_e( $priv_extension['title'] ); ?>"
278 />
279 <?php } ?>
280 <?php } ?>
281 </div>
282 </div>
283
284 <div class="ui tiny second coupled modal" id="mainwp-privacy-info-modal">
285 <i class="close icon"></i>
286 <div class="header"></div>
287 <div class="content"></div>
288 </div>
289 <?php
290 }
291
292 /**
293 * Method render_incompatible_notice()
294 *
295 * Render Incompatability Notice.
296 */
297 public static function render_incompatible_notice() {
298 $deactivated_exts = get_transient( 'mainwp_transient_deactivated_incomtible_exts' );
299 if ( $deactivated_exts && is_array( $deactivated_exts ) && 0 < count( $deactivated_exts ) ) {
300 ?>
301 <?php delete_transient( 'mainwp_transient_deactivated_incomtible_exts' ); ?>
302 <div class="ui yellow message">
303 <div class="header"><?php esc_html_e( 'Important Note', 'mainwp' ); ?></div>
304 <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>
305 <div class="header"><?php esc_html_e( 'Steps to Update Extensions', 'mainwp' ); ?></div>
306 <div class="ui list">
307 <div class="item">1. <?php esc_html_e( 'Go to the WP Admin > Plugins > Installed Plugins page', 'mainwp' ); ?></div>
308 <div class="item">2. <?php esc_html_e( 'Delete Version 3 Extensions (extensions older than version 4) from your MainWP Dashboard', 'mainwp' ); ?></div>
309 <div class="item">3. <?php esc_html_e( 'Go back to the MainWP > Extensions page and use the Install Extensions button', 'mainwp' ); ?></div>
310 </div>
311 <p><?php esc_html_e( 'This process does not affect your extensions settings.', 'mainwp' ); ?></p>
312 </div>
313 <?php
314 }
315 }
316
317 /**
318 * Method render_intro_notice()
319 *
320 * Render Intro Notice.
321 */
322 public static function render_intro_notice() {
323 ?>
324 <div class="ui secondary segment">
325 <h2 class="header"><?php esc_html_e( 'What are Extensions?', 'mainwp' ); ?></h2>
326 <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>
327 <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>
328 <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>
329 <h4><?php esc_html_e( 'MainWP Pro includes:', 'mainwp' ); ?></h4>
330 <div class="ui bulleted list">
331 <div class="item"><?php esc_html_e( 'All current MainWP Extensions (free & premium)', 'mainwp' ); ?></div>
332 <div class="item"><?php esc_html_e( 'All future MainWP Extensions (free & premium)', 'mainwp' ); ?></div>
333 <div class="item"><?php esc_html_e( 'Critical Security & Performance updates for MainWP Extensions', 'mainwp' ); ?></div>
334 <div class="item"><?php esc_html_e( 'Priority support via Helpdesk & Community for MainWP products', 'mainwp' ); ?></div>
335 </div>
336 <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>
337 <h2 class="header"><?php esc_html_e( 'How to install your MainWP Extensions?', 'mainwp' ); ?></h2>
338 <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>
339 </div>
340 <?php
341 }
342
343 /**
344 * Method render_search_box()
345 *
346 * Render Search Box.
347 */
348 public static function render_search_box() {
349 ?>
350 <div class="mainwp-search-options ui fluid accordion mainwp-sidebar-accordion">
351 <div class="title">
352 <i class="dropdown icon"></i>
353 <?php esc_html_e( 'Search Installed Extensions', 'mainwp' ); ?>
354 </div>
355 <div class="content">
356 <div id="mainwp-search-extensions" class="ui fluid search">
357 <div class="ui icon fluid input">
358 <input class="prompt" id="mainwp-search-extensions-input" autocomplete="one-time-code" type="text" placeholder="<?php esc_attr_e( 'Find extension...', 'mainwp' ); ?>">
359 <i class="search icon"></i>
360 </div>
361 </div>
362 </div>
363 </div>
364 <div class="ui fitted divider"></div>
365 <script type="text/javascript">
366 jQuery( document ).ready( function () {
367 jQuery( '#mainwp-search-extensions-input' ).on( 'keyup', function () {
368 var searchQuery = jQuery( this ).val().toLowerCase();
369 var extensions = jQuery( '#mainwp-extensions-list' ).find( '.ui.extension.card' );
370 for ( var i = 0; i < extensions.length; i++ ) {
371 var currentExtension = jQuery( extensions[i] );
372 var extensionTitle = jQuery( currentExtension ).attr( 'extension-title' ).toLowerCase();
373 if ( extensionTitle.indexOf( searchQuery ) > -1 ) {
374 currentExtension.show();
375 currentExtension.addClass( 'mainwp-found' );
376 } else {
377 currentExtension.removeClass( 'mainwp-found' );
378 currentExtension.hide();
379 }
380 var foundExtensions = jQuery( '#mainwp-extensions-list' ).find( '.ui.extension.card.mainwp-found' );
381 if ( foundExtensions.length < 1 ) {
382 jQuery( '#mainwp-extensions-search-no-results' ).show();
383 } else {
384 jQuery( '#mainwp-extensions-search-no-results' ).hide();
385 }
386 }
387 } );
388 } );
389 </script>
390 <?php
391 }
392
393 /**
394 * Method render_extension_card()
395 *
396 * Render the MainWP Extension Cards.
397 *
398 * @param mixed $extension Extention to render.
399 * @param mixed $extension_update Extension update.
400 * @param mixed $img_url Extension image.
401 * @param mixed $disabled Disabled extension.
402 * @param bool $simple Simple info.
403 *
404 * @uses \MainWP\Dashboard\MainWP_Extensions_Handler::is_extension_activated()
405 * @uses \MainWP\Dashboard\MainWP_Extensions_Handler::polish_ext_name()
406 */
407 public static function render_extension_card( $extension, $extension_update, $img_url, $disabled = false, $simple = false ) { // phpcs:ignore -- Current complexity is the only way to achieve desired results, pull request solutions appreciated.
408
409 if ( isset( $extension['href'] ) && ! empty( $extension['href'] ) ) {
410 $extension_page_url = $extension['href'];
411 } elseif ( isset( $extension['direct_page'] ) && ! empty( $extension['direct_page'] ) ) {
412 $extension_page_url = admin_url( 'admin.php?page=' . $extension['direct_page'] );
413 } elseif ( isset( $extension['callback'] ) ) {
414 $extension_page_url = admin_url( 'admin.php?page=' . $extension['page'] );
415 } else {
416 $extension_page_url = admin_url( 'admin.php?page=Extensions' );
417 }
418
419 $active = MainWP_Extensions_Handler::is_extension_activated( $extension['slug'] );
420 if ( empty( $extension['api_key'] ) ) {
421 $active = false;
422 }
423
424 if ( isset( $extension['apiManager'] ) && $extension['apiManager'] ) {
425 if ( $active ) {
426 $extension_api_status = '<a href="javascript:void(0)" class="mainwp-extensions-api-activation api-status mainwp-green"><i class="lock open icon"></i> ' . esc_html__( 'Update Notification Enabled', 'mainwp' ) . '</a>';
427 } else {
428 $extension_api_status = '<a href="javascript:void(0)" class="mainwp-extensions-api-activation api-status mainwp-red"><i class="lock icon"></i> ' . esc_html__( 'Add API to Enable Update Notification', 'mainwp' ) . '</a>';
429 }
430
431 if ( ! isset( $extension['product_item_id'] ) ) {
432 $extension['product_item_id'] = 0;
433 }
434 }
435
436 $queue_status = '';
437 if ( ! $disabled && isset( $extension['apiManager'] ) && $extension['apiManager'] ) {
438 $queue_status = 'queue';
439 }
440
441 $all_available_extensions = self::get_available_extensions( 'all' );
442 $extensions_data = isset( $all_available_extensions[ dirname( $extension['slug'] ) ] ) ? $all_available_extensions[ dirname( $extension['slug'] ) ] : array();
443
444 $privacy_class = '';
445 $license_class = '';
446
447 if ( isset( $extensions_data['privacy'] ) ) {
448 if ( empty( $extensions_data['privacy'] ) ) {
449 $privacy_class = '<i class="green check icon"></i>';
450 } elseif ( 1 === (int) $extensions_data['privacy'] || 2 === (int) $extensions_data['privacy'] ) {
451 $privacy_class = '<i class="yellow info icon"></i>';
452 }
453 }
454
455 if ( $active ) {
456 $license_class = '<i class="green cog icon"></i>';
457 } else {
458 $license_class = '<i class="red cog icon"></i>';
459 }
460
461 $item_slug = MainWP_Utility::get_dir_slug( $extension['slug'] );
462
463 $new = '';
464
465 if ( isset( $extensions_data['release_date'] ) && ( time() - $extensions_data['release_date'] < MONTH_IN_SECONDS ) ) {
466 $new = '<span class="ui floating green mini label">NEW!</span>';
467 }
468
469 $is_demo = MainWP_Demo_Handle::is_demo_mode();
470
471 ?>
472 <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'; ?>">
473 <?php
474 /**
475 * Action: mainwp_extension_card_top
476 *
477 * Fires at the Extension card top
478 *
479 * @since 4.1.4.1
480 *
481 * @param array $extension Array containing the Extension information.
482 */
483 do_action( 'mainwp_extension_card_top', $extension );
484 ?>
485 <div class="content">
486 <img class="right floated mini ui image" src="<?php echo esc_html( $img_url ); ?>">
487 <div class="header">
488
489 <?php if ( ! $disabled ) { ?>
490 <a href="<?php echo esc_url( $extension_page_url ); ?>"><?php echo esc_html( MainWP_Extensions_Handler::polish_ext_name( $extension, true ) ); ?></a>
491 <?php
492 } else {
493 ?>
494 <?php echo esc_html( MainWP_Extensions_Handler::polish_ext_name( $extension, true ) ); ?>
495 <?php } ?>
496 </div>
497
498 <div class="meta">
499 <?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>' : ''; ?>
500 </div>
501
502 <?php if ( isset( $extension['apiManager'] ) && $extension['apiManager'] ) { ?>
503 <?php if ( ! $active && ! $disabled ) { ?>
504 <span class="ui red ribbon label"><?php esc_html_e( 'License not activated', 'mainwp' ); ?></span>
505 <?php } ?>
506 <?php } ?>
507 <?php if ( isset( $extension_update->response[ $extension['slug'] ] ) ) { ?>
508 <a href="<?php echo esc_url( admin_url( 'plugins.php' ) ); ?>" class="ui yellow ribbon label"><?php esc_html_e( 'Update available', 'mainwp' ); ?></a>
509 <?php } ?>
510
511 <div class="description">
512 <?php echo esc_html( preg_replace( '/\<cite\>.*\<\/cite\>/', '', $extension['description'] ) ); ?>
513 </div>
514 </div>
515 <?php echo $new; // phpcs:ignore WordPress.Security.EscapeOutput ?>
516 <?php if ( ! $simple ) { ?>
517 <div class="extra content">
518 <div class="ui mini fluid stackable buttons">
519 <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>
520 <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 ?>
521 <?php if ( $disabled ) { ?>
522 <a class="ui basic button extension-the-plugin-action" plugin-action="remove"><i class="trash icon"></i> <?php echo esc_html__( 'Delete', 'mainwp' ); ?></a>
523 <?php } ?>
524 <?php if ( isset( $extension['apiManager'] ) && $extension['apiManager'] ) { ?>
525 <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 ?>
526 <?php } ?>
527 </div>
528 </div>
529 <?php } ?>
530 <div class="extra content action-feedback" style="display:none;">
531 <div class="ui mini message"></div>
532 </div>
533
534 <?php if ( isset( $extension['apiManager'] ) && $extension['apiManager'] ) { ?>
535 <?php if ( $active ) { ?>
536 <div class="extra content" id="mainwp-extensions-api-form" style="display: none;">
537 <div class="ui form">
538 <div class="field">
539 <div class="ui input fluid">
540 <input type="text" class="extension-api-key" placeholder="<?php esc_attr_e( 'API license key', 'mainwp' ); ?>" value="<?php echo esc_attr( $extension['api_key'] ); ?>"/>
541 </div>
542 </div>
543 <div class="field">
544 <div class="ui checkbox">
545 <input type="checkbox" id="extension-deactivate-cb" class="mainwp-extensions-deactivate-chkbox" <?php echo 'on' === $extension['deactivate_checkbox'] ? 'checked' : ''; ?>>
546 <label for="extension-deactivate-cb"><?php esc_html_e( 'Deactivate License Key', 'mainwp' ); ?></label>
547 </div>
548 </div>
549 <input type="button" class="ui basic red fluid button mainwp-extensions-deactivate" value="<?php esc_html_e( 'Deactivate License', 'mainwp' ); ?>">
550
551 </div>
552 </div>
553 <?php } ?>
554
555 <?php if ( isset( $extension['apiManager'] ) && $extension['apiManager'] ) { ?>
556 <div class="extra content api-feedback" style="display:none;">
557 <div class="ui mini message"></div>
558 </div>
559 <?php } ?>
560 <?php } ?>
561 <?php
562 /**
563 * Action: mainwp_extension_card_bottom
564 *
565 * Fires at the Extension card bottom
566 *
567 * @since 4.1.4.1
568 *
569 * @param array $extension Array containing the Extension information.
570 */
571 do_action( 'mainwp_extension_card_bottom', $extension );
572 ?>
573 </div>
574 <?php
575 }
576
577 /**
578 * Method render_inactive_extension_card()
579 *
580 * Render the MainWP Extension Cards.
581 *
582 * @param mixed $extension Extention to render.
583 * @param mixed $img_url Extension image.
584 * @param bool $installed Extension installed.
585 */
586 public static function render_inactive_extension_card( $extension, $img_url, $installed = false ) {
587
588 if ( ! isset( $extension['link'] ) && isset( $extension['DocumentationURI'] ) ) {
589 $extension['link'] = $extension['DocumentationURI'];
590 }
591
592 if ( ! isset( $extension['version'] ) ) {
593 $extension['version'] = '';
594 }
595 ?>
596 <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'] ); ?>">
597 <div class="content">
598 <img class="right floated mini ui image" src="<?php echo esc_html( $img_url ); ?>">
599 <div class="header">
600 <?php echo esc_html( MainWP_Extensions_Handler::polish_ext_name( $extension, true ) ); ?>
601 </div>
602
603 <?php if ( $installed ) : ?>
604 <a href="admin.php?page=Extensions" class="ui black ribbon label"><?php echo esc_html__( 'Activate extension', 'mainwp' ); ?></a>
605 <?php else : ?>
606 <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>
607 <?php endif; ?>
608 <div class="description">
609 <?php echo esc_html( preg_replace( '/\<cite\>.*\<\/cite\>/', '', $extension['description'] ) ); ?>
610 </div>
611 </div>
612 </div>
613 <?php
614 }
615
616 /**
617 * Method render_purchase_notice()
618 *
619 * Render Purchase Notice.
620 */
621 public static function render_purchase_notice() {
622 $is_demo = MainWP_Demo_Handle::is_demo_mode();
623 $is_pro = MainWP_Hooks::is_pro_member();
624 ?>
625 <div id="mainwp-get-purchased-extensions-modal" class="ui first coupled large modal">
626 <i class="close icon"></i>
627 <div class="header"><?php esc_html_e( 'Install Extensions', 'mainwp' ); ?></div>
628 <div class="scrolling content"></div>
629 <div class="actions">
630 <div class="ui two columns stackable grid">
631 <div class="left aligned column">
632 <?php
633 if ( $is_demo ) {
634 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' ) . '">' );
635 } else {
636 ?>
637 <input type="button" class="ui green button" id="mainwp-extensions-installnow" value="<?php esc_attr_e( 'Install Selected Extensions', 'mainwp' ); ?>">
638 <?php } ?>
639 </div>
640 <div class="right aligned column">
641 <?php if ( ! $is_pro ) : ?>
642 <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>
643 <?php endif; ?>
644 </div>
645 </div>
646 </div>
647 </div>
648 <?php
649 }
650
651 /**
652 * Render the Sidebar.
653 *
654 * @param string $mainwp_api_key MainWP.com api key.
655 */
656 public static function render_side_box( $mainwp_api_key ) {
657 $is_demo = MainWP_Demo_Handle::is_demo_mode();
658 ?>
659 <div class="mainwp-search-options ui fluid accordion mainwp-sidebar-accordion">
660 <div class="title active">
661 <i class="dropdown icon"></i>
662 <?php esc_html_e( 'Install and Activate Extensions', 'mainwp' ); ?>
663 </div>
664 <div class="content active">
665 <?php if ( empty( $mainwp_api_key ) ) { ?>
666 <div class="ui message info">
667 <?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>' ); ?>
668 </div>
669 <?php } ?>
670 <div class="ui form" id="mainwp-extensions-api-fields">
671 <div class="field">
672 <label><?php esc_html_e( 'Enter your MainWP Main API Key.', 'mainwp' ); ?></label>
673 </div>
674 <div class="field">
675 <div class="ui input fluid">
676 <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 ); ?>"/>
677 </div>
678 </div>
679 <div class="field">
680 <div class="ui checkbox">
681 <input type="checkbox" <?php echo ( '' !== $mainwp_api_key ) ? 'checked="checked"' : ''; ?> name="extensions_api_savemylogin_chk" id="extensions_api_savemylogin_chk">
682 <label for="extensions_api_savemylogin_chk"><small><?php esc_html_e( 'Remember MainWP Main API Key', 'mainwp' ); ?></small></label>
683 </div>
684 </div>
685 </div>
686 <div class="ui compact hidden divider"></div>
687
688 <input type="button" class="ui fluid button" id="mainwp-extensions-savelogin" value="<?php esc_attr_e( 'Validate my MainWP Main API Key', 'mainwp' ); ?>">
689 <?php if ( ! $is_demo ) { ?>
690 <div class="ui divider"></div>
691 <input type="button" class="ui fluid basic green button" id="mainwp-extensions-bulkinstall" value="<?php esc_attr_e( 'Install Extensions', 'mainwp' ); ?>">
692 <br/>
693 <input type="button" class="ui fluid green button" id="mainwp-extensions-grabkeys" value="<?php esc_attr_e( 'Activate Extensions', 'mainwp' ); ?>">
694 <?php } ?>
695 </div>
696 </div>
697 <?php
698 $install_ext_slug = '';
699 if ( isset( $_GET['message'] ) && 0 === strpos( wp_unslash( $_GET['message'] ), 'install-ext-' ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
700 $install_ext_slug = str_replace( 'install-ext-', '', wp_unslash( $_GET['message'] ) ); //phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
701 ?>
702 <input type="hidden" id="extension_install_ext_slug" value="<?php echo esc_attr( $install_ext_slug ); ?>">
703 <?php
704 }
705 ?>
706 <script type="text/javascript">
707 jQuery( document ).ready( function ($) {
708 <?php
709 if ( ! empty( $install_ext_slug ) ) {
710 ?>
711 $('#mainwp-extensions-bulkinstall').trigger('click');
712 <?php
713 }
714 ?>
715 });
716 </script>
717 <?php
718 }
719
720 /**
721 * Metod get_extension_groups()
722 *
723 * Grab current MainWP Extension Groups.
724 *
725 * @return array $groups
726 */
727 public static function get_extension_groups() {
728 $groups = array(
729 'admin' => esc_html__( 'Administrative', 'mainwp' ),
730 'agency' => esc_html__( 'Agency', 'mainwp' ),
731 'backup' => esc_html__( 'Backups', 'mainwp' ),
732 'client' => esc_html__( 'Client', 'mainwp' ),
733 'content' => esc_html__( 'Posts/Pages', 'mainwp' ),
734 'development' => esc_html__( 'Development', 'mainwp' ),
735 'monitoring' => esc_html__( 'Monitoring', 'mainwp' ),
736 'performance' => esc_html__( 'Performance', 'mainwp' ),
737 'security' => esc_html__( 'Security', 'mainwp' ),
738 'visitor' => esc_html__( 'Analytics', 'mainwp' ),
739 'updates' => esc_html__( 'Updates', 'mainwp' ),
740 );
741 return $groups;
742 }
743
744 /**
745 * Method get_available_extensions()
746 *
747 * Static Arrays of all Available Extensions.
748 *
749 * @param mixed $types Extensions type. Default: array( 'free', 'pro' ).
750 * @param array $ext_grouped Extensions grouped. Default: array().
751 *
752 * @todo Move to MainWP Server via an XML file.
753 */
754 public static function get_available_extensions( $types = array( 'free', 'pro' ), $ext_grouped = array() ) {
755
756 $folder_url = MAINWP_PLUGIN_URL . 'assets/images/extensions/';
757 $all_exts = array(
758 'advanced-uptime-monitor-extension' =>
759 array(
760 'type' => 'free',
761 'slug' => 'advanced-uptime-monitor-extension',
762 'title' => 'MainWP Advanced Uptime Monitor',
763 'desc' => 'MainWP Extension for real-time up time monitoring.',
764 'link' => 'https://mainwp.com/extension/advanced-uptime-monitor/',
765 'img' => $folder_url . 'advanced-uptime-monitor.png',
766 'product_id' => 'Advanced Uptime Monitor Extension',
767 'product_item_id' => 0,
768 'catalog_id' => '218',
769 'group' => array( 'monitoring' ),
770 'privacy' => 1, // 0 -standalone, 1 - API integration, 2 - 3rd party plugin integration
771 'integration' => 'Uptime Robot API',
772 'integration_url' => 'https://uptimerobot.com/',
773 'integration_owner' => 'Uptime Robot Service Provider Ltd.',
774 'integration_owner_pp' => 'https://uptimerobot.com/privacy/',
775 'integration_1' => 'Better Uptime API',
776 'integration_url_1' => 'https://betteruptime.com/',
777 'integration_owner_1' => 'Better Stack, Inc.',
778 'integration_owner_pp_1' => 'https://betterstack.com/privacy',
779 'integration_2' => 'NodePing API',
780 'integration_url_2' => 'https://nodeping.com/',
781 'integration_owner_2' => 'NodePing LLC',
782 'integration_owner_pp_2' => 'https://nodeping.com/privacy.html',
783 'integration_3' => 'Site24x7 API',
784 'integration_url_3' => 'https://www.site24x7.com/',
785 'integration_owner_3' => 'Zoho Corporation Pvt. Ltd.',
786 'integration_owner_pp_3' => 'https://www.zoho.com/privacy.html',
787 ),
788 'mainwp-article-uploader-extension' =>
789 array(
790 'type' => 'pro',
791 'slug' => 'mainwp-article-uploader-extension',
792 'title' => 'MainWP Article Uploader Extension',
793 'desc' => 'MainWP Article Uploader Extension allows you to bulk upload articles to your dashboard and publish to child sites.',
794 'link' => 'https://mainwp.com/extension/article-uploader/',
795 'img' => $folder_url . 'article-uploader.png',
796 'product_id' => 'MainWP Article Uploader Extension',
797 'product_item_id' => 0,
798 'catalog_id' => '15340',
799 'group' => array( 'content' ),
800 'privacy' => 0,
801 'integration' => '',
802 'integration_url' => '',
803 'integration_owner' => '',
804 'integration_owner_pp' => '',
805 ),
806 'mainwp-atarim-extension' =>
807 array(
808 'type' => 'pro',
809 'slug' => 'mainwp-atarim-extension',
810 'title' => 'MainWP Atarim Extension',
811 'desc' => 'MainWP Atarim Extension allows you get your Atarim info about managed sites to your MainWP Dashboard.',
812 'link' => 'https://mainwp.com/extension/atarim/',
813 'img' => $folder_url . 'atarim.png',
814 'product_id' => 'MainWP Atarim Extension',
815 'product_item_id' => 0,
816 'catalog_id' => '1251161',
817 'group' => array( 'development' ),
818 'privacy' => 1,
819 'integration' => 'Atarim API',
820 'integration_url' => 'https://atarim.io/',
821 'integration_owner' => 'WP FeedBack LTD',
822 'integration_owner_pp' => 'https://atarim.io/privacy-policy/',
823 ),
824 'mainwp-backwpup-extension' =>
825 array(
826 'type' => 'free',
827 'slug' => 'mainwp-backwpup-extension',
828 'title' => 'MainWP BackWPup Extension',
829 '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.',
830 'link' => 'https://mainwp.com/extension/backwpup/',
831 'img' => $folder_url . 'backwpup.png',
832 'product_id' => 'MainWP BackWPup Extension',
833 'product_item_id' => 0,
834 'catalog_id' => '995008',
835 'group' => array( 'backup' ),
836 'privacy' => 2,
837 'integration' => 'BackWPup WordPress Backup Plugin',
838 'integration_url' => 'https://backwpup.com/',
839 'integration_owner' => 'Inpsyde GmbH',
840 'integration_owner_pp' => 'https://backwpup.com/privacy/',
841 ),
842 'boilerplate-extension' =>
843 array(
844 'type' => 'pro',
845 'slug' => 'boilerplate-extension',
846 'title' => 'MainWP Boilerplate Extension',
847 '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.',
848 'link' => 'https://mainwp.com/extension/boilerplate/',
849 'img' => $folder_url . 'boilerplate.png',
850 'product_id' => 'Boilerplate Extension',
851 'product_item_id' => 0,
852 'catalog_id' => '1188',
853 'group' => array( 'content' ),
854 'privacy' => 0,
855 'integration' => '',
856 'integration_url' => '',
857 'integration_owner' => '',
858 'integration_owner_pp' => '',
859 ),
860 'mainwp-buddy-extension' =>
861 array(
862 'type' => 'free',
863 'slug' => 'mainwp-buddy-extension',
864 'title' => 'MainWP Buddy Extension',
865 '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.',
866 'link' => 'https://mainwp.com/extension/mainwpbuddy/',
867 'img' => $folder_url . 'mainwp-buddy.png',
868 'product_id' => 'MainWP Buddy Extension',
869 'product_item_id' => 0,
870 'catalog_id' => '1006044',
871 'group' => array( 'backup' ),
872 'privacy' => 2,
873 'integration' => 'BackupBuddy Plugin',
874 'integration_url' => 'https://ithemes.com/',
875 'integration_owner' => 'Liquid Web, LLC',
876 'integration_owner_pp' => 'https://www.liquidweb.com/about-us/policies/privacy-policy/',
877 ),
878 'mainwp-bulk-settings-manager' =>
879 array(
880 'type' => 'pro',
881 'slug' => 'mainwp-bulk-settings-manager',
882 'title' => 'MainWP Bulk Settings Manager',
883 '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.',
884 'link' => 'https://mainwp.com/extension/bulk-settings-manager/',
885 'img' => $folder_url . 'bulk-settings-manager.png',
886 'product_id' => 'MainWP Bulk Settings Manager',
887 'product_item_id' => 0,
888 'catalog_id' => '347704',
889 'group' => array( 'development' ),
890 'privacy' => 0,
891 'integration' => '',
892 'integration_url' => '',
893 'integration_owner' => '',
894 'integration_owner_pp' => '',
895 ),
896 'mainwp-cache-control-extension' =>
897 array(
898 'type' => 'pro',
899 'slug' => 'mainwp-cache-control-extension',
900 'title' => 'MainWP Cache Control Extension',
901 '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.',
902 'link' => 'https://mainwp.com/extension/cache-control/',
903 'img' => $folder_url . 'cache-control.png',
904 'product_id' => 'MainWP Cache Control Extension',
905 'product_item_id' => 0,
906 'catalog_id' => '1263050',
907 'group' => array( 'performance' ),
908 'privacy' => 1,
909 'integration' => 'Cloudflare API',
910 'integration_url' => 'https://www.cloudflare.com/',
911 'integration_owner' => 'Cloudflare, Inc.',
912 'integration_owner_pp' => 'https://www.cloudflare.com/privacypolicy/',
913 'release_date' => 1676847600,
914 ),
915 'mainwp-clone-extension' =>
916 array(
917 'type' => 'pro',
918 'slug' => 'mainwp-clone-extension',
919 'title' => 'MainWP Clone Extension',
920 'desc' => 'MainWP Clone Extension is an extension for the MainWP plugin that enables you to clone your child sites with no technical knowledge required.',
921 'link' => 'https://mainwp.com/extension/clone/',
922 'img' => $folder_url . 'clone.png',
923 'product_id' => 'MainWP Clone Extension',
924 'product_item_id' => 0,
925 'catalog_id' => '1555',
926 'group' => array( 'development' ),
927 'privacy' => 0,
928 'integration' => '',
929 'integration_url' => '',
930 'integration_owner' => '',
931 'integration_owner_pp' => '',
932 ),
933 'mainwp-code-snippets-extension' =>
934 array(
935 'type' => 'pro',
936 'slug' => 'mainwp-code-snippets-extension',
937 'title' => 'MainWP Code Snippets Extension',
938 '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.',
939 'link' => 'https://mainwp.com/extension/code-snippets/',
940 'img' => $folder_url . 'code-snippets.png',
941 'product_id' => 'MainWP Code Snippets Extension',
942 'product_item_id' => 0,
943 'catalog_id' => '11196',
944 'group' => array( 'development' ),
945 'privacy' => 0,
946 'integration' => '',
947 'integration_url' => '',
948 'integration_owner' => '',
949 'integration_owner_pp' => '',
950 ),
951 'mainwp-comments-extension' =>
952 array(
953 'type' => 'pro',
954 'slug' => 'mainwp-comments-extension',
955 'title' => 'MainWP Comments Extension',
956 'desc' => 'MainWP Comments Extension is an extension for the MainWP plugin that enables you to manage comments on your child sites.',
957 'link' => 'https://mainwp.com/extension/comments/',
958 'img' => $folder_url . 'comments.png',
959 'product_id' => 'MainWP Comments Extension',
960 'product_item_id' => 0,
961 'catalog_id' => '1551',
962 'group' => array( 'admin' ),
963 'privacy' => 0,
964 'integration' => '',
965 'integration_url' => '',
966 'integration_owner' => '',
967 'integration_owner_pp' => '',
968 ),
969 'mainwp-custom-dashboard-extension' =>
970 array(
971 'type' => 'free',
972 'slug' => 'mainwp-custom-dashboard-extension',
973 'title' => 'MainWP Custom Dashboard Extension',
974 'desc' => 'The purpose of this plugin is to contain your customisation snippets for your MainWP Dashboard.',
975 'link' => 'https://mainwp.com/extension/mainwp-custom-dashboard-extension/',
976 'img' => $folder_url . 'custom-dashboard.png',
977 'product_id' => 'MainWP Custom Dashboard Extension',
978 'product_item_id' => 0,
979 'catalog_id' => '1080528',
980 'group' => array( 'development' ),
981 'privacy' => 0,
982 'integration' => '',
983 'integration_url' => '',
984 'integration_owner' => '',
985 'integration_owner_pp' => '',
986 ),
987 'mainwp-custom-post-types' =>
988 array(
989 'type' => 'pro',
990 'slug' => 'mainwp-custom-post-types',
991 'title' => 'MainWP Custom Post Type',
992 '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.',
993 'link' => 'https://mainwp.com/extension/custom-post-types/',
994 'img' => $folder_url . 'custom-post.png',
995 'product_id' => 'MainWP Custom Post Types',
996 'product_item_id' => 0,
997 'catalog_id' => '1002564',
998 'group' => array( 'development' ),
999 'privacy' => 0,
1000 'integration' => '',
1001 'integration_url' => '',
1002 'integration_owner' => '',
1003 'integration_owner_pp' => '',
1004 ),
1005 'mainwp-clean-and-lock-extension' =>
1006 array(
1007 'type' => 'free',
1008 'slug' => 'mainwp-clean-and-lock-extension',
1009 'title' => 'MainWP Dashboard Lock Extension',
1010 '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.',
1011 'link' => 'https://mainwp.com/extension/clean-lock/',
1012 'img' => $folder_url . 'clean-and-lock.png',
1013 'product_id' => 'MainWP Clean and Lock Extension',
1014 'product_item_id' => 0,
1015 'catalog_id' => '12907',
1016 'group' => array( 'security' ),
1017 'privacy' => 0,
1018 'integration' => '',
1019 'integration_url' => '',
1020 'integration_owner' => '',
1021 'integration_owner_pp' => '',
1022 ),
1023 'mainwp-database-updater-extension' =>
1024 array(
1025 'type' => 'pro',
1026 'slug' => 'mainwp-database-updater-extension',
1027 'title' => 'MainWP Database Updater Extension',
1028 'desc' => 'MainWP Database Updater Extension detects available Database updates for the WooCommerce and Elementor plugins, and allows you to process them.',
1029 'link' => 'https://mainwp.com/extension/database-updater/',
1030 'img' => $folder_url . 'database-updater.png',
1031 'product_id' => 'MainWP Database Updater Extension',
1032 'product_item_id' => 0,
1033 'catalog_id' => '1263539',
1034 'group' => array( 'updates' ),
1035 'privacy' => 0,
1036 'integration' => '',
1037 'integration_url' => '',
1038 'integration_owner' => '',
1039 'integration_owner_pp' => '',
1040 'release_date' => 1677106800,
1041 ),
1042 'mainwp-domain-monitor-extension' =>
1043 array(
1044 'type' => 'pro',
1045 'slug' => 'mainwp-domain-monitor-extension',
1046 'title' => 'MainWP Domain Monitor Extension',
1047 '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.',
1048 'link' => 'https://mainwp.com/extension/domain-monitor/',
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 'img' => $folder_url . 'favorites.png',
1068 'product_id' => 'MainWP Favorites Extension',
1069 'product_item_id' => 0,
1070 'catalog_id' => '1379',
1071 'group' => array( 'development' ),
1072 'privacy' => 0,
1073 'integration' => '',
1074 'integration_url' => '',
1075 'integration_owner' => '',
1076 'integration_owner_pp' => '',
1077 ),
1078 'mainwp-fathom-extension' =>
1079 array(
1080 'type' => 'pro',
1081 'slug' => 'mainwp-fathom-extension',
1082 'title' => 'MainWP Fathom Extension',
1083 '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.',
1084 'link' => 'https://mainwp.com/extension/fathom/',
1085 'img' => $folder_url . 'fathom.png',
1086 'product_id' => 'MainWP Fathom Extension',
1087 'product_item_id' => 0,
1088 'catalog_id' => '1274704',
1089 'group' => array( 'visitor' ),
1090 'privacy' => 1,
1091 'integration' => 'Fathom Analytics API',
1092 'integration_url' => 'https://usefathom.com/',
1093 'integration_owner' => 'Conva Ventures Inc.',
1094 'integration_owner_pp' => 'https://usefathom.com/privacy',
1095 ),
1096 'mainwp-file-uploader-extension' =>
1097 array(
1098 'type' => 'pro',
1099 'slug' => 'mainwp-file-uploader-extension',
1100 'title' => 'MainWP File Uploader Extension',
1101 'desc' => 'MainWP File Uploader Extension gives you an simple way to upload files to your child sites! Requires the MainWP Dashboard plugin.',
1102 'link' => 'https://mainwp.com/extension/file-uploader/',
1103 'img' => $folder_url . 'file-uploader.png',
1104 'product_id' => 'MainWP File Uploader Extension',
1105 'product_item_id' => 0,
1106 'catalog_id' => '11637',
1107 'group' => array( 'development' ),
1108 'privacy' => 0,
1109 'integration' => '',
1110 'integration_url' => '',
1111 'integration_owner' => '',
1112 'integration_owner_pp' => '',
1113 ),
1114 'mainwp-google-analytics-extension' =>
1115 array(
1116 'type' => 'pro',
1117 'slug' => 'mainwp-google-analytics-extension',
1118 'title' => 'MainWP Google Analytics Extension',
1119 '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.',
1120 'link' => 'https://mainwp.com/extension/google-analytics/',
1121 'img' => $folder_url . 'google-analytics.png',
1122 'product_id' => 'MainWP Google Analytics Extension',
1123 'product_item_id' => 0,
1124 'catalog_id' => '1554',
1125 'group' => array( 'visitor' ),
1126 'privacy' => 1,
1127 'integration' => 'Google Analytics API',
1128 'integration_url' => 'https://analytics.google.com',
1129 'integration_owner' => 'Google LLC',
1130 'integration_owner_pp' => 'https://policies.google.com/privacy',
1131 ),
1132 'mainwp-jetpack-protect-extension' =>
1133 array(
1134 'type' => 'free',
1135 'slug' => 'mainwp-jetpack-protect-extension',
1136 'title' => 'MainWP Jetpack Protect Extension',
1137 '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.',
1138 'link' => 'https://mainwp.com/extension/jetpack-protect/',
1139 'img' => $folder_url . 'jetpack-protect.png',
1140 'product_id' => 'MainWP Jetpack Protect Extension',
1141 'product_item_id' => 0,
1142 'catalog_id' => '1263547',
1143 'group' => array( 'security' ),
1144 'privacy' => 2,
1145 'integration' => 'Jetpack Protect',
1146 'integration_url' => 'https://jetpack.com/',
1147 'integration_owner' => 'Automattic Inc.',
1148 'integration_owner_pp' => 'https://automattic.com/privacy/',
1149 'release_date' => 1677020400,
1150 ),
1151 'mainwp-jetpack-scan-extension' =>
1152 array(
1153 'type' => 'pro',
1154 'slug' => 'mainwp-jetpack-scan-extension',
1155 'title' => 'MainWP Jetpack Scan Extension',
1156 '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.',
1157 'link' => 'https://mainwp.com/extension/jetpack-scan/',
1158 'img' => $folder_url . 'jetpack-scan.png',
1159 'product_id' => 'MainWP Jetpack Scan Extension',
1160 'product_item_id' => 0,
1161 'catalog_id' => '1263551',
1162 'group' => array( 'security' ),
1163 'privacy' => 1,
1164 'integration' => 'Jetpack Scan API',
1165 'integration_url' => 'https://jetpack.com/',
1166 'integration_owner' => 'Automattic Inc.',
1167 'integration_owner_pp' => 'https://automattic.com/privacy/',
1168 'release_date' => 1677020400,
1169 ),
1170 'mainwp-lighthouse-extension' =>
1171 array(
1172 'type' => 'pro',
1173 'slug' => 'mainwp-lighthouse-extension',
1174 'title' => 'MainWP Lighthouse Extension',
1175 '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.',
1176 'link' => 'https://mainwp.com/extension/lighthouse/',
1177 'img' => $folder_url . 'lighthouse.png',
1178 'product_id' => 'MainWP Lighthouse Extension',
1179 'product_item_id' => 0,
1180 'catalog_id' => '1233934',
1181 'group' => array( 'monitoring' ),
1182 'privacy' => 1,
1183 'integration' => 'Google PageSpeed Insights API',
1184 'integration_url' => 'https://pagespeed.web.dev/',
1185 'integration_owner' => 'Google LLC',
1186 'integration_owner_pp' => 'https://policies.google.com/privacy',
1187 ),
1188 'mainwp-maintenance-extension' =>
1189 array(
1190 'type' => 'pro',
1191 'slug' => 'mainwp-maintenance-extension',
1192 'title' => 'MainWP Maintenance Extension',
1193 '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.',
1194 'link' => 'https://mainwp.com/extension/maintenance/',
1195 'img' => $folder_url . 'maintenance.png',
1196 'product_id' => 'MainWP Maintenance Extension',
1197 'product_item_id' => 0,
1198 'catalog_id' => '1141',
1199 'group' => array( 'performance' ),
1200 'privacy' => 0,
1201 'integration' => '',
1202 'integration_url' => '',
1203 'integration_owner' => '',
1204 'integration_owner_pp' => '',
1205 ),
1206 'mainwp-piwik-extension' =>
1207 array(
1208 'type' => 'pro',
1209 'slug' => 'mainwp-piwik-extension',
1210 'title' => 'MainWP Piwik Extension',
1211 'desc' => 'MainWP Piwik 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.',
1212 'link' => 'https://mainwp.com/extension/piwik/',
1213 'img' => $folder_url . 'piwik.png',
1214 'product_id' => 'MainWP Piwik Extension',
1215 'product_item_id' => 0,
1216 'catalog_id' => '10523',
1217 'group' => array( 'visitor' ),
1218 'privacy' => 1,
1219 'integration' => 'Matomo API',
1220 'integration_url' => 'https://matomo.org/',
1221 'integration_owner' => 'InnoCraft',
1222 'integration_owner_pp' => 'https://matomo.org/privacy-policy/',
1223 ),
1224 'mainwp-post-dripper-extension' =>
1225 array(
1226 'type' => 'pro',
1227 'slug' => 'mainwp-post-dripper-extension',
1228 'title' => 'MainWP Post Dripper Extension',
1229 '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.',
1230 'link' => 'https://mainwp.com/extension/post-dripper/',
1231 'img' => $folder_url . 'post-dripper.png',
1232 'product_id' => 'MainWP Post Dripper Extension',
1233 'product_item_id' => 0,
1234 'catalog_id' => '11756',
1235 'group' => array( 'content' ),
1236 'privacy' => 0,
1237 'integration' => '',
1238 'integration_url' => '',
1239 'integration_owner' => '',
1240 'integration_owner_pp' => '',
1241 ),
1242 'mainwp-post-plus-extension' =>
1243 array(
1244 'type' => 'pro',
1245 'slug' => 'mainwp-post-plus-extension',
1246 'title' => 'MainWP Post Plus Extension',
1247 '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.',
1248 'link' => 'https://mainwp.com/extension/post-plus/',
1249 'img' => $folder_url . 'post-plus.png',
1250 'product_id' => 'MainWP Post Plus Extension',
1251 'product_item_id' => 0,
1252 'catalog_id' => '12458',
1253 'group' => array( 'content' ),
1254 'privacy' => 0,
1255 'integration' => '',
1256 'integration_url' => '',
1257 'integration_owner' => '',
1258 'integration_owner_pp' => '',
1259 ),
1260 'mainwp-pressable-extension' =>
1261 array(
1262 'type' => 'pro',
1263 'slug' => 'mainwp-pressable-extension',
1264 'title' => 'MainWP Pressable Extension',
1265 '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.',
1266 'link' => 'https://mainwp.com/extension/pressable/',
1267 'img' => $folder_url . 'pressable.png',
1268 'product_id' => 'MainWP Pressable Extension',
1269 'product_item_id' => 0,
1270 'catalog_id' => '1271427',
1271 'group' => array( 'development' ),
1272 'privacy' => 1,
1273 'integration' => 'Pressable API',
1274 'integration_url' => 'https://pressable.com/',
1275 'integration_owner' => 'Pressable, Inc.',
1276 'integration_owner_pp' => 'https://automattic.com/privacy/',
1277 ),
1278 'mainwp-pro-reports-extension' =>
1279 array(
1280 'type' => 'pro',
1281 'slug' => 'mainwp-pro-reports-extension',
1282 'title' => 'MainWP Pro Reports Extension',
1283 '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.',
1284 'link' => 'https://mainwp.com/extension/pro-reports/',
1285 'img' => $folder_url . 'pro-reports.png',
1286 'product_id' => 'MainWP Pro Reports Extension',
1287 'product_item_id' => 0,
1288 'catalog_id' => '1133708',
1289 'group' => array( 'client' ),
1290 'privacy' => 0,
1291 'integration' => '',
1292 'integration_url' => '',
1293 'integration_owner' => '',
1294 'integration_owner_pp' => '',
1295 ),
1296 'mainwp-rocket-extension' =>
1297 array(
1298 'type' => 'pro',
1299 'slug' => 'mainwp-rocket-extension',
1300 'title' => 'MainWP Rocket Extension',
1301 '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.',
1302 'link' => 'https://mainwp.com/extension/rocket/',
1303 'img' => $folder_url . 'rocket.png',
1304 'product_id' => 'MainWP Rocket Extension',
1305 'product_item_id' => 0,
1306 'catalog_id' => '335257',
1307 'group' => array( 'performance' ),
1308 'privacy' => 2,
1309 'integration' => 'WP Rocket Plugin',
1310 'integration_url' => 'https://wp-rocket.me/',
1311 'integration_owner' => 'WP Media, Inc.',
1312 'integration_owner_pp' => 'https://wp-rocket.me/privacy-policy/',
1313 ),
1314 'mainwp-sucuri-extension' =>
1315 array(
1316 'type' => 'free',
1317 'slug' => 'mainwp-sucuri-extension',
1318 'title' => 'MainWP Sucuri Extension',
1319 '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.',
1320 'link' => 'https://mainwp.com/extension/sucuri/',
1321 'img' => $folder_url . 'sucuri.png',
1322 'product_id' => 'MainWP Sucuri Extension',
1323 'product_item_id' => 0,
1324 'catalog_id' => '10777',
1325 'group' => array( 'security' ),
1326 'privacy' => 1,
1327 'integration' => 'Sucuri API',
1328 'integration_url' => 'https://sucuri.net/',
1329 'integration_owner' => 'GoDaddy Mediatemple, Inc., d/b/a Sucuri.',
1330 'integration_owner_pp' => 'https://sucuri.net/privacy/',
1331 ),
1332 'mainwp-ithemes-security-extension' =>
1333 array(
1334 'type' => 'pro',
1335 'slug' => 'mainwp-ithemes-security-extension',
1336 'title' => 'MainWP iThemes Security Extension',
1337 '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.',
1338 'link' => 'https://mainwp.com/extension/ithemes-security/',
1339 'img' => $folder_url . 'ithemes.png',
1340 'product_id' => 'MainWP Security Extension',
1341 'product_item_id' => 0,
1342 'catalog_id' => '113355',
1343 'group' => array( 'security' ),
1344 'privacy' => 2,
1345 'integration' => 'iThemes Security Plugin',
1346 'integration_url' => 'https://ithemes.com/',
1347 'integration_owner' => 'Liquid Web, LLC',
1348 'integration_owner_pp' => 'https://www.liquidweb.com/about-us/policies/privacy-policy/',
1349 ),
1350 'mainwp-ssl-monitor-extension' =>
1351 array(
1352 'type' => 'pro',
1353 'slug' => 'mainwp-ssl-monitor-extension',
1354 'title' => 'MainWP SSL Monitor Extension',
1355 '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.',
1356 'link' => 'https://mainwp.com/extension/ssl-monitor/',
1357 'img' => $folder_url . 'ssl-monitor.png',
1358 'product_id' => 'MainWP SSL Monitor Extension',
1359 'product_item_id' => 0,
1360 'catalog_id' => '1263543',
1361 'group' => array( 'monitoring' ),
1362 'privacy' => 0,
1363 'integration' => '',
1364 'integration_url' => '',
1365 'integration_owner' => '',
1366 'integration_owner_pp' => '',
1367 'release_date' => 1676934000,
1368 ),
1369 'mainwp-staging-extension' =>
1370 array(
1371 'type' => 'pro',
1372 'slug' => 'mainwp-staging-extension',
1373 'title' => 'MainWP Staging Extension',
1374 'desc' => 'MainWP Staging Extension along with the WP Staging plugin, allows you to create and manage staging sites for your child sites.',
1375 'link' => 'https://mainwp.com/extension/staging/',
1376 'img' => $folder_url . 'staging.png',
1377 'product_id' => 'MainWP Staging Extension',
1378 'product_item_id' => 0,
1379 'catalog_id' => '1034878',
1380 'group' => array( 'development' ),
1381 'privacy' => 2,
1382 'integration' => 'WP STAGING Backup Duplicator & Migration Plugin',
1383 'integration_url' => 'https://wp-staging.com/',
1384 'integration_owner' => 'WP STAGING',
1385 'integration_owner_pp' => 'https://wp-staging.com/privacy-policy/',
1386 ),
1387 'mainwp-team-control' =>
1388 array(
1389 'type' => 'pro',
1390 'slug' => 'mainwp-team-control',
1391 'title' => 'MainWP Team Control',
1392 '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.',
1393 'link' => 'https://mainwp.com/extension/team-control/',
1394 'img' => $folder_url . 'team-control.png',
1395 'product_id' => 'MainWP Team Control',
1396 'product_item_id' => 0,
1397 'catalog_id' => '23936',
1398 'group' => array( 'agency' ),
1399 'privacy' => 0,
1400 'integration' => '',
1401 'integration_url' => '',
1402 'integration_owner' => '',
1403 'integration_owner_pp' => '',
1404 ),
1405 'termageddon-for-mainwp' =>
1406 array(
1407 'type' => 'free',
1408 'slug' => 'termageddon-for-mainwp',
1409 'title' => 'Termageddon for MainWP',
1410 'desc' => 'This extension is used for creating Privacy Policy, ToS, Disclaimer and Cookie Policy & Consent Tool pages automatically on your websites.',
1411 'link' => 'https://mainwp.com/extension/termageddon-for-mainwp/',
1412 'img' => $folder_url . 'termageddon.png',
1413 'product_id' => 'Termageddon for MainWP',
1414 'product_item_id' => 0,
1415 'catalog_id' => '1200201',
1416 'group' => array( 'content' ),
1417 'privacy' => 1,
1418 'integration' => 'Termageddon API',
1419 'integration_url' => 'https://termageddon.com/',
1420 'integration_owner' => 'Termageddon, LLC',
1421 'integration_owner_pp' => 'https://termageddon.com/privacy-policy/',
1422 'release_date' => 1678921200,
1423 ),
1424 'mainwp-timecapsule-extension' =>
1425 array(
1426 'type' => 'free',
1427 'slug' => 'mainwp-timecapsule-extension',
1428 'title' => 'MainWP Time Capsule Extension',
1429 '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.',
1430 'link' => 'https://mainwp.com/extension/time-capsule/',
1431 'img' => $folder_url . 'time-capsule.png',
1432 'product_id' => 'MainWP Time Capsule Extension',
1433 'product_item_id' => 0,
1434 'catalog_id' => '1049003',
1435 'group' => array( 'backup' ),
1436 'privacy' => 2,
1437 'integration' => 'Backup and Staging by WP Time Capsule',
1438 'integration_url' => 'https://wptimecapsule.com/',
1439 'integration_owner' => 'Revmakx, LLC.',
1440 'integration_owner_pp' => 'https://wptimecapsule.com/privacy-policy/',
1441 ),
1442 'mainwp-time-tracker-extension' =>
1443 array(
1444 'type' => 'pro',
1445 'slug' => 'mainwp-time-tracker-extension',
1446 'title' => 'MainWP Time Tracker Extension',
1447 '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.',
1448 'link' => 'https://mainwp.com/extension/time-tracker/',
1449 'img' => $folder_url . 'time-tracker.png',
1450 'product_id' => 'MainWP Time Tracker Extension',
1451 'product_item_id' => 0,
1452 'catalog_id' => '1284683',
1453 'group' => array( 'client' ),
1454 'privacy' => 0,
1455 'integration' => '',
1456 'integration_url' => '',
1457 'integration_owner' => '',
1458 'integration_owner_pp' => '',
1459 ),
1460 'mainwp-cost-tracker-assistant-extension' =>
1461 array(
1462 'type' => 'pro',
1463 'slug' => 'mainwp-cost-tracker-assistant-extension',
1464 'title' => 'MainWP Cost Tracker Assistant Extension',
1465 '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.',
1466 'link' => 'https://mainwp.com/extension/cost-tracker-assistant/',
1467 'img' => $folder_url . 'cost-tracker-assistant.png',
1468 'product_id' => 'MainWP Cost Tracker Assistant Extension',
1469 'product_item_id' => 0,
1470 'catalog_id' => '1284687',
1471 'group' => array( 'admin' ),
1472 'privacy' => 0,
1473 'integration' => '',
1474 'integration_url' => '',
1475 'integration_owner' => '',
1476 'integration_owner_pp' => '',
1477 ),
1478 'mainwp-updraftplus-extension' =>
1479 array(
1480 'type' => 'free',
1481 'slug' => 'mainwp-updraftplus-extension',
1482 'title' => 'MainWP UpdraftPlus Extension',
1483 '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.',
1484 'link' => 'https://mainwp.com/extension/updraftplus/',
1485 'img' => $folder_url . 'updraftplus.png',
1486 'product_id' => 'MainWP UpdraftPlus Extension',
1487 'product_item_id' => 0,
1488 'catalog_id' => '165843',
1489 'group' => array( 'backup' ),
1490 'privacy' => 2,
1491 'integration' => 'UpdraftPlus WordPress Backup Plugin',
1492 'integration_url' => 'https://updraftplus.com/',
1493 'integration_owner' => 'Updraft WP Software Ltd.',
1494 'integration_owner_pp' => 'https://updraftplus.com/data-protection-and-privacy-centre/',
1495 ),
1496 'mainwp-url-extractor-extension' =>
1497 array(
1498 'type' => 'pro',
1499 'slug' => 'mainwp-url-extractor-extension',
1500 'title' => 'MainWP URL Extractor Extension',
1501 'desc' => 'MainWP URL Extractor allows you to search your child sites post and pages and export URLs in customized format. Requires MainWP Dashboard plugin.',
1502 'link' => 'https://mainwp.com/extension/url-extractor/',
1503 'img' => $folder_url . 'url-extractor.png',
1504 'product_id' => 'MainWP Url Extractor Extension',
1505 'product_item_id' => 0,
1506 'catalog_id' => '11965',
1507 'group' => array( 'development' ),
1508 'privacy' => 0,
1509 'integration' => '',
1510 'integration_url' => '',
1511 'integration_owner' => '',
1512 'integration_owner_pp' => '',
1513 ),
1514 'mainwp-virusdie-extension' =>
1515 array(
1516 'type' => 'pro',
1517 'slug' => 'mainwp-virusdie-extension',
1518 'title' => 'MainWP Virusdie Extension',
1519 '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.',
1520 'link' => 'https://mainwp.com/extension/virusdie/',
1521 'img' => $folder_url . 'virusdie.png',
1522 'product_id' => 'MainWP Virusdie Extension',
1523 'product_item_id' => 0,
1524 'catalog_id' => '1213235',
1525 'group' => array( 'security' ),
1526 'privacy' => 1,
1527 'integration' => 'Virusdie API',
1528 'integration_url' => 'https://virusdie.com/',
1529 'integration_owner' => 'Virusdie OU',
1530 'integration_owner_pp' => 'https://virusdie.com/rules/privacypolicy/',
1531 ),
1532 'mainwp-vulnerability-checker-extension' =>
1533 array(
1534 'type' => 'pro',
1535 'slug' => 'mainwp-vulnerability-checker-extension',
1536 'title' => 'MainWP Vulnerability Checker Extension',
1537 '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.',
1538 'link' => 'https://mainwp.com/extension/vulnerability-checker/',
1539 'img' => $folder_url . 'vulnerability-checker.png',
1540 'product_id' => 'MainWP Vulnerability Checker Extension',
1541 'product_item_id' => 0,
1542 'catalog_id' => '12458',
1543 'group' => array( 'security' ),
1544 'privacy' => 1,
1545 'integration' => 'WPScan API',
1546 'integration_url' => 'https://wpscan.com/',
1547 'integration_owner' => 'Automattic Inc.',
1548 'integration_owner_pp' => 'https://automattic.com/privacy/',
1549 'integration_1' => 'NVD NIST API',
1550 'integration_url_1' => 'https://nvd.nist.gov/',
1551 'integration_owner_1' => 'National Institute of Standards and Technology',
1552 'integration_owner_pp_1' => 'https://www.nist.gov/privacy-policy',
1553 ),
1554 'mainwp-branding-extension' =>
1555 array(
1556 'type' => 'pro',
1557 'slug' => 'mainwp-branding-extension',
1558 'title' => 'MainWP White Label Extension',
1559 '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.',
1560 'link' => 'https://mainwp.com/extension/child-plugin-branding/',
1561 'img' => $folder_url . 'branding.png',
1562 'product_id' => 'MainWP Branding Extension',
1563 'product_item_id' => 0,
1564 'catalog_id' => '10679',
1565 'group' => array( 'agency' ),
1566 'privacy' => 0,
1567 'integration' => '',
1568 'integration_url' => '',
1569 'integration_owner' => '',
1570 'integration_owner_pp' => '',
1571 ),
1572 'mainwp-woocommerce-shortcuts-extension' =>
1573 array(
1574 'type' => 'free',
1575 'slug' => 'mainwp-woocommerce-shortcuts-extension',
1576 'title' => 'MainWP WooCommerce Shortcuts Extension',
1577 'desc' => 'MainWP WooCommerce Shortcuts provides you a quick access WooCommerce pages in your network. Requires MainWP Dashboard plugin.',
1578 'link' => 'https://mainwp.com/extension/woocommerce-shortcuts/',
1579 'img' => $folder_url . 'woo-shortcuts.png',
1580 'product_id' => 'MainWP WooCommerce Shortcuts Extension',
1581 'product_item_id' => 0,
1582 'catalog_id' => '12706',
1583 'group' => array( 'admin' ),
1584 'privacy' => 2,
1585 'integration' => 'WooCommerce Plugin',
1586 'integration_url' => 'https://woocommerce.com',
1587 'integration_owner' => 'Automattic Inc.',
1588 'integration_owner_pp' => 'https://automattic.com/privacy/',
1589 ),
1590 'mainwp-woocommerce-status-extension' =>
1591 array(
1592 'type' => 'pro',
1593 'slug' => 'mainwp-woocommerce-status-extension',
1594 'title' => 'MainWP WooCommerce Status Extension',
1595 'desc' => 'MainWP WooCommerce Status provides you a quick overview of your WooCommerce stores in your network. Requires MainWP Dashboard plugin.',
1596 'link' => 'https://mainwp.com/extension/woocommerce-status/',
1597 'img' => $folder_url . 'woo-status.png',
1598 'product_id' => 'MainWP WooCommerce Status Extension',
1599 'product_item_id' => 0,
1600 'catalog_id' => '12671',
1601 'group' => array( 'admin' ),
1602 'privacy' => 2,
1603 'integration' => 'WooCommerce Plugin',
1604 'integration_url' => 'https://woocommerce.com',
1605 'integration_owner' => 'Automattic Inc.',
1606 'integration_owner_pp' => 'https://automattic.com/privacy/',
1607 ),
1608 'mainwp-wordfence-extension' =>
1609 array(
1610 'type' => 'pro',
1611 'slug' => 'mainwp-wordfence-extension',
1612 'title' => 'MainWP WordFence Extension',
1613 '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.',
1614 'link' => 'https://mainwp.com/extension/wordfence/',
1615 'img' => $folder_url . 'wordfence.png',
1616 'product_id' => 'MainWP Wordfence Extension',
1617 'product_item_id' => 0,
1618 'catalog_id' => '19678',
1619 'group' => array( 'security' ),
1620 'privacy' => 2,
1621 'integration' => 'Wordfence Security � Firewall & Malware Scan Plugin',
1622 'integration_url' => 'https://www.wordfence.com/',
1623 'integration_owner' => 'Defiant, Inc.',
1624 'integration_owner_pp' => 'https://www.wordfence.com/privacy-policy/',
1625 ),
1626 'wordpress-seo-extension' =>
1627 array(
1628 'type' => 'pro',
1629 'slug' => 'wordpress-seo-extension',
1630 'title' => 'MainWP WordPress SEO Extension',
1631 '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.',
1632 'link' => 'https://mainwp.com/extension/wordpress-seo/',
1633 'img' => $folder_url . 'wordpress-seo.png',
1634 'product_id' => 'MainWP Wordpress SEO Extension',
1635 'product_item_id' => 0,
1636 'catalog_id' => '12080',
1637 'group' => array( 'content' ),
1638 'privacy' => 2,
1639 'integration' => 'Yoast SEO Plugin',
1640 'integration_url' => 'https://yoast.com/',
1641 'integration_owner' => 'Newfold Capital Inc.',
1642 'integration_owner_pp' => 'https://yoast.com/privacy-policy/',
1643 ),
1644 'activity-log-mainwp' => array(
1645 'type' => 'org',
1646 'product_id' => 'activity-log-mainwp',
1647 'slug' => 'activity-log-mainwp/activity-log-mainwp.php',
1648 'title' => 'Activity Log For MainWP',
1649 'link' => 'https://wordpress.org/plugins/activity-log-mainwp/',
1650 'url' => 'https://wordpress.org/plugins/activity-log-mainwp/',
1651 'group' => array( 'security' ),
1652 'privacy' => 2,
1653 'integration' => 'WP Activity Log',
1654 'integration_url' => 'https://wpactivitylog.com/',
1655 'integration_owner' => 'WP White Security',
1656 'integration_owner_pp' => 'https://www.wpwhitesecurity.com/privacy-policy/',
1657 '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',
1658 ),
1659 'security-ninja-for-mainwp' => array(
1660 'type' => 'org',
1661 'product_id' => 'security-ninja-for-mainwp',
1662 'slug' => 'security-ninja-for-mainwp/security-ninja-mainwp.php',
1663 'title' => 'Security Ninja For MainWP',
1664 'link' => 'https://wordpress.org/plugins/security-ninja-for-mainwp/',
1665 'url' => 'https://wordpress.org/plugins/security-ninja-for-mainwp/',
1666 'group' => array( 'security' ),
1667 'privacy' => 2,
1668 'integration' => 'Security Ninja',
1669 'integration_url' => 'https://wpsecurityninja.com/',
1670 'integration_owner' => 'Larsik Corp',
1671 'integration_owner_pp' => 'https://larsik.com/privacy/',
1672 'desc' => 'Security Ninja is a strong plugin that helps you find vulnerabilites and improve the security on your website.',
1673 ),
1674 'wp-compress-mainwp' => array(
1675 'type' => 'org',
1676 'product_id' => 'wp-compress-mainwp',
1677 'slug' => 'wp-compress-mainwp/wp-compress-main-wp.php',
1678 'title' => 'WP Compress for MainWP',
1679 'link' => 'https://wordpress.org/plugins/wp-compress-mainwp/',
1680 'url' => 'https://wordpress.org/plugins/wp-compress-mainwp/',
1681 'group' => array( 'performance' ),
1682 'privacy' => 2,
1683 'integration' => 'WP Compress',
1684 'integration_url' => 'https://wpcompress.com/',
1685 'integration_owner' => 'WP Compress',
1686 'integration_owner_pp' => 'https://wpcompress.com/privacy-policy/',
1687 ),
1688 'seopress-for-mainwp' => array(
1689 'type' => 'org',
1690 'product_id' => 'seopress-for-mainwp',
1691 'slug' => 'seopress-for-mainwp/seopress-for-mainwp.php',
1692 'title' => 'SEOPress for MainWP',
1693 'link' => 'https://wordpress.org/plugins/seopress-for-mainwp/',
1694 'url' => 'https://wordpress.org/plugins/seopress-for-mainwp/',
1695 'group' => array( 'content' ),
1696 'privacy' => 2,
1697 'integration' => 'SEOPress',
1698 'integration_url' => 'https://www.seopress.org/',
1699 'integration_owner' => 'SEOPRESS',
1700 'integration_owner_pp' => 'https://www.seopress.org/privacy-policy/',
1701 ),
1702 'wpvivid-backup-mainwp' => array(
1703 'type' => 'org',
1704 'product_id' => 'wpvivid-backup-mainwp',
1705 'slug' => 'wpvivid-backup-mainwp/wpvivid-backup-mainwp.php',
1706 'title' => 'WPvivid Backup for MainWP',
1707 'link' => 'https://wordpress.org/plugins/wpvivid-backup-mainwp/',
1708 'url' => 'https://wordpress.org/plugins/wpvivid-backup-mainwp/',
1709 'group' => array( 'backup' ),
1710 'privacy' => 2,
1711 'integration' => 'WPvivid Backup',
1712 'integration_url' => 'https://wpvivid.com/',
1713 'integration_owner' => 'VPSrobots Inc.',
1714 'integration_owner_pp' => 'https://wpvivid.com/privacy-policy',
1715 '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.',
1716 ),
1717 );
1718
1719 $list = array();
1720
1721 if ( is_string( $types ) ) {
1722 if ( 'all' === $types ) {
1723 return $all_exts;
1724 } elseif ( in_array( $types, array( 'free', 'pro', 'org' ) ) ) {
1725 $list = array();
1726 foreach ( $all_exts as $slug => $ext ) {
1727 if ( $ext['type'] === $types ) {
1728
1729 $list[ $slug ] = $ext;
1730
1731 }
1732 }
1733 return $list;
1734
1735 }
1736 }
1737
1738 if ( is_array( $types ) ) {
1739 $list = array();
1740 foreach ( $all_exts as $slug => $ext ) {
1741 if ( in_array( $ext['type'], $types ) ) {
1742 $list[ $slug ] = $ext;
1743 }
1744 }
1745 }
1746
1747 if ( is_array( $ext_grouped ) && ! empty( $ext_grouped ) ) {
1748 $list = array();
1749 foreach ( $all_exts as $slug => $ext ) {
1750 foreach ( $ext_grouped as $group ) {
1751 if ( in_array( $group, $ext['group'] ) ) {
1752 $list[ $slug ] = $ext;
1753 }
1754 }
1755 }
1756 }
1757
1758 return $list;
1759 }
1760 }
1761