/** * Render html UI_Text. * * @since 4.0.0 */ public function render() { $html = Cherry_Toolkit::render_view(dirname(__FILE__) . '/view/button-view.php', $this->settings); return $html; }
/** * Get view for interface elements. * * @since 1.0.0 * @access protected * @param string $type View type. * @param array $args Input data. * @return string */ protected function get_view($type = 'control', array $args = array()) { if (empty($view)) { $path = dirname(__FILE__) . '/'; $path .= array_key_exists($type, $this->args['views']) ? $this->args['views'][$type] : $this->args['views']['control']; } else { $path = $view; } $view = Cherry_Toolkit::render_view($path, $args); return $view; }