diff --git a/src/wp-admin/includes/class-wp-ms-themes-list-table.php b/src/wp-admin/includes/class-wp-ms-themes-list-table.php
index 11ef7391de..c121d58769 100644
|
a
|
b
|
class WP_MS_Themes_List_Table extends WP_List_Table { |
| 742 | 742 | |
| 743 | 743 | $url = add_query_arg( $query_args, 'themes.php' ); |
| 744 | 744 | |
| 745 | | printf( |
| | 745 | $theme_auto_update_content[] = sprintf( |
| 746 | 746 | '<a href="%s" class="toggle-auto-update" data-wp-action="%s">', |
| 747 | 747 | wp_nonce_url( $url, 'updates' ), |
| 748 | 748 | $action |
| 749 | 749 | ); |
| 750 | 750 | |
| 751 | | echo '<span class="dashicons dashicons-update spin hidden"></span>'; |
| 752 | | echo '<span class="label">' . $text . '</span>'; |
| 753 | | echo '</a>'; |
| | 751 | $theme_auto_update_content[] = '<span class="dashicons dashicons-update spin hidden"></span>'; |
| | 752 | $theme_auto_update_content[] = '<span class="label">' . $text . '</span>'; |
| | 753 | $theme_auto_update_content[] = '</a>'; |
| 754 | 754 | |
| 755 | 755 | $available_updates = get_site_transient( 'update_themes' ); |
| 756 | 756 | if ( isset( $available_updates->response[ $stylesheet ] ) ) { |
| 757 | | printf( |
| | 757 | $theme_auto_update_content[] = sprintf( |
| 758 | 758 | '<div class="auto-update-time%s">%s</div>', |
| 759 | 759 | $time_class, |
| 760 | 760 | wp_get_auto_update_message() |
| 761 | 761 | ); |
| 762 | 762 | } |
| | 763 | |
| | 764 | /** |
| | 765 | * Filters the content of the auto-updates column for each theme in the Themes list table. |
| | 766 | * |
| | 767 | * @since 5.5.0 |
| | 768 | * |
| | 769 | * @param string[] $theme_auto_update_content An array of the theme’s auto-update column content, |
| | 770 | * including toggle auto-update action links and time to |
| | 771 | * next update. |
| | 772 | * @param string $stylesheet Directory name of the theme. |
| | 773 | * @param WP_Theme $theme WP_Theme object. |
| | 774 | * @param string $status Status of the theme. |
| | 775 | */ |
| | 776 | $theme_auto_update_content = apply_filters( 'theme_auto_update_content', $theme_auto_update_content, $stylesheet, $theme, $status ); |
| | 777 | echo implode( '', $theme_auto_update_content ); |
| | 778 | |
| 763 | 779 | echo '<div class="auto-updates-error inline notice error hidden"><p></p></div>'; |
| 764 | 780 | } |
| 765 | 781 | |
diff --git a/src/wp-admin/includes/class-wp-plugins-list-table.php b/src/wp-admin/includes/class-wp-plugins-list-table.php
index 12793e810e..de95dcd153 100644
|
a
|
b
|
class WP_Plugins_List_Table extends WP_List_Table { |
| 1041 | 1041 | |
| 1042 | 1042 | echo "<td class='column-auto-updates{$extra_classes}'>"; |
| 1043 | 1043 | |
| | 1044 | $plugin_auto_update_content = array(); |
| | 1045 | |
| 1044 | 1046 | if ( in_array( $plugin_file, $auto_updates, true ) ) { |
| 1045 | 1047 | $text = __( 'Disable auto-updates' ); |
| 1046 | 1048 | $action = 'disable'; |
| … |
… |
class WP_Plugins_List_Table extends WP_List_Table { |
| 1060 | 1062 | |
| 1061 | 1063 | $url = add_query_arg( $query_args, 'plugins.php' ); |
| 1062 | 1064 | |
| 1063 | | printf( |
| | 1065 | $plugin_auto_update_content[] = sprintf( |
| 1064 | 1066 | '<a href="%s" class="toggle-auto-update" data-wp-action="%s">', |
| 1065 | 1067 | wp_nonce_url( $url, 'updates' ), |
| 1066 | 1068 | $action |
| 1067 | 1069 | ); |
| 1068 | 1070 | |
| 1069 | | echo '<span class="dashicons dashicons-update spin hidden"></span>'; |
| 1070 | | echo '<span class="label">' . $text . '</span>'; |
| 1071 | | echo '</a>'; |
| | 1071 | $plugin_auto_update_content[] = '<span class="dashicons dashicons-update spin hidden"></span>'; |
| | 1072 | $plugin_auto_update_content[] = '<span class="label">' . $text . '</span>'; |
| | 1073 | $plugin_auto_update_content[] = '</a>'; |
| 1072 | 1074 | |
| 1073 | 1075 | $available_updates = get_site_transient( 'update_plugins' ); |
| 1074 | 1076 | |
| 1075 | 1077 | if ( isset( $available_updates->response[ $plugin_file ] ) ) { |
| 1076 | | printf( |
| | 1078 | $plugin_auto_update_content[] = sprintf( |
| 1077 | 1079 | '<div class="auto-update-time%s">%s</div>', |
| 1078 | 1080 | $time_class, |
| 1079 | 1081 | wp_get_auto_update_message() |
| 1080 | 1082 | ); |
| 1081 | 1083 | } |
| 1082 | 1084 | |
| | 1085 | /** |
| | 1086 | * Filters the content of the auto-updates column for each plugin in the Plugins list table. |
| | 1087 | * |
| | 1088 | * @since 5.5.0 |
| | 1089 | * |
| | 1090 | * @param string[] $plugin_auto_update_content An array of the plugin's auto-update column content, |
| | 1091 | * including toggle auto-update action links and time to |
| | 1092 | * next update. |
| | 1093 | * @param string $plugin_file Path to the plugin file relative to the plugins directory. |
| | 1094 | * @param array $plugin_data An array of plugin data. |
| | 1095 | * @param string $status Status of the plugin. Defaults are 'All', 'Active', |
| | 1096 | * 'Inactive', 'Recently Activated', 'Upgrade', 'Must-Use', |
| | 1097 | * 'Drop-ins', 'Search', 'Paused'. |
| | 1098 | */ |
| | 1099 | $plugin_auto_update_content = apply_filters( 'plugin_auto_update_content', $plugin_auto_update_content, $plugin_file, $plugin_data, $status ); |
| | 1100 | echo implode( '', $plugin_auto_update_content ); |
| | 1101 | |
| 1083 | 1102 | echo '<div class="inline notice error hidden"><p></p></div>'; |
| 1084 | 1103 | echo '</td>'; |
| 1085 | 1104 | |