The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
I need to create a Custom Post Type (CPT) with "Editor" having to be "Disabled".
This CTP has other Custom Fields, and has an Upload Image Custom Field (Pods Image Field).
And I need to programmatically handle uploading images to CPT with Custom Filed via Hook-Filter "wp_handle_upload_prefilter".
If a CPT has Enable Editor then I can get the post_id in Hook-Filter "wp_handle_upload_prefilter" with code like this:
Description
I need to create a Custom Post Type (CPT) with "Editor" having to be "Disabled".
This CTP has other Custom Fields, and has an Upload Image Custom Field (Pods Image Field). And I need to programmatically handle uploading images to CPT with Custom Filed via Hook-Filter "wp_handle_upload_prefilter". If a CPT has Enable Editor then I can get the post_id in Hook-Filter "wp_handle_upload_prefilter" with code like this:
$post_id = intval( $_REQUEST['post_ID'] ?? $_REQUEST['post_id'] ?? $_REQUEST['post'] ?? 0 );
But if Editor is "Disabled", $post_id will be 0 with the above code.
I tried logging debug with the code:
error_log( print_r( $_REQUEST, true ) );
Then in the log I get an array of:
If I ENABLE "Editor" I can get $post_id as well. The log will be:
So is there now a way for me to get the post_id when a CTP disable "Editor"?
Thanks ❤️
Version
3.2.2