Automattic\WooCommerce\Internal\ProductDownloads\ApprovedDirectories\Admin

UI::display_title()privateWC 1.0

Displays the screen title, etc.

Метод класса: UI{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

// private - только в коде основоного (родительского) класса
$result = $this->display_title();

Код UI::display_title() 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
}