@@ -56,6 +56,13 @@ abstract class Tasks implements Tasks_Interface {
5656 */
5757 const IS_INTERACTIVE = false ;
5858
59+ /**
60+ * The popover ID for interactive tasks.
61+ *
62+ * @var string
63+ */
64+ const POPOVER_ID = '' ;
65+
5966 /**
6067 * Whether the task is repetitive.
6168 *
@@ -126,13 +133,6 @@ abstract class Tasks implements Tasks_Interface {
126133 */
127134 protected $ data_collector = null ;
128135
129- /**
130- * The popover ID for interactive tasks.
131- *
132- * @var string
133- */
134- protected $ popover_id = '' ;
135-
136136 /**
137137 * Constructor.
138138 *
@@ -581,7 +581,7 @@ protected function transform_collector_data( array $data ): array {
581581 */
582582 public function add_popover () {
583583 ?>
584- <div id="prpl-popover-<?php echo \esc_attr ( $ this -> popover_id ); ?> " class="prpl-popover prpl-popover-interactive" popover>
584+ <div id="prpl-popover-<?php echo \esc_attr ( static :: POPOVER_ID ); ?> " class="prpl-popover prpl-popover-interactive" popover>
585585 <?php $ this ->the_popover_content (); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
586586 </div>
587587 <?php
@@ -594,9 +594,9 @@ public function add_popover() {
594594 */
595595 public function the_popover_content () {
596596 \progress_planner ()->the_view (
597- " popovers/ { $ this -> popover_id } . php" ,
597+ ' popovers/ ' . static :: POPOVER_ID . ' . php' ,
598598 [
599- 'prpl_popover_id ' => $ this -> popover_id ,
599+ 'prpl_popover_id ' => static :: POPOVER_ID ,
600600 'prpl_provider_id ' => $ this ->get_provider_id (),
601601 ]
602602 );
0 commit comments