-
Hooks
-
-
- wpdatatables_before_get_table_metadata
- wpdatatables_before_render_table
- wpdatatables_before_render_table_config_data
- wpdatatables_after_save_table
- wpdatatables_try_generate_table
- wpdatatables_get_ajax_data
- wpdatatables_before_filtering_form
- wpdatatables_after_filtering_form
- wpdatatables_before_table
- wpdatatables_after_table
- wpdatatables_after_header
- wpdatatables_before_header
- wpdatatables_before_footer
- wpdatatables_after_last_row
- wpdatatables_before_row
- wpdatatables_after_row
- Show Remaining Articles (6) Collapse Articles
-
- wpdatatables_after_save_settings
- wpdatatables_settings_page
- wpdatatables_browse_page
- wpdatatables_support_page
- wpdatatables_welcome_page
- wpdatatables_system_info_page
- wpdatatables_getting_started_page
- wpdatatables_addons_page
- wpdatatables_constructor_page
- wpdatatables_dashboard_page
- wpdatatables_admin_before_edit
- wpdatatables_admin_before_edit_simple_table
- Show Remaining Articles (2) Collapse Articles
-
- Articles coming soon
-
-
-
- wpdatatables_filter_table_metadata
- wpdatatables_filter_rendered_table
- wpdatatables_try_generate_table_result
- wpdatatables_filter_insert_table_array
- wpdatatables_filter_browse_tables
- wpdatatables_filter_mysql_query
- wpdatatables_filter_json
- wpdatatables_filter_excel_array
- wpdatatables_filter_table_description
- wpdatatables_filter_cell_val
- wpdatatables_filter_simplexml
- wpdatatables_filter_date_cell
- wpdatatables_filter_datetime_cell
- wpdatatables_filter_time_cell
- wpdatatables_filter_email_cell
- wpdatatables_filter_int_cell
- wpdatatables_filter_float_cell
- wpdatatables_filter_image_cell
- wpdatatables_filter_link_cell
- wpdatatables_filter_string_cell
- wpdatatables_before_generate_constructed_table_name
- wpdatatables_filter_table_title
- wpdatatables_filter_server_side_data
- wpdatatables_filter_table_cssClassArray
- wpdatatables_filter_query_before_limit
- wpdatatables_filter_initial_table_construct
- wpdatatables_before_create_manual_table
- wpdatatables_before_preview_file_table
- wpdatatables_before_read_file_data
- wpdatatables_query_before_save_frontend
- wpdatatables_before_generate_manual_table
- wpdatatables_add_default_columns
- wpdatatables_insert_additional_column_header
- wpdatatables_filter_column_metadata
- wpdatatables_filter_init_table_data
- wpdatatables_filter_nested_json_endpoint_args
- wpdatatables_get_one_level_deep_json_data_from_array_as_string
- wpdatatables_set_one_level_deep_json_data_separator
- wpdatatables_filter_nested_json_final_array
- wpdatatables_curl_get_data
- wpdatatables_curl_get_data_complete
- wpdatatables_filter_source_data_on_auto_update_cache
- wpdatatables_excel_filter_table_template
- wpdatatables_excel_filter_table_description
- wpdatatables_add_class_to_table_html_element
- Show Remaining Articles (35) Collapse Articles
-
- wpdatatables_filter_columns_metadata
- wpdatatables_filter_column_before_save
- wpdatatables_filter_update_column_array
- wpdatatables_filter_insert_column_array
- wpdatatables_filter_column_cssClassArray
- wpdatatables_filter_column_js_definition
- wpdatatables_filter_column_options
- wpdatatables_columns_types_array
- wpdatatables_columns_not_in_source
- wpdatatables_filter_column_config_object
- wpdatatables_filter_column_description_object
- wpdatatables_insert_additional_column_value
- wpdatatables_filter_column_title
- wpdatatables_filter_filtering_default_value
- wpdatatables_filter_editing_default_value
- wpdatatables_column_formatter_file_name
- wpdatatables_extend_column_js_definition
- wpdatatables_cell_filter_column_key
- wpdatatables_cell_filter_column_id_value
- wpdatatables_cell_filter_column_id
- Show Remaining Articles (10) Collapse Articles
-
- wpdatatables_filter_style_block
- wpdatatables_filter_frontend_formdata
- wpdatatables_allow_edit_table
- wpdatatables_filter_formdata_before_save
- wpdatatables_excel_filter_frontend_formdata
- wpdatatables_filter_excel_editor_query
- wpdatatables_excel_filter_delete_rows
- wpdatatables_filter_editing_default_value
-
- wpdatatables_get_system_fonts
- wpdatatables_before_save_settings
- wpdatatables_filter_constructor_page
- wpdatatables_filter_edit_page
- wpdatatables_filter_browse_page
- wpdatatables_filter_settings_page
- wpdatatables_filter_dashboard_page
- wpdatatables_filter_edit_page_simple_table
- wpdatatables_filter_support_page
- wpdatatables_filter_welcome_page
- wpdatatables_filter_system_info_page
- wpdatatables_filter_getting_started_page
- wpdatatables_filter_lite_vs_premium_page
- wpdatatables_filter_addons_page
- Show Remaining Articles (4) Collapse Articles
-
- wpdatatables_filter_date_cell_before_formatting
- wpdatatables_filter_datetime_cell_before_formatting
- wpdatatables_filter_email_cell_before_formatting
- wpdatatables_filter_float_cell_before_formatting
- wpdatatables_filter_image_cell_before_formatting
- wpdatatables_filter_int_cell_before_formatting
- wpdatatables_filter_string_cell_before_formatting
- wpdatatables_filter_link_cell_before_formatting
- wpdatatables_filter_time_cell_before_formatting
- wpdatatable_cell_include_formatting
- wpdatatables_filter_cell_output
- wpdatatables_cell_value_filter
- wpdatatables_cell_filter_query
- wpdatatables_cell_data_rows_filter
- wpdatatables_cell_filtered_data_rows_filter
- wpdatatables_cell_output_filter
- Show Remaining Articles (6) Collapse Articles
-
- Articles coming soon
-
-
Javascript
-
Extend wpDataTables
-
CSS
-
Database
-
PHP API (coming soon)
- Articles coming soon
wpdatatables_allow_edit_table
Contents
Description
This filter is applied to the results of check which defines if the current user can or can’t edit the table (only for editable tables). The default logic is: if editor roles aren’t defined for the table, anyone can edit it. If they are then only the users that have one of these roles can edit it, but you can override the logic using this filter.
Usage
add_filter( 'wpdatatables_allow_edit_table', 'allow_edit_table', 10, 3 );
Parameters
- $userCanEdit boolean
- $editorRoles array
Array of values. - $tableId integer
ID of table from database.
Examples
// Callback function for the wpdatatables_allow_edit_table filter hook function allow_edit_table( $userCanEdit, $editorRoles, $tableId ) { // Check for specific table Id if ( $tableId == 1) { // Your code } } add_action( 'wpdatatables_allow_edit_table', 'allow_edit_table', 10, 3);