You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But sage-directives use different params logic within an additional feature, which helps to add an array key as a second parameter. (I found it very useful too!).
The directive call to disable formatting might look like:
@field('headline', false, false, false);
I think my suggested solution not super clean and it needs a few extra tricks at logic to check all combinations within an additional $key param. But I would like to hear any of your thoughts/ideas on this?
P.S.: with the @sub — everything the same, but excluding $post_id param.
Thanks!
The text was updated successfully, but these errors were encountered:
Hey @Log1x. Thanks for one more awesome plugin, I appreciate all of your hard work!
I have an idea related to
@field
and@sub
directives.Original ACF the_field(), the_sub_field() allows optional $format_value param, which I found extra useful, when
acf_the_content
filter for that field or all fields.Issue with @field and @sub directives
Default ACF Example: I'm using the
wysiwyg
field and I could disable formatting on its value by passingfalse
as a third param:But sage-directives use different params logic within an additional feature, which helps to add an array key as a second parameter. (I found it very useful too!).
Possible solution
The only solution I can see there to follow existing directive format — add expression to check for fourth/third expression here https://github.com/Log1x/sage-directives/blob/master/src/Directives/ACF.php#L50-L61
So the actual full param structure might be:
The directive call to disable formatting might look like:
I think my suggested solution not super clean and it needs a few extra tricks at logic to check all combinations within an additional $key param. But I would like to hear any of your thoughts/ideas on this?
P.S.: with the @sub — everything the same, but excluding
$post_id
param.Thanks!
The text was updated successfully, but these errors were encountered: