@@ -349,6 +349,8 @@ public function add_task_actions( $data = [], $actions = [] ) {
349349
350350 $ task_details = $ this ->get_task_details ( $ task_data );
351351
352+ $ taxonomy = \get_taxonomy ( $ term ->taxonomy );
353+
352354 $ actions [] = [
353355 'priority ' => 10 ,
354356 'html ' => \sprintf (
@@ -360,10 +362,11 @@ public function add_task_actions( $data = [], $actions = [] ) {
360362 \htmlspecialchars (
361363 \wp_json_encode (
362364 [
363- 'post_title ' => $ task_details ['post_title ' ],
364- 'target_term_id ' => $ task_data ['target_term_id ' ],
365- 'target_taxonomy ' => $ task_data ['target_taxonomy ' ],
366- 'target_term_name ' => $ task_data ['target_term_name ' ],
365+ 'post_title ' => $ task_details ['post_title ' ],
366+ 'target_term_id ' => $ task_data ['target_term_id ' ],
367+ 'target_taxonomy ' => $ task_data ['target_taxonomy ' ],
368+ 'target_taxonomy_name ' => $ taxonomy ? $ taxonomy ->label : '' ,
369+ 'target_term_name ' => $ task_data ['target_term_name ' ],
367370 ]
368371 ),
369372 ENT_QUOTES ,
@@ -401,14 +404,23 @@ public function print_popover_form_contents() {
401404 <span id="prpl-delete-term-name"></span>
402405 </p>
403406 <p style="margin: 5px 0 0 0; font-size: 12px; color: #646970;">
404- <span id="prpl-delete-term-taxonomy"></span>
407+ <?php
408+ printf (
409+ /* translators: %1$s: The taxonomy name, %2$s: The term slug */
410+ \esc_html__ ( 'You are deleting the term which belongs to the "%1$s" (slug "%2$s"). ' , 'progress-planner ' ),
411+ '<span id="prpl-delete-term-taxonomy-name"></span> ' ,
412+ '<span id="prpl-delete-term-taxonomy"></span> '
413+ );
414+ ?>
405415 </p>
406416 </div>
407417 <input type="hidden" name="term_id" id="prpl-delete-term-id" value="">
408418 <input type="hidden" name="taxonomy" id="prpl-delete-taxonomy" value="">
409- <button type="submit" class="prpl-button prpl-button-primary" id="prpl-delete-term-button">
410- <?php \esc_html_e ( 'Delete term ' , 'progress-planner ' ); ?>
411- </button>
419+ <div class="prpl-steps-nav-wrapper">
420+ <button type="submit" class="prpl-button prpl-button-primary" id="prpl-delete-term-button">
421+ <?php \esc_html_e ( 'Delete term ' , 'progress-planner ' ); ?>
422+ </button>
423+ </div>
412424 <?php
413425 }
414426
0 commit comments