WC_Admin_Log_Table_List::column_context()publicWC 1.0

Context column.

Method of the class: WC_Admin_Log_Table_List{}

No Hooks.

Return

String.

Usage

$WC_Admin_Log_Table_List = new WC_Admin_Log_Table_List();
$WC_Admin_Log_Table_List->column_context( $log );
$log(array) (required)
Log entry data.

WC_Admin_Log_Table_List::column_context() code WC 8.9.0

<?php
public function column_context( $log ) {
	$content = '';

	if ( ! empty( $log['context'] ) ) {
		ob_start();
		?>
			<button
				class="log-toggle button button-secondary button-small"
				data-log-id="<?php echo esc_attr( $log['log_id'] ); ?>"
				data-toggle-status="off"
				data-label-show="<?php esc_attr_e( 'Show context', 'woocommerce' ); ?>"
				data-label-hide="<?php esc_attr_e( 'Hide context', 'woocommerce' ); ?>"
			>
				<span class="dashicons dashicons-arrow-down-alt2"></span>
				<span class="log-toggle-label screen-reader-text"><?php esc_html_e( 'Show context', 'woocommerce' ); ?></span>
			</button>
		<?php
		$content = ob_get_clean();
	}

	return $content;
}