Edit: [SOLVED] It is enogh use the $value and store it even if the var_dump( $value )
gives me two strings.
Hi @Elliot,
as you can notice I have some trouble regarding the hook add_filter('acf/update_value/name=long_tit');
I am customizing your functionality in order to remove the default WordPress title and set it (and the slug) with the info I can get from a text field.
You can check all the code at this Gist (https://gist.github.com/AndreaBarghigiani/aac1f96a95dc03d7a100) but the thing I do not understand is why my value is been repeated. Here is an example of a var_dump() on the variable that will contain get_field('titolo_lunghissimo', $post_id) . ' ' . $value;
string(5) " Test" string(9) "Test Test"
Why it is set as two string instead of one? And why I can’t put my hands on the first string?
Can you help me up with this?
Thanks in advance for the tool and for the help
Hi JMB,
have you published something about it? I tried to follow your code but there is some strange behaviour with it…
I mean, if I update a title I’ll get both values, the old one and the new one as title of my post.
Ive tried a var_dump()
on the $value and I noticed that this will be printed twice, the first string contains the new value and the second will contain both…
Can someone will help me up with this?
BTW I am using the ACF PRO 5.0.5