【问题标题】:input type checkbox cannot check输入类型复选框无法检查
【发布时间】:2018-04-20 16:38:57
【问题描述】:

我创建了一个函数来删除列表中的链接并更改为输入类型复选框,但我的复选框不起作用并且无法选中

add_filter ('wpdatatables_filter_link_cell', 'wp_filter_link_cell', 2 );

function wp_filter_link_cell( $formattedValue ){

    $formattedValue = strip_tags($formttedValue);

    return '<input type="checkbox">' . $formattedValue . '</br>';
}

【问题讨论】:

  • 您的复选框没有任何其他属性,请阅读 html 复选框上的一些文档

标签: php wordpress function checkbox input


【解决方案1】:

此过滤器用于处理 URL 链接的值,而不是它的输入类型。

wpdatatables_filter_link_cell( $formattedValue, $tableId )
This filter is applied to the value of an URL link column before it is passed to the front-end.This description provided by your plugin.

$formattedValue is the value of the cell.

$tableId is the table identifier from the MySQL table (wp_wpdatatables).

请从您的插件URL 中查看有关此过滤器的更多信息

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2010-12-02
    • 2018-08-13
    • 2015-04-13
    • 1970-01-01
    • 2022-11-25
    • 1970-01-01
    • 2015-06-03
    • 1970-01-01
    相关资源
    最近更新 更多