source/php/Module/Posts/Posts.php
public function getTaxonomyTypes()
    {
        if (!isset($_POST['posttype']) || empty($_POST['posttype'])) {
            echo '0';
            die();
        }

        $post = $_POST['post'];

        $result = array(
            'types' => get_object_taxonomies($_POST['posttype'], 'object'),
            'curr' => get_field('posts_taxonomy_type', $post)
        );

        echo json_encode($result);
        die();
    }
public function getTaxonomyTypes()
    {
        if (!isset($_POST['posttype']) || empty($_POST['posttype'])) {
            echo '0';
            die();
        }

        $post = $_POST['post'];

        $result = array(
            'types' => get_object_taxonomies($_POST['posttype'], 'object'),
            'curr' => get_field('posts_taxonomy_type', $post)
        );

        echo json_encode($result);
        die();
    }
public function getTaxonomyTypes ( ) { if ( ! isset ( $ _POST [ 'posttype' ] ) || empty ( $ _POST [ 'posttype' ] ) ) { echo '0' ; die ( ) ; } $ post = $ _POST [ 'post' ] ; $ result = array ( 'types' => get_object_taxonomies ( $ _POST [ 'posttype' ] , 'object' ) , 'curr' => get_field ( 'posts_taxonomy_type' , $ post ) ) ; echo json_encode ( $ result ) ; die ( ) ; }
AJAX CALLBACK
Get availabel taxonomies for a post type
@return void
AJAX CALLBACK Get availabel taxonomies for a post type