Great catch Josh!
For those who need this to work with PHP 7, I’d recommend replacing line 13 of services.php from
if (ereg('[A-Z]+',$arg))
to
if (preg_match('/[A-Z]+/i', $arg))
Also replace line 100 in includes.php with the same thing.
One other thing you’ll need to replace line 60 in services.php
Change
‘fields’=>split(‘,’,$_POST[‘fields’]),
to
‘fields’=>explode(‘,’,$_POST[‘fields’]),
-
This reply was modified 6 years, 3 months ago by
SeedProd.
-
This reply was modified 6 years, 3 months ago by
SeedProd.
Hi, Added these changes with the current WP version 4.8 and PHP7 but the fields are not saved
Hi Frank,
You have to change
‘fields’=>split(‘,’,$_POST[‘fields’]),
to
fields’=>explode(‘,’,$_POST[‘fields’]),
within both $edithook and $newhook array. Along with the edit of @ruess it should work fine.
Bye the way: if you google on e.g. my name and HookPress you will find a fork. You can also download this one and use it.
Hi @willemdumee
Thanks, Just to confirm for myself and others that this is your fork that works with PHP7 –
https://github.com/Willemdumee/hookpress
@willemdumee FYI – thanks, your fork works well
@frankwarwick your welcome
Hi,
Is there a way to use HookPress with custom post and field types. I have created a post type with Pods and need to be able to use the custom post type’s fields with Zapier.
Any help is greatly appreciated. Btw I am not a developer.
Thanks.