The kanbanpress_board_settings_bottom
action hook allows developers to add custom content to the bottom of each board’s settings section on the KanbanPress settings page.
Example Usage
Here’s an example of how to use the kanbanpress_board_settings_bottom
hook to add a custom text input field to the bottom of each board’s settings:
PHP
// Add this to your theme's functions.php file or a custom plugin
add_action('kanbanpress_board_settings_bottom', function($index, $board) {
echo '<div class="custom-board-settings">';
echo '<label for="custom_setting_' . $index . '">Custom Setting:</label>';
echo '<input type="text" name="kanbanpress_boards[' . $index . '][custom_setting]" value="' . esc_attr($board['custom_setting'] ?? '') . '" />';
echo '</div>';
}, 10, 2);
Parameters
- $index: The index of the current board in the settings.
- $board: The array of settings for the current board.
Example
phpCopy code// Hook into kanbanpress_board_settings_bottom to add custom content
add_action('kanbanpress_board_settings_bottom', function($index, $board) {
?>
<div class="custom-board-settings">
<label for="custom_setting_<?php echo $index; ?>">Custom Setting:</label>
<input type="text" name="kanbanpress_boards[<?php echo $index; ?>][custom_setting]" value="<?php echo esc_attr($board['custom_setting'] ?? ''); ?>" />
</div>
<?php
}, 10, 2);
With this hook, you can easily extend the KanbanPress settings page to include additional custom settings for each board.