diff --git a/src/Git_Updater/Base.php b/src/Git_Updater/Base.php index 3917242a4..7faed0084 100644 --- a/src/Git_Updater/Base.php +++ b/src/Git_Updater/Base.php @@ -621,6 +621,8 @@ public function get_update_url( $type, $action, $repo_name ) { /** * Add git host based icons. * + * @hooked theme_row_meta + * * @param array $links Row meta action links. * @param string $file Plugin or theme file. * @@ -635,6 +637,21 @@ public function row_meta_icons( $links, $file ) { return $links; } + /** + * Append the GitHub icon to the auto-updates column text. + * + * @hooked plugin_auto_update_setting_html + * @see \WP_Plugins_List_Table::single_row() + * + * @param string $html The existing HTML for the plugins.php Automatic Updates column. + * @param string $file Plugin or theme file. + * + * @return string + */ + public function plugin_auto_update_setting_html( $html, $file ) { + return $html . ' | ' . $this->get_git_icon( $file, false ); + } + /** * Get git host based icon as an HTML img element. * diff --git a/src/Git_Updater/Init.php b/src/Git_Updater/Init.php index 84e671435..06a31f197 100644 --- a/src/Git_Updater/Init.php +++ b/src/Git_Updater/Init.php @@ -92,7 +92,7 @@ function () { add_filter( 'upgrader_source_selection', [ $this->base, 'upgrader_source_selection' ], 10, 4 ); // Add git host icons. - add_filter( 'plugin_row_meta', [ $this->base, 'row_meta_icons' ], 15, 2 ); + add_filter( 'plugin_auto_update_setting_html', [ $this->base, 'plugin_auto_update_setting_html' ], 15, 2 ); add_filter( 'theme_row_meta', [ $this->base, 'row_meta_icons' ], 15, 2 ); // Check for deletion of cron event.