add_action( 'rest_api_init', 'initialize_inclide_password_in_api' );
function initialize_inclide_password_in_api() {
add_filter( 'frm_include_field_in_content', 'include_password_in_api', 10, 2 );
}
function include_password_in_api( $include, $field_value ) {
$target_field_key = 'utv62'; // change this
if ( $target_field_key === $field_value->get_field_key() ) {
$include = true;
}
return $include;
}
I replaced utv62 with my field code, which contains the token.
I feel like I'm missing somethingThank you. Kint actually crashed my site, but I'll try another debuggr.
I had to change two lines of code in the Kint plugin so it works with PHP 8.x. New versions of PHP are more restrictive about how arrays are initialized. There are tow places where the {} need to be changed to [].
Don't suppose you could either point out where or share the updated version?
Here's the copy I use in my development environment with PHP 8.2. https://vfcgdownloads.s3.amazonaws.com/kint-php-debugger.zip
Thank you for sharing that. This fell off the radar, but now I have some time to revisit.
I'm not sure I understand this Kint thing... I see a KINT Active in the top right corner, but I can't for the life of me figure out how to actually use it.
my other question would be, where should I have put this code above (The hook where it passes the password when it's bearer authentication?? In the main functions php or within the formidable php? I feel like I may be completely wrong either way.
Kint is very easy to use. See this: https://wordpress.org/plugins/kint-php-debugger/. My version is a slightly modified version of this one.
Please login or Register to submit your answer