Carbon_Fields\Container\Theme_Options_Container::attach PHP Method

attach() public method

Hook the container saving action.
public attach ( )
    public function attach()
    {
        // Add menu page
        if (!$this->settings['parent']) {
            add_menu_page($this->title, $this->title, $this->settings['permissions'], $this->settings['file'], array($this, 'render'), $this->icon);
        }
        add_submenu_page($this->settings['parent'], $this->title, $this->title, $this->settings['permissions'], $this->settings['file'], array($this, 'render'), $this->icon);
        $page_hook = get_plugin_page_hookname($this->settings['file'], '');
        add_action('load-' . $page_hook, array($this, '_save'));
    }