Skip to content

Commit e61ca98

Browse files
committed
shorten it
1 parent f2c3b48 commit e61ca98

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

classes/suggested-tasks/providers/class-tasks.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -643,11 +643,7 @@ public function get_task_actions( $data = [] ) {
643643
'priority' => 40,
644644
'html' => '<a class="prpl-tooltip-action-text" href="' . \esc_attr( $this->get_external_link_url() ) . '" target="_blank">' . \esc_html__( 'Why is this important?', 'progress-planner' ) . '</a>',
645645
];
646-
} elseif ( isset( $data['content']['rendered'] )
647-
&& $data['content']['rendered'] !== ''
648-
// Check if the object is an instance of Tasks_Interactive.
649-
&& ! $this instanceof Tasks_Interactive
650-
) {
646+
} elseif ( isset( $data['content']['rendered'] ) && $data['content']['rendered'] !== '' && ! $this instanceof Tasks_Interactive ) {
651647
$actions[] = [
652648
'priority' => 40,
653649
'html' => '<prpl-tooltip><slot name="open"><button type="button" class="prpl-suggested-task-button" data-task-id="' . \esc_attr( $data['meta']['prpl_task_id'] ) . '" data-task-title="' . \esc_attr( $data['title']['rendered'] ) . '" data-action="info" data-target="info" title="' . \esc_html__( 'Info', 'progress-planner' ) . '"><span class="prpl-tooltip-action-text">' . \esc_html__( 'Info', 'progress-planner' ) . '</span><span class="screen-reader-text">' . \esc_html__( 'Info', 'progress-planner' ) . '</span></button></slot><slot name="content">' . \wp_kses_post( $data['content']['rendered'] ) . '</slot></prpl-tooltip>',

0 commit comments

Comments
 (0)