WP_Links_List_Table::column_cb
Handles the checkbox column output.
Метод класса: WP_Links_List_Table{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$WP_Links_List_Table = new WP_Links_List_Table(); $WP_Links_List_Table->column_cb( $item );
- $item(объект) (обязательный)
- The current link object.
Список изменений
| С версии 4.3.0 | Введена. |
| С версии 5.9.0 | Renamed $link to $item to match parent class for PHP 8 named parameter support. |
Код WP_Links_List_Table::column_cb() WP Links List Table::column cb WP 6.9
<?php
public function column_cb( $item ) {
// Restores the more descriptive, specific name for use within this method.
$link = $item;
?>
<input type="checkbox" name="linkcheck[]" id="cb-select-<?php echo $link->link_id; ?>" value="<?php echo esc_attr( $link->link_id ); ?>" />
<label for="cb-select-<?php echo $link->link_id; ?>">
<span class="screen-reader-text">
<?php
/* translators: Hidden accessibility text. %s: Link name. */
printf( __( 'Select %s' ), $link->link_name );
?>
</span>
</label>
<?php
}