src/Support/Ajax.php
public function setupBundleList()
    {
        if (! Guard::verifyAjaxNonce('cuztom', 'security')) {
            return;
        }

        $data = [];
        $bundle = self::getField();

        if (Cuztom::isArray($bundle->data)) {
            foreach ($bundle->data as $item) {
                $data[] = $item->output();
            }
        }

        echo (new Response(true, $data))->toJson();

        // wp
        die();
    }
public function setupBundleList()
    {
        if (! Guard::verifyAjaxNonce('cuztom', 'security')) {
            return;
        }

        $data = [];
        $bundle = self::getField();

        if (Cuztom::isArray($bundle->data)) {
            foreach ($bundle->data as $item) {
                $data[] = $item->output();
            }
        }

        echo (new Response(true, $data))->toJson();

        // wp
        die();
    }
public function setupBundleList ( ) { if ( ! Guard :: verifyAjaxNonce ( 'cuztom' , 'security' ) ) { return ; } $ data = [ ] ; $ bundle = self :: getField ( ) ; if ( Cuztom :: isArray ( $ bundle -> data ) ) { foreach ( $ bundle -> data as $ item ) { $ data [ ] = $ item -> output ( ) ; } } echo ( new Response ( true , $ data ) ) -> toJson ( ) ; // wp die ( ) ; }
Setup bundle list on init.

@return mixed
Setup bundle list on init .