diff --git a/wp-content/plugins/embl-taxonomy/assets/embl-taxonomy.js b/wp-content/plugins/embl-taxonomy/assets/embl-taxonomy.js index 3e3f72236..7febe9936 100644 --- a/wp-content/plugins/embl-taxonomy/assets/embl-taxonomy.js +++ b/wp-content/plugins/embl-taxonomy/assets/embl-taxonomy.js @@ -171,7 +171,7 @@ document.addEventListener('DOMContentLoaded', function() { const urlParams = new URLSearchParams(window.location.search); if (urlParams.has('filter') && urlParams.get('filter') === 'deprecated') { // Change button text and URL - showDeprecatedButton.textContent = 'View All Terms'; + showDeprecatedButton.textContent = 'See all taxonomy terms'; showDeprecatedButton.setAttribute('data-href', `${emblTaxonomySettings.adminUrl}edit-tags.php?taxonomy=${emblTaxonomySettings.taxonomyName}`); } diff --git a/wp-content/plugins/embl-taxonomy/includes/register.php b/wp-content/plugins/embl-taxonomy/includes/register.php index ae7a31c40..067d93818 100644 --- a/wp-content/plugins/embl-taxonomy/includes/register.php +++ b/wp-content/plugins/embl-taxonomy/includes/register.php @@ -714,20 +714,20 @@ public function action_admin_notices() { } // Sync happened (all pages) - if (($now - $modified) <= 10) { - printf('

%2$s

', - esc_attr('notice notice-success'), - esc_html(sprintf( - __('%1$s was recently synced.', 'embl'), - $this->labels['name'] - )) - ); - $notice = true; - } + // if (($now - $modified) <= 10) { + // printf('

%2$s

', + // esc_attr('notice notice-success'), + // esc_html(sprintf( + // __('%1$s was recently synced.', 'embl'), + // $this->labels['name'] + // )) + // ); + // $notice = true; + // } // Manual sync notice (edit taxonomy page only) if ( current_user_can( 'administrator' ) ) { - if ( ! $notice && function_exists('get_current_screen')) { + if ( function_exists('get_current_screen')) { $screen = get_current_screen(); if ($screen->id === 'edit-embl_taxonomy') { if (isset($_GET['synced']) && $_GET['synced'] === 'true') { @@ -757,7 +757,13 @@ public function action_admin_notices() { $deprecated_count = $this->get_deprecated_terms_count(); // Assume this function returns count of deprecated terms if ( function_exists('get_current_screen')) { $screen = get_current_screen(); - if ($screen->id === 'edit-embl_taxonomy') { + if ($screen->id === 'edit-embl_taxonomy') { + if (isset($_GET['delete-deprecated']) && $_GET['delete-deprecated'] === 'true') { + printf('

%2$s

', + esc_attr('notice notice-success'), + __('Deprecated terms have been deleted.', 'embl') + ); + } if ($deprecated_count > 0) { printf('

%2$s %3$s %4$s

', esc_attr('notice notice-warning'), @@ -768,7 +774,7 @@ public function action_admin_notices() { sprintf( '', esc_attr('edit-tags.php?taxonomy=' . EMBL_Taxonomy::TAXONOMY_NAME . '&filter=deprecated'), - esc_html(__('View all deprecated terms', 'embl')) + esc_html(__('See all deprecated terms', 'embl')) ), sprintf( '',