Automattic\WooCommerce\Internal\ProductDownloads\ApprovedDirectories\Admin

UI::display_title()privateWC 1.0

Displays the screen title, etc.

Method of the class: UI{}

No Hooks.

Return

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->display_title();

UI::display_title() code WC 8.7.0

<?php
private function display_title() {
	$turn_on_off = $this->register->get_mode() === Register::MODE_ENABLED
		? '<a href="' . esc_url( $this->table->get_action_url( 'turn-off', 0 ) ) . '" class="page-title-action">' . esc_html_x( 'Stop Enforcing Rules', 'Approved product download directories', 'woocommerce' ) . '</a>'
		: '<a href="' . esc_url( $this->table->get_action_url( 'turn-on', 0 ) ) . '" class="page-title-action">' . esc_html_x( 'Start Enforcing Rules', 'Approved product download directories', 'woocommerce' ) . '</a>';

	?>
		<h2 class='wc-table-list-header'>
			<?php esc_html_e( 'Approved Download Directories', 'woocommerce' ); ?>
			<a href='<?php echo esc_url( $this->table->get_action_url( 'edit', 0 ) ); ?>' class='page-title-action'><?php esc_html_e( 'Add New', 'woocommerce' ); ?></a>
			<?php echo $turn_on_off; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
		</h2>
	<?php
}