|
19 | 19 | exit(); |
20 | 20 | } |
21 | 21 |
|
22 | | -if ( ! current_user_can( 'update_core' ) && ! current_user_can( 'update_themes' ) && ! current_user_can( 'update_plugins' ) ) |
| 22 | +if ( ! current_user_can( 'update_core' ) && ! current_user_can( 'update_themes' ) && ! current_user_can( 'update_plugins' ) && ! current_user_can( 'update_languages' ) ) |
23 | 23 | wp_die( __( 'Sorry, you are not allowed to update this site.' ) ); |
24 | 24 |
|
25 | 25 | /** |
@@ -608,15 +608,19 @@ function do_undismiss_core_update() { |
608 | 608 | echo ' <a class="button" href="' . esc_url( self_admin_url('update-core.php?force-check=1') ) . '">' . __( 'Check Again' ) . '</a>'; |
609 | 609 | echo '</p>'; |
610 | 610 |
|
611 | | - if ( $core = current_user_can( 'update_core' ) ) |
| 611 | + if ( current_user_can( 'update_core' ) ) { |
612 | 612 | core_upgrade_preamble(); |
613 | | - if ( $plugins = current_user_can( 'update_plugins' ) ) |
| 613 | + } |
| 614 | + if ( current_user_can( 'update_plugins' ) ) { |
614 | 615 | list_plugin_updates(); |
615 | | - if ( $themes = current_user_can( 'update_themes' ) ) |
| 616 | + } |
| 617 | + if ( current_user_can( 'update_themes' ) ) { |
616 | 618 | list_theme_updates(); |
617 | | - if ( $core || $plugins || $themes ) |
| 619 | + } |
| 620 | + if ( current_user_can( 'update_languages' ) ) { |
618 | 621 | list_translation_updates(); |
619 | | - unset( $core, $plugins, $themes ); |
| 622 | + } |
| 623 | + |
620 | 624 | /** |
621 | 625 | * Fires after the core, plugin, and theme update tables. |
622 | 626 | * |
@@ -729,7 +733,7 @@ function do_undismiss_core_update() { |
729 | 733 |
|
730 | 734 | } elseif ( 'do-translation-upgrade' == $action ) { |
731 | 735 |
|
732 | | - if ( ! current_user_can( 'update_core' ) && ! current_user_can( 'update_plugins' ) && ! current_user_can( 'update_themes' ) ) |
| 736 | + if ( ! current_user_can( 'update_languages' ) ) |
733 | 737 | wp_die( __( 'Sorry, you are not allowed to update this site.' ) ); |
734 | 738 |
|
735 | 739 | check_admin_referer( 'upgrade-translations' ); |
|
0 commit comments