948 | | /* translators: %s: Site title. */ |
949 | | $subject = __( '[%s] Some plugins or themes were automatically updated' ); |
| 952 | if ( $successful_plugins && $successful_themes ) { |
| 953 | /* translators: %s: Site title. */ |
| 954 | $subject = __( '[%s] Some plugins and themes were automatically updated' ); |
| 955 | $body[] = sprintf( |
| 956 | /* translators: %s: Home URL. */ |
| 957 | __( 'Howdy! Some plugins and themes have been automatically updated to new versions on your site at %s. No further action is needed on your part.' ), |
| 958 | home_url() |
| 959 | ); |
| 960 | } elseif ( $successful_plugins ) { |
| 961 | /* translators: %s: Site title. */ |
| 962 | $subject = __( '[%s] Some plugins were automatically updated' ); |
| 963 | $body[] = sprintf( |
| 964 | /* translators: %s: Home URL. */ |
| 965 | __( 'Howdy! Some plugins have been automatically updated to new versions on your site at %s. No further action is needed on your part.' ), |
| 966 | home_url() |
| 967 | ); |
| 968 | } else { |
| 969 | /* translators: %s: Site title. */ |
| 970 | $subject = __( '[%s] Some themes were automatically updated' ); |
| 971 | $body[] = sprintf( |
| 972 | /* translators: %s: Home URL. */ |
| 973 | __( 'Howdy! Some themes have been automatically updated to new versions on your site at %s. No further action is needed on your part.' ), |
| 974 | home_url() |
| 975 | ); |
| 976 | } |
| 977 | |
963 | | /* translators: %s: Site title. */ |
964 | | $subject = __( '[%s] Some plugins or themes were automatically updated' ); |
965 | | $body[] = sprintf( |
966 | | /* translators: %s: Home URL. */ |
967 | | __( 'Howdy! Failures occurred when attempting to update plugins/themes on your site at %s.' ), |
968 | | home_url() |
969 | | ); |
970 | | $body[] = "\n"; |
971 | | $body[] = __( 'Please check out your site now. It’s possible that everything is working. If it says you need to update, you should do so.' ); |
972 | | $body[] = "\n"; |
| 981 | if ( $failed_plugins && $failed_themes ) { |
| 982 | /* translators: %s: Site title. */ |
| 983 | $subject = __( '[%s] Some plugins and themes have failed to update' ); |
| 984 | $body[] = sprintf( |
| 985 | /* translators: %s: Home URL. */ |
| 986 | __( 'Howdy! Failures occurred when attempting to update plugins and themes on your site at %s.' ), |
| 987 | home_url() |
| 988 | ); |
| 989 | } elseif ( $failed_plugins ) { |
| 990 | /* translators: %s: Site title. */ |
| 991 | $subject = __( '[%s] Some plugins have failed to update' ); |
| 992 | $body[] = sprintf( |
| 993 | /* translators: %s: Home URL. */ |
| 994 | __( 'Howdy! Failures occurred when attempting to update plugins on your site at %s.' ), |
| 995 | home_url() |
| 996 | ); |
| 997 | } else { |
| 998 | /* translators: %s: Site title. */ |
| 999 | $subject = __( '[%s] Some themes have failed to update' ); |
| 1000 | $body[] = sprintf( |
| 1001 | /* translators: %s: Home URL. */ |
| 1002 | __( 'Howdy! Failures occurred when attempting to update themes on your site at %s.' ), |
| 1003 | home_url() |
| 1004 | ); |
| 1005 | } |
| 1006 | |
976 | | // Get failed plugin updates. |
977 | | if ( in_array( $type, array( 'fail', 'mixed' ), true ) && ! empty( $failed_updates['plugin'] ) ) { |
978 | | $body[] = __( 'The following plugins failed to update:' ); |
979 | | // List failed updates. |
980 | | foreach ( $failed_updates['plugin'] as $item ) { |
981 | | $body[] = "- {$item->name}"; |
982 | | } |
| 1010 | if ( in_array( $type, array( 'fail', 'mixed' ), true ) ) { |
984 | | } |
985 | | // Get failed theme updates. |
986 | | if ( in_array( $type, array( 'fail', 'mixed' ), true ) && ! empty( $failed_updates['theme'] ) ) { |
987 | | $body[] = __( 'The following themes failed to update:' ); |
988 | | // List failed updates. |
989 | | foreach ( $failed_updates['theme'] as $item ) { |
990 | | $body[] = "- {$item->name}"; |
| 1012 | $body[] = __( 'Please check out your site now. It’s possible that everything is working. If it says you need to update, you should do so.' ); |
| 1013 | |
| 1014 | // List failed plugin updates. |
| 1015 | if ( ! empty( $failed_updates['plugin'] ) ) { |
| 1016 | $body[] = "\n"; |
| 1017 | $body[] = __( 'The following plugins failed to update:' ); |
| 1018 | |
| 1019 | foreach ( $failed_updates['plugin'] as $item ) { |
| 1020 | $body[] = "- {$item->name}"; |
| 1021 | } |
| 1022 | $body[] = "\n"; |
992 | | $body[] = "\n"; |
993 | | } |
994 | | // Get successful plugin updates. |
995 | | if ( in_array( $type, array( 'success', 'mixed' ), true ) && ! empty( $successful_updates['plugin'] ) ) { |
996 | | $body[] = __( 'The following plugins were successfully updated:' ); |
997 | | // List successful updates. |
998 | | foreach ( $successful_updates['plugin'] as $item ) { |
999 | | $body[] = "- {$item->name}"; |
| 1024 | |
| 1025 | // List failed theme updates. |
| 1026 | if ( ! empty( $failed_updates['theme'] ) ) { |
| 1027 | $body[] = __( 'The following themes failed to update:' ); |
| 1028 | |
| 1029 | foreach ( $failed_updates['theme'] as $item ) { |
| 1030 | $body[] = "- {$item->name}"; |
| 1031 | } |
| 1032 | $body[] = "\n"; |
1003 | | // Get successful theme updates. |
1004 | | if ( in_array( $type, array( 'success', 'mixed' ), true ) && ! empty( $successful_updates['theme'] ) ) { |
1005 | | $body[] = __( 'The following themes were successfully updated:' ); |
1006 | | // List successful updates. |
1007 | | foreach ( $successful_updates['theme'] as $item ) { |
1008 | | $body[] = "- {$item->name}"; |
| 1035 | |
| 1036 | // List successful updates. |
| 1037 | if ( in_array( $type, array( 'success', 'mixed' ), true ) ) { |
| 1038 | // List successful plugin updates. |
| 1039 | if ( ! empty( $successful_updates['plugin'] ) ) { |
| 1040 | $body[] = "\n"; |
| 1041 | $body[] = __( 'The following plugins were successfully updated:' ); |
| 1042 | |
| 1043 | foreach ( $successful_updates['plugin'] as $item ) { |
| 1044 | $body[] = "- {$item->name}"; |
| 1045 | } |
1010 | | $body[] = "\n"; |
| 1047 | |
| 1048 | // List successful theme updates. |
| 1049 | if ( ! empty( $successful_updates['theme'] ) ) { |
| 1050 | $body[] = "\n"; |
| 1051 | $body[] = __( 'The following themes were successfully updated:' ); |
| 1052 | // List successful updates. |
| 1053 | foreach ( $successful_updates['theme'] as $item ) { |
| 1054 | $body[] = "- {$item->name}"; |
| 1055 | } |
| 1056 | } |
| 1057 | } |
| 1058 | |
| 1059 | $body[] = "\n"; |
| 1060 | |
| 1061 | if ( $successful_plugins || $failed_plugins ) { |
| 1062 | $body[] = sprintf( |
| 1063 | /* translators: %s: Plugins screen URL. */ |
| 1064 | __( 'To manage plugins on your site, visit the Plugins page: %s' ), |
| 1065 | admin_url( 'plugins.php' ) |
| 1066 | ); |