Hello @tahmidulkarim
That was very helpful; thank you very much. I was able to edit the snippets from the documentation to get the current embed post tags. Here is the code if anyone wants to achieve the same or if you have a better idea to make it cleaner:
add_filter('fluentform_editor_shortcodes', function ($smartCodes) {
$smartCodes[0]['shortcodes']['{ffc_current_tags}'] = 'Current Post Tags';
return $smartCodes;
});
add_filter('fluentform_all_editor_shortcodes',function($data){
$customShortCodes = [
'title'=>'Current Tags',
'shortcodes' => ['{ffc_current_tags}' => 'ffc_current_tags',]
];
$data[] = $customShortCodes;
return $data;
},10,1);
/*
* To replace dynamic new smartcode the filter hook will be
* fluentform_editor_shortcode_callback_{your_smart_code_name}
*/
add_filter('fluentform_editor_shortcode_callback_ffc_current_tags', function ($value, $form) {
$postTags = get_the_tags();
$dynamicValue = '';
if ($postTags) {
foreach ($postTags as $tag) {
$dynamicValue .= $tag->name . ', ';
}
$dynamicValue = rtrim($dynamicValue, ', ');
} else {
$dynamicValue = 'No tags found';
}
return $dynamicValue;
}, 10, 2);
Best regards!