How can I achieve dynamic population, which is only editable by the user whom posted it. Do I need to set a specific parameter to metabox, do I use the following code or do I have another hook at my disposal, which I may use for this purpose?
add_filter( 'rwmb_frontend_field_value_post_id', 'my_custom_population_function', 10, 2 );
function my_custom_population_function( $value, $args ) {
if ( $args['id'] === 'your_meta_box_id' ) { // Only filter for a specific form.
$user_id = get_current_user_id();
$post = get_post( $value );
if( $post->post_author != $user_id ){
// redirect ?!?
}
}
return $value;
}