- Check for an existing
.gitignore
file in the project directory
ls -a
<?php | |
namespace Emma\UserBundle\EventListener; | |
use Doctrine\ORM\EntityManagerInterface; | |
use Emma\UserBundle\Entity\User; | |
use FOS\UserBundle\Event\FormEvent; | |
use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
use FOS\UserBundle\FOSUserEvents; | |
use Symfony\Component\HttpFoundation\JsonResponse; |
<?php | |
function create_ACF_meta_in_REST() { | |
$postypes_to_exclude = ['acf-field-group','acf-field']; | |
$extra_postypes_to_include = ["page"]; | |
$post_types = array_diff(get_post_types(["_builtin" => false], 'names'),$postypes_to_exclude); | |
array_push($post_types, $extra_postypes_to_include); | |
foreach ($post_types as $post_type) { | |
register_rest_field( $post_type, 'ACF', [ |