Carbon_Fields\Container\Post_Meta_Container::show_on_page_children PHP Method

show_on_page_children() public method

Show the container only on pages whose parent is referenced by $parent_page_path.
public show_on_page_children ( string $parent_page_path ) : object
$parent_page_path string
return object $this
    public function show_on_page_children($parent_page_path)
    {
        $page = get_page_by_path($parent_page_path);
        $this->show_on_post_type('page');
        if ($page) {
            $this->settings['show_on']['parent_page_id'] = $page->ID;
        } else {
            $this->settings['show_on']['parent_page_id'] = -1;
        }
        return $this;
    }