948 | | /* translators: %s: Site title. */ |
949 | | $subject = __( '[%s] Some plugins or themes were automatically updated' ); |
| 953 | if ( $successful_plugins && $successful_themes ) { |
| 954 | /* translators: %s: Site title. */ |
| 955 | $subject = __( '[%s] Some plugins and themes have automatically updated' ); |
| 956 | $body[] = sprintf( |
| 957 | /* translators: %s: Home URL. */ |
| 958 | __( 'Howdy! Some plugins and themes have automatically updated to their latest versions on your site at %s. No further action is needed on your part.' ), |
| 959 | home_url() |
| 960 | ); |
| 961 | } elseif ( $successful_plugins ) { |
| 962 | /* translators: %s: Site title. */ |
| 963 | $subject = __( '[%s] Some plugins were automatically updated' ); |
| 964 | $body[] = sprintf( |
| 965 | /* translators: %s: Home URL. */ |
| 966 | __( 'Howdy! Some plugins have automatically updated to their latest versions on your site at %s. No further action is needed on your part.' ), |
| 967 | home_url() |
| 968 | ); |
| 969 | } else { |
| 970 | /* translators: %s: Site title. */ |
| 971 | $subject = __( '[%s] Some themes were automatically updated' ); |
| 972 | $body[] = sprintf( |
| 973 | /* translators: %s: Home URL. */ |
| 974 | __( 'Howdy! Some themes have automatically updated to their latest versions on your site at %s. No further action is needed on your part.' ), |
| 975 | home_url() |
| 976 | ); |
| 977 | } |
| 978 | |
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"; |
| 982 | if ( $failed_plugins && $failed_themes ) { |
| 983 | /* translators: %s: Site title. */ |
| 984 | $subject = __( '[%s] Some plugins and themes have failed to update' ); |
| 985 | $body[] = sprintf( |
| 986 | /* translators: %s: Home URL. */ |
| 987 | __( 'Howdy! Plugins and themes failed to update on your site at %s.' ), |
| 988 | home_url() |
| 989 | ); |
| 990 | } elseif ( $failed_plugins ) { |
| 991 | /* translators: %s: Site title. */ |
| 992 | $subject = __( '[%s] Some plugins have failed to update' ); |
| 993 | $body[] = sprintf( |
| 994 | /* translators: %s: Home URL. */ |
| 995 | __( 'Howdy! Plugins failed to update on your site at %s.' ), |
| 996 | home_url() |
| 997 | ); |
| 998 | } else { |
| 999 | /* translators: %s: Site title. */ |
| 1000 | $subject = __( '[%s] Some themes have failed to update' ); |
| 1001 | $body[] = sprintf( |
| 1002 | /* translators: %s: Home URL. */ |
| 1003 | __( 'Howdy! Themes failed to update on your site at %s.' ), |
| 1004 | home_url() |
| 1005 | ); |
| 1006 | } |
| 1007 | |
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 | | } |
| 1011 | 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}"; |
991 | | } |
| 1013 | $body[] = __( 'Please check out your site now. It’s possible that everything is working. If there are updates available, you should update.' ); |
| 1015 | |
| 1016 | // List failed plugin updates. |
| 1017 | if ( ! empty( $failed_updates['plugin'] ) ) { |
| 1018 | $body[] = __( 'These plugins failed to update:' ); |
| 1019 | |
| 1020 | foreach ( $failed_updates['plugin'] as $item ) { |
| 1021 | $body[] = "- {$item->name}"; |
| 1022 | } |
| 1023 | $body[] = "\n"; |
| 1024 | } |
| 1025 | |
| 1026 | // List failed theme updates. |
| 1027 | if ( ! empty( $failed_updates['theme'] ) ) { |
| 1028 | $body[] = __( 'These themes failed to update:' ); |
| 1029 | |
| 1030 | foreach ( $failed_updates['theme'] as $item ) { |
| 1031 | $body[] = "- {$item->name}"; |
| 1032 | } |
| 1033 | $body[] = "\n"; |
| 1034 | } |
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}"; |
| 1036 | |
| 1037 | // List successful updates. |
| 1038 | if ( in_array( $type, array( 'success', 'mixed' ), true ) ) { |
| 1039 | $body[] = "\n"; |
| 1040 | |
| 1041 | // List successful plugin updates. |
| 1042 | if ( ! empty( $successful_updates['plugin'] ) ) { |
| 1043 | $body[] = __( 'These plugins are now up to date:' ); |
| 1044 | |
| 1045 | foreach ( $successful_updates['plugin'] as $item ) { |
| 1046 | $body[] = "- {$item->name}"; |
| 1047 | } |
| 1048 | $body[] = "\n"; |
| 1050 | |
| 1051 | // List successful theme updates. |
| 1052 | if ( ! empty( $successful_updates['theme'] ) ) { |
| 1053 | $body[] = __( 'These themes are now up to date:' ); |
| 1054 | // List successful updates. |
| 1055 | foreach ( $successful_updates['theme'] as $item ) { |
| 1056 | $body[] = "- {$item->name}"; |
| 1057 | } |
| 1058 | $body[] = "\n"; |
| 1059 | } |
| 1060 | } |
| 1061 | |
| 1062 | if ( $failed_plugins ) { |
| 1063 | $body[] = sprintf( |
| 1064 | /* translators: %s: Plugins screen URL. */ |
| 1065 | __( 'To manage plugins on your site, visit the Plugins page: %s' ), |
| 1066 | admin_url( 'plugins.php' ) |
| 1067 | ); |
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}"; |
1009 | | } |
| 1070 | |
| 1071 | if ( $failed_themes ) { |
| 1072 | $body[] = sprintf( |
| 1073 | /* translators: %s: Themes screen URL. */ |
| 1074 | __( 'To manage themes on your site, visit the Themes page: %s' ), |
| 1075 | admin_url( 'themes.php' ) |
| 1076 | ); |