@@ -341,6 +341,8 @@ public function add_task_actions( $data = [], $actions = [] ) {
341341
342342 $ task_details = $ this ->get_task_details ( $ task_data );
343343
344+ $ taxonomy = \get_taxonomy ( $ term ->taxonomy );
345+
344346 $ actions [] = [
345347 'priority ' => 10 ,
346348 'html ' => \sprintf (
@@ -352,10 +354,11 @@ public function add_task_actions( $data = [], $actions = [] ) {
352354 \htmlspecialchars (
353355 \wp_json_encode (
354356 [
355- 'post_title ' => $ task_details ['post_title ' ],
356- 'target_term_id ' => $ task_data ['target_term_id ' ],
357- 'target_taxonomy ' => $ task_data ['target_taxonomy ' ],
358- 'target_term_name ' => $ task_data ['target_term_name ' ],
357+ 'post_title ' => $ task_details ['post_title ' ],
358+ 'target_term_id ' => $ task_data ['target_term_id ' ],
359+ 'target_taxonomy ' => $ task_data ['target_taxonomy ' ],
360+ 'target_taxonomy_name ' => $ taxonomy ? $ taxonomy ->label : '' ,
361+ 'target_term_name ' => $ task_data ['target_term_name ' ],
359362 ]
360363 ),
361364 ENT_QUOTES ,
@@ -393,14 +396,23 @@ public function print_popover_form_contents() {
393396 <span id="prpl-delete-term-name"></span>
394397 </p>
395398 <p style="margin: 5px 0 0 0; font-size: 12px; color: #646970;">
396- <span id="prpl-delete-term-taxonomy"></span>
399+ <?php
400+ printf (
401+ /* translators: %1$s: The taxonomy name, %2$s: The term slug */
402+ \esc_html__ ( 'You are deleting the term which belongs to the "%1$s" (slug "%2$s"). ' , 'progress-planner ' ),
403+ '<span id="prpl-delete-term-taxonomy-name"></span> ' ,
404+ '<span id="prpl-delete-term-taxonomy"></span> '
405+ );
406+ ?>
397407 </p>
398408 </div>
399409 <input type="hidden" name="term_id" id="prpl-delete-term-id" value="">
400410 <input type="hidden" name="taxonomy" id="prpl-delete-taxonomy" value="">
401- <button type="submit" class="prpl-button prpl-button-primary" id="prpl-delete-term-button">
402- <?php \esc_html_e ( 'Delete term ' , 'progress-planner ' ); ?>
403- </button>
411+ <div class="prpl-steps-nav-wrapper">
412+ <button type="submit" class="prpl-button prpl-button-primary" id="prpl-delete-term-button">
413+ <?php \esc_html_e ( 'Delete term ' , 'progress-planner ' ); ?>
414+ </button>
415+ </div>
404416 <?php
405417 }
406418
0 commit comments