Created
January 17, 2024 11:15
-
-
Save iamrealfarhanbd/21cd53c8d791a3709a614ad6bdbf11cf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('ninja_tables_before_update_settings', function ($columns, $tableId) { | |
function modifyData($columns) { | |
if (isset($_REQUEST['columns'])) { | |
return $_REQUEST['columns']; | |
} else { | |
return $columns; | |
} | |
} | |
// If you want to modify all tables just set $modifyForAllTables to true | |
// If you want to modify only for specific tables set $modifyForAllTables to false and add set your desired table id to $yourTableId | |
$yourTableId = YOUR_TABLE_ID; | |
$modifyForAllTables = false; | |
if ($modifyForAllTables || $tableId == $yourTableId) { | |
return modifyData($columns); | |
} else { | |
return $columns; | |
} | |
}, 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment