WC_Admin_Webhooks_Table_List::column_title() public WC 1.0
Return title column.
{} Это метод класса: WC_Admin_Webhooks_Table_List{}
Хуки из метода
Возвращает
Строку.
Использование
$WC_Admin_Webhooks_Table_List = new WC_Admin_Webhooks_Table_List(); $WC_Admin_Webhooks_Table_List->column_title( $webhook );
- $webhook(WC_Webhook) (обязательный)
- Webhook instance.
Код WC_Admin_Webhooks_Table_List::column_title() WC Admin Webhooks Table List::column title WC 5.0.0
public function column_title( $webhook ) {
$edit_link = admin_url( 'admin.php?page=wc-settings&tab=advanced&section=webhooks&edit-webhook=' . $webhook->get_id() );
$output = '';
// Title.
$output .= '<strong><a href="' . esc_url( $edit_link ) . '" class="row-title">' . esc_html( $webhook->get_name() ) . '</a></strong>';
// Get actions.
$actions = array(
/* translators: %s: webhook ID. */
'id' => sprintf( __( 'ID: %d', 'woocommerce' ), $webhook->get_id() ),
'edit' => '<a href="' . esc_url( $edit_link ) . '">' . esc_html__( 'Edit', 'woocommerce' ) . '</a>',
/* translators: %s: webhook name */
'delete' => '<a class="submitdelete" aria-label="' . esc_attr( sprintf( __( 'Delete "%s" permanently', 'woocommerce' ), $webhook->get_name() ) ) . '" href="' . esc_url(
wp_nonce_url(
add_query_arg(
array(
'delete' => $webhook->get_id(),
),
admin_url( 'admin.php?page=wc-settings&tab=advanced§ion=webhooks' )
),
'delete-webhook'
)
) . '">' . esc_html__( 'Delete permanently', 'woocommerce' ) . '</a>',
);
$actions = apply_filters( 'webhook_row_actions', $actions, $webhook );
$row_actions = array();
foreach ( $actions as $action => $link ) {
$row_actions[] = '<span class="' . esc_attr( $action ) . '">' . $link . '</span>';
}
$output .= '<div class="row-actions">' . implode( ' | ', $row_actions ) . '</div>';
return $output;
}