options_repository = $options_repository; } /** * Render the table, or a notice when there is nothing to show. * * @since 1.0.0 */ public function display(): void { $rules = $this->get_sorted_rules(); if (empty($rules)) { echo '
' . esc_html__('No rules found. Try creating some rules first.', 'ads-destroyer') . '
| ' . esc_html__('Active', 'ads-destroyer') . ' | '; echo '' . esc_html__('XPath Rule', 'ads-destroyer') . ' | '; echo '' . esc_html__('Page Info', 'ads-destroyer') . ' | '; echo '' . esc_html__('Info', 'ads-destroyer') . ' | '; echo '' . esc_html__('Actions', 'ads-destroyer') . ' | '; echo '
|---|---|---|---|---|
| ' . $this->render_active_cell($rule) . ' | '; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Cell methods return escaped HTML echo '' . $this->render_xpath_cell($rule) . ' | '; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Cell methods return escaped HTML echo '' . $this->render_page_cell($rule) . ' | '; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Cell methods return escaped HTML echo '' . $this->render_info_cell($rule) . ' | '; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Cell methods return escaped HTML echo '' . $this->render_actions_cell($rule) . ' | '; echo '
' . esc_html((string) ($rule['xpath'] ?? '')) . '';
$output .= '