| 1 | <?php |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | const WPCOM_CORE_ATOMIC_PLUGINS = array( |
| 12 | 'jetpack/jetpack.php', |
| 13 | 'akismet/akismet.php', |
| 14 | ); |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | const WPCOM_FEATURE_PLUGINS = array( |
| 20 | 'coblocks/class-coblocks.php', |
| 21 | 'full-site-editing/full-site-editing-plugin.php', |
| 22 | 'gutenberg/gutenberg.php', |
| 23 | 'layout-grid/index.php', |
| 24 | 'page-optimize/page-optimize.php', |
| 25 | ); |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | function wpcomsh_is_managed_plugin( $plugin_file ) { |
| 35 | if ( defined( 'IS_ATOMIC' ) && IS_ATOMIC && class_exists( 'Atomic_Platform_Mu_Plugin' ) ) { |
| 36 | return Atomic_Platform_Mu_Plugin::is_managed_plugin( $plugin_file ); |
| 37 | } |
| 38 | |
| 39 | return false; |
| 40 | } |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | function wpcomsh_is_marketplace_plugin( $plugin_file ) { |
| 49 | if ( ! wpcomsh_is_managed_plugin( $plugin_file ) ) { |
| 50 | return false; |
| 51 | } |
| 52 | |
| 53 | $persistent_data = new Atomic_Persistent_Data(); |
| 54 | $marketplace_plugins = array(); |
| 55 | |
| 56 | if ( ! empty( $persistent_data->WPCOM_MARKETPLACE ) ) { |
| 57 | $marketplace_software = json_decode( $persistent_data->WPCOM_MARKETPLACE, true ); |
| 58 | |
| 59 | |
| 60 | if ( ! isset( $marketplace_software['plugins'] ) || ! is_array( $marketplace_software['plugins'] ) || array() === $marketplace_software['plugins'] ) { |
| 61 | return false; |
| 62 | } |
| 63 | |
| 64 | $marketplace_plugins = $marketplace_software['plugins']; |
| 65 | } else { |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | $marketplace_purchases = wpcomsh_filter_marketplace_purchases_from_site_purchases(); |
| 74 | |
| 75 | if ( empty( $marketplace_purchases ) ) { |
| 76 | return false; |
| 77 | } |
| 78 | |
| 79 | foreach ( $marketplace_purchases as $marketplace_purchase ) { |
| 80 | $marketplace_plugins[] = preg_replace( array( '/(_monthly|_yearly)$/', '/_/' ), array( '', '-' ), $marketplace_purchase->product_slug ); |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | foreach ( $marketplace_plugins as $marketplace_plugin ) { |
| 85 | if ( ( 0 === strpos( $plugin_file, $marketplace_plugin . '/' ) || 0 === strpos( $plugin_file, $marketplace_plugin . '.php' ) ) ) { |
| 86 | return true; |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | return false; |
| 91 | } |
| 92 | |
| 93 | |
| 94 | |
| 95 | |
| 96 | |
| 97 | |
| 98 | function wpcomsh_filter_marketplace_purchases_from_site_purchases() { |
| 99 | $site_purchases = wpcom_get_site_purchases(); |
| 100 | |
| 101 | return array_filter( |
| 102 | $site_purchases, |
| 103 | function ( $purchase ) { |
| 104 | return in_array( $purchase->product_type, array( 'marketplace_plugin', 'saas_plugin' ), true ); |
| 105 | } |
| 106 | ); |
| 107 | } |
| 108 | |
| 109 | |
| 110 | |
| 111 | |
| 112 | |
| 113 | |
| 114 | |
| 115 | |
| 116 | |
| 117 | |
| 118 | function wpcomsh_deactivate_plugin_cap( $caps, $cap, $user_id, $args ) { |
| 119 | if ( 'deactivate_plugin' === $cap && in_array( $args[0], WPCOM_CORE_ATOMIC_PLUGINS, true ) ) { |
| 120 | $caps[] = 'do_not_allow'; |
| 121 | } |
| 122 | |
| 123 | return $caps; |
| 124 | } |
| 125 | add_filter( 'map_meta_cap', 'wpcomsh_deactivate_plugin_cap', 10, 4 ); |
| 126 | |
| 127 | |
| 128 | |
| 129 | |
| 130 | function wpcomsh_managed_plugins_action_links() { |
| 131 | foreach ( WPCOM_CORE_ATOMIC_PLUGINS as $plugin ) { |
| 132 | if ( wpcomsh_is_managed_plugin( $plugin ) ) { |
| 133 | add_filter( 'plugin_action_links_' . $plugin, 'wpcomsh_hide_plugin_deactivate_edit_links' ); |
| 134 | add_action( "after_plugin_row_{$plugin}", 'wpcomsh_show_plugin_auto_managed_notice', 10, 2 ); |
| 135 | } else { |
| 136 | add_action( 'after_plugin_row_' . $plugin, 'wpcomsh_show_unmanaged_plugin_separator', PHP_INT_MAX ); |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | foreach ( WPCOM_FEATURE_PLUGINS as $plugin ) { |
| 141 | if ( wpcomsh_is_managed_plugin( $plugin ) ) { |
| 142 | add_action( 'after_plugin_row_' . $plugin, 'wpcomsh_show_plugin_auto_managed_notice', 10, 2 ); |
| 143 | } else { |
| 144 | add_action( 'after_plugin_row_' . $plugin, 'wpcomsh_show_unmanaged_plugin_separator', PHP_INT_MAX ); |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | |
| 149 | $all_plugin_files = array_keys( get_plugins() ); |
| 150 | foreach ( $all_plugin_files as $plugin_file ) { |
| 151 | if ( ! wpcomsh_is_marketplace_plugin( $plugin_file ) ) { |
| 152 | continue; |
| 153 | } |
| 154 | |
| 155 | add_filter( 'plugin_action_links_' . $plugin_file, 'wpcomsh_hide_plugin_remove_link' ); |
| 156 | add_action( 'after_plugin_row_' . $plugin_file, 'wpcomsh_show_plugin_auto_managed_notice', 10, 2 ); |
| 157 | } |
| 158 | } |
| 159 | add_action( 'load-plugins.php', 'wpcomsh_managed_plugins_action_links' ); |
| 160 | |
| 161 | |
| 162 | |
| 163 | |
| 164 | function wpcomsh_hide_update_notice_for_managed_plugins() { |
| 165 | $plugin_files = array_keys( get_plugins() ); |
| 166 | |
| 167 | foreach ( $plugin_files as $plugin ) { |
| 168 | if ( wpcomsh_is_managed_plugin( $plugin ) ) { |
| 169 | remove_action( 'after_plugin_row_' . $plugin, 'wp_plugin_update_row' ); |
| 170 | } |
| 171 | } |
| 172 | } |
| 173 | add_action( 'load-plugins.php', 'wpcomsh_hide_update_notice_for_managed_plugins', 25 ); |
| 174 | |
| 175 | |
| 176 | |
| 177 | |
| 178 | function hide_vaultpress_from_plugin_list() { |
| 179 | global $wp_list_table; |
| 180 | unset( $wp_list_table->items['vaultpress/vaultpress.php'] ); |
| 181 | } |
| 182 | add_action( 'pre_current_active_plugins', 'hide_vaultpress_from_plugin_list' ); |
| 183 | |
| 184 | |
| 185 | |
| 186 | |
| 187 | add_filter( 'show_advanced_plugins', '__return_false' ); |
| 188 | |
| 189 | |
| 190 | |
| 191 | |
| 192 | |
| 193 | |
| 194 | |
| 195 | |
| 196 | function wpcomsh_hide_plugin_deactivate_edit_links( $links ) { |
| 197 | if ( ! is_array( $links ) ) { |
| 198 | return array(); |
| 199 | } |
| 200 | |
| 201 | unset( $links['deactivate'] ); |
| 202 | unset( $links['edit'] ); |
| 203 | |
| 204 | return $links; |
| 205 | } |
| 206 | |
| 207 | |
| 208 | |
| 209 | |
| 210 | |
| 211 | |
| 212 | |
| 213 | |
| 214 | function wpcomsh_hide_plugin_remove_link( $links ) { |
| 215 | if ( ! is_array( $links ) ) { |
| 216 | return array(); |
| 217 | } |
| 218 | |
| 219 | unset( $links['delete'] ); |
| 220 | |
| 221 | return $links; |
| 222 | } |
| 223 | |
| 224 | |
| 225 | |
| 226 | |
| 227 | |
| 228 | |
| 229 | |
| 230 | function wpcomsh_ensure_critical_plugins_active( $value ) { |
| 231 | if ( ! is_array( $value ) ) { |
| 232 | return $value; |
| 233 | } |
| 234 | |
| 235 | |
| 236 | foreach ( WPCOM_CORE_ATOMIC_PLUGINS as $critical_plugin ) { |
| 237 | if ( ! in_array( $critical_plugin, $value, true ) ) { |
| 238 | $value[] = $critical_plugin; |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | return $value; |
| 243 | } |
| 244 | add_filter( 'pre_update_option_active_plugins', 'wpcomsh_ensure_critical_plugins_active', 10, 2 ); |
| 245 | |
| 246 | |
| 247 | |
| 248 | |
| 249 | |
| 250 | |
| 251 | |
| 252 | |
| 253 | |
| 254 | |
| 255 | |
| 256 | |
| 257 | function wpcom_hide_jetpack_version_number( $plugin_meta, $plugin_file, $plugin_data ) { |
| 258 | if ( |
| 259 | is_array( $plugin_meta ) |
| 260 | && isset( $plugin_data['slug'] ) |
| 261 | && isset( $plugin_data['Version'] ) |
| 262 | && 'jetpack' === $plugin_data['slug'] |
| 263 | && false !== strpos( $plugin_meta[0], $plugin_data['Version'] ) |
| 264 | ) { |
| 265 | unset( $plugin_meta[0] ); |
| 266 | } |
| 267 | |
| 268 | return $plugin_meta; |
| 269 | } |
| 270 | add_filter( 'plugin_row_meta', 'wpcom_hide_jetpack_version_number', 10, 3 ); |
| 271 | |
| 272 | |
| 273 | |
| 274 | |
| 275 | |
| 276 | |
| 277 | |
| 278 | function wpcomsh_show_plugin_auto_managed_notice( $file, $plugin_data ) { |
| 279 | $plugin_name = 'The plugin'; |
| 280 | $active = is_plugin_active( $file ) ? ' active' : ''; |
| 281 | |
| 282 | if ( ! empty( $plugin_data['Name'] ) ) { |
| 283 | $plugin_name = $plugin_data['Name']; |
| 284 | } |
| 285 | |
| 286 | |
| 287 | $message = sprintf( __( '%s is automatically managed for you.', 'wpcomsh' ), $plugin_name ); |
| 288 | |
| 289 | if ( in_array( $file, WPCOM_FEATURE_PLUGINS, true ) ) { |
| 290 | $message = __( 'This plugin was installed by WordPress.com and provides features offered in your plan subscription.', 'wpcomsh' ); |
| 291 | } |
| 292 | |
| 293 | echo '<tr class="plugin-update-tr' . esc_attr( $active ) . '">' . |
| 294 | '<td colspan="4" class="plugin-update colspanchange">' . |
| 295 | '<div class="notice inline notice-success notice-alt">' . |
| 296 | '<p>' . esc_html( $message ) . '</p>' . |
| 297 | '</div>' . |
| 298 | '</td>' . |
| 299 | '</tr>'; |
| 300 | } |
| 301 | |
| 302 | |
| 303 | |
| 304 | |
| 305 | |
| 306 | |
| 307 | |
| 308 | function wpcomsh_show_unmanaged_plugin_separator( $file ) { |
| 309 | $active = is_plugin_active( $file ) ? 'active' : ''; |
| 310 | |
| 311 | printf( |
| 312 | '<tr class="%s"><th colspan="4" scope="row" class="check-column"></th></tr>', |
| 313 | esc_attr( $active ) |
| 314 | ); |
| 315 | } |
| 316 | |
| 317 | |
| 318 | |
| 319 | |
| 320 | |
| 321 | |
| 322 | |
| 323 | |
| 324 | |
| 325 | |
| 326 | |
| 327 | |
| 328 | |
| 329 | |
| 330 | |
| 331 | |
| 332 | function wpcomsh_maybe_remove_amp_incorrect_installation_notice() { |
| 333 | if ( wpcomsh_is_managed_plugin( 'amp/amp.php' ) ) { |
| 334 | remove_action( 'admin_notices', '_amp_incorrect_plugin_slug_admin_notice' ); |
| 335 | } |
| 336 | } |
| 337 | add_action( 'admin_head', 'wpcomsh_maybe_remove_amp_incorrect_installation_notice' ); |
| 338 | |
| 339 | |
| 340 | |
| 341 | |
| 342 | function wpcomsh_remove_vaultpress_wpadmin_notices() { |
| 343 | if ( ! class_exists( 'VaultPress' ) ) { |
| 344 | return; |
| 345 | } |
| 346 | |
| 347 | $vp_instance = VaultPress::init(); |
| 348 | |
| 349 | remove_action( 'user_admin_notices', array( $vp_instance, 'activated_notice' ) ); |
| 350 | remove_action( 'admin_notices', array( $vp_instance, 'activated_notice' ) ); |
| 351 | |
| 352 | remove_action( 'user_admin_notices', array( $vp_instance, 'connect_notice' ) ); |
| 353 | remove_action( 'admin_notices', array( $vp_instance, 'connect_notice' ) ); |
| 354 | |
| 355 | remove_action( 'user_admin_notices', array( $vp_instance, 'error_notice' ) ); |
| 356 | remove_action( 'admin_notices', array( $vp_instance, 'error_notice' ) ); |
| 357 | } |
| 358 | add_action( 'admin_head', 'wpcomsh_remove_vaultpress_wpadmin_notices', 11 ); |
| 359 | |
| 360 | |
| 361 | |
| 362 | |
| 363 | if ( wpcomsh_is_managed_plugin( 'gutenberg/gutenberg.php' ) ) { |
| 364 | add_filter( 'yoast_display_gutenberg_compat_notification', '__return_false' ); |
| 365 | } |
| 366 | |
| 367 | |
| 368 | |
| 369 | |
| 370 | |
| 371 | |
| 372 | |
| 373 | |
| 374 | |
| 375 | |
| 376 | |
| 377 | |
| 378 | function wpcomsh_auto_update_new_plugins_by_default( $pre_auto_update_plugins ) { |
| 379 | |
| 380 | |
| 381 | |
| 382 | |
| 383 | |
| 384 | |
| 385 | |
| 386 | |
| 387 | |
| 388 | if ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ) { |
| 389 | return $pre_auto_update_plugins; |
| 390 | } |
| 391 | |
| 392 | |
| 393 | $look_for_new_plugins = false; |
| 394 | |
| 395 | |
| 396 | if ( defined( 'WP_CLI' ) && WP_CLI ) { |
| 397 | $look_for_new_plugins = true; |
| 398 | } |
| 399 | |
| 400 | |
| 401 | |
| 402 | |
| 403 | |
| 404 | |
| 405 | if ( |
| 406 | doing_action( 'load-plugins.php' ) || |
| 407 | doing_action( 'load-update.php' ) || |
| 408 | doing_action( 'load-update-core.php' ) || |
| 409 | doing_action( 'wp_update_plugins' ) |
| 410 | ) { |
| 411 | $look_for_new_plugins = true; |
| 412 | } |
| 413 | |
| 414 | if ( ! $look_for_new_plugins ) { |
| 415 | return $pre_auto_update_plugins; |
| 416 | } |
| 417 | |
| 418 | |
| 419 | |
| 420 | |
| 421 | |
| 422 | |
| 423 | $filter_removed = remove_filter( 'pre_option_auto_update_plugins', __FUNCTION__ ); |
| 424 | if ( ! $filter_removed ) { |
| 425 | |
| 426 | return $pre_auto_update_plugins; |
| 427 | } |
| 428 | |
| 429 | $baseline_plugins_list = get_option( 'wpcomsh_plugins_considered_for_auto_update' ); |
| 430 | if ( ! function_exists( 'get_plugins' ) ) { |
| 431 | require_once ABSPATH . 'wp-admin/includes/plugin.php'; |
| 432 | } |
| 433 | |
| 434 | $fresh_plugins_list = array_keys( get_plugins() ); |
| 435 | $auto_update_plugins = get_option( 'auto_update_plugins', array() ); |
| 436 | |
| 437 | $skip_new_plugins = false; |
| 438 | |
| 439 | if ( false === $baseline_plugins_list && ! empty( $auto_update_plugins ) ) { |
| 440 | |
| 441 | |
| 442 | |
| 443 | |
| 444 | |
| 445 | |
| 446 | |
| 447 | $skip_new_plugins = true; |
| 448 | } |
| 449 | |
| 450 | if ( false === $baseline_plugins_list ) { |
| 451 | $baseline_plugins_list = array(); |
| 452 | } |
| 453 | |
| 454 | $new_unmanaged_plugins = array(); |
| 455 | |
| 456 | if ( ! $skip_new_plugins ) { |
| 457 | $new_plugins = array_diff( $fresh_plugins_list, $baseline_plugins_list ); |
| 458 | foreach ( $new_plugins as $new_plugin ) { |
| 459 | if ( ! wpcomsh_is_managed_plugin( $new_plugin ) ) { |
| 460 | $new_unmanaged_plugins[] = $new_plugin; |
| 461 | } |
| 462 | } |
| 463 | } |
| 464 | |
| 465 | if ( is_array( $auto_update_plugins ) && ! empty( $new_unmanaged_plugins ) ) { |
| 466 | $auto_update_plugins = array_unique( array_merge( $auto_update_plugins, $new_unmanaged_plugins ) ); |
| 467 | update_option( 'auto_update_plugins', $auto_update_plugins ); |
| 468 | } |
| 469 | |
| 470 | if ( $baseline_plugins_list != $fresh_plugins_list ) { |
| 471 | update_option( 'wpcomsh_plugins_considered_for_auto_update', $fresh_plugins_list, false ); |
| 472 | } |
| 473 | |
| 474 | return $auto_update_plugins; |
| 475 | } |
| 476 | add_filter( 'pre_option_auto_update_plugins', 'wpcomsh_auto_update_new_plugins_by_default' ); |
| 477 | |
| 478 | |
| 479 | |
| 480 | |
| 481 | |
| 482 | |
| 483 | |
| 484 | |
| 485 | |
| 486 | |
| 487 | |
| 488 | function wpcomsh_symlinked_plugins_url( $url, $path, $plugin ) { |
| 489 | $url = preg_replace( |
| 490 | '#((?<!/)/[^/]+)*/wp-content/plugins/wordpress/plugins/wpcomsh/([^/]+)/#', |
| 491 | '/wp-content/mu-plugins/wpcomsh/', |
| 492 | $url |
| 493 | ); |
| 494 | |
| 495 | if ( 'woocommerce-product-addons.php' === $plugin || 'woocommerce-gateway-stripe.php' === $plugin ) { |
| 496 | $url = home_url( '/wp-content/plugins/' . basename( $plugin, '.php' ) ); |
| 497 | } |
| 498 | |
| 499 | return $url; |
| 500 | } |
| 501 | add_filter( 'plugins_url', 'wpcomsh_symlinked_plugins_url', 0, 3 ); |
| 502 | |
| 503 | |
| 504 | |
| 505 | |
| 506 | |
| 507 | |
| 508 | function wpcomsh_atomic_managed_plugin_row_auto_update_label() { |
| 509 | |
| 510 | return __( 'Updates managed by WordPress.com', 'wpcomsh' ); |
| 511 | } |
| 512 | add_filter( 'atomic_managed_plugin_row_auto_update_label', 'wpcomsh_atomic_managed_plugin_row_auto_update_label' ); |
| 513 | |
| 514 | |
| 515 | |
| 516 | |
| 517 | |
| 518 | |
| 519 | function wpcomsh_atomic_managed_theme_template_auto_update_label() { |
| 520 | |
| 521 | return __( 'Updates managed by WordPress.com', 'wpcomsh' ); |
| 522 | } |
| 523 | add_filter( 'atomic_managed_theme_template_auto_update_label', 'wpcomsh_atomic_managed_theme_template_auto_update_label' ); |
| 524 | |
| 525 | |
| 526 | |
| 527 | |
| 528 | |
| 529 | |
| 530 | function wpcomsh_atomic_managed_plugin_auto_update_debug_label() { |
| 531 | |
| 532 | return __( 'Updates managed by WordPress.com', 'wpcomsh' ); |
| 533 | } |
| 534 | add_filter( 'atomic_managed_plugin_auto_update_debug_label', 'wpcomsh_atomic_managed_plugin_auto_update_debug_label' ); |
| 535 | |
| 536 | |
| 537 | |
| 538 | |
| 539 | |
| 540 | |
| 541 | function wpcomsh_atomic_managed_theme_auto_update_debug_label() { |
| 542 | |
| 543 | return __( 'Updates managed by WordPress.com', 'wpcomsh' ); |
| 544 | } |
| 545 | add_filter( 'atomic_managed_theme_auto_update_debug_label', 'wpcomsh_atomic_managed_theme_auto_update_debug_label' ); |
| 546 | |
| 547 | |
| 548 | |
| 549 | |
| 550 | |
| 551 | |
| 552 | |
| 553 | |
| 554 | function wpcomsh_remove_managed_plugins_from_update_plugins( $current ) { |
| 555 | if ( is_object( $current ) && isset( $current->response ) && is_array( $current->response ) ) { |
| 556 | foreach ( array_keys( $current->response ) as $plugin_key ) { |
| 557 | if ( wpcomsh_is_managed_plugin( $plugin_key ) ) { |
| 558 | unset( $current->response[ $plugin_key ] ); |
| 559 | } |
| 560 | } |
| 561 | } |
| 562 | return $current; |
| 563 | } |
| 564 | |
| 565 | add_filter( 'site_transient_update_plugins', 'wpcomsh_remove_managed_plugins_from_update_plugins' ); |
| 566 | |
| 567 | |
| 568 | |
| 569 | |
| 570 | |
| 571 | |
| 572 | |
| 573 | function wpcomsh_update_managed_plugins(): void { |
| 574 | if ( ! function_exists( 'get_plugins' ) ) { |
| 575 | require_once ABSPATH . 'wp-admin/includes/plugin.php'; |
| 576 | } |
| 577 | |
| 578 | if ( ! function_exists( 'wpcomsh_is_managed_plugin' ) ) { |
| 579 | return; |
| 580 | } |
| 581 | |
| 582 | $plugin_files = array_keys( get_plugins() ); |
| 583 | $managed_plugins = array_filter( $plugin_files, 'wpcomsh_is_managed_plugin' ); |
| 584 | |
| 585 | update_option( 'wpcomsh_at_managed_plugins', $managed_plugins ); |
| 586 | } |
| 587 | add_action( 'deleted_plugin', 'wpcomsh_update_managed_plugins', 100 ); |
| 588 | |
| 589 | |
| 590 | |
| 591 | |
| 592 | |
| 593 | |
| 594 | |
| 595 | |
| 596 | |
| 597 | function wpcomsh_handle_update_managed_plugins_list( $upgrader, $hook_extra ): void { |
| 598 | $is_plugin_operation = isset( $hook_extra['type'] ) && 'plugin' === $hook_extra['type']; |
| 599 | $is_valid_action = isset( $hook_extra['action'] ) && in_array( $hook_extra['action'], array( 'install', 'update' ), true ); |
| 600 | $is_update_action = isset( $hook_extra['action'] ) && 'update' === $hook_extra['action']; |
| 601 | $has_managed_plugins = get_option( 'wpcomsh_at_managed_plugins', false ); |
| 602 | |
| 603 | if ( $is_plugin_operation && $is_valid_action ) { |
| 604 | |
| 605 | if ( $is_update_action && $has_managed_plugins ) { |
| 606 | return; |
| 607 | } |
| 608 | |
| 609 | wpcomsh_update_managed_plugins(); |
| 610 | } |
| 611 | } |
| 612 | add_action( 'upgrader_process_complete', 'wpcomsh_handle_update_managed_plugins_list', 50, 2 ); |