How to get current post ID in backend

Support MB Blocks How to get current post ID in backendResolved

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #17841
    JackkyJackky
    Participant

    I'm wondering how to get current editable post ID in block MB, because this doesn't work:

    
    
            [
                'name'          => 'Страны',
                'id'            => 'countries',
                'type'          => 'post',
                'post_type'     => 'page',
                'placeholder'   => 'Выберите страницу',
                'query_args'    => [
                    'post_parent'           => @$_GET['post']
                ],
                'clone'         => true,
                'sort_clone'    => true,
                'add_button'    => '+',
            ],
    
    #17842
    JackkyJackky
    Participant

    Just find out, I can do it with $_POST['post_id']

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.