This might be a stupid question. But I thought to ask it here.
It is really bad changing core file and I know that there are actions and filters in WordPress. But there are some limitations.
So why WordPress Core Functions Not Using function_exists()? I mean something like below example in core files.
if(!function_exists('wp_insert_post')){
function wp_insert_post( $postarr, $wp_error = false ) {
//Core Code
}
}
Then give a way to run PHP file before core files. So any developer can modify the core files without changing core files.