/**
  * Getting the form html
  *
  * @package Themekraft Framework
  * @since 0.1.0
  * 
  * @return string $html The form content
  * 
  */
 function get_html()
 {
     // Adding method to the form
     $method_str = ' method="' . $this->method . '"';
     $id_str = '';
     $name_str = '';
     if ($this->id != '') {
         $id_str = ' id="' . $this->id . '"';
     }
     if ($this->name != '') {
         $name_str = ' name="' . $this->name . '"';
     }
     $html = '<form' . $id_str . $method_str . ' action="' . $this->action . '"' . $name_str . ' enctype="multipart/form-data">';
     $html = apply_filters('tk_form_start_' . $this->id, $html);
     // Adding elements to form
     foreach ($this->elements as $element) {
         $tkdb = new TK_Display();
         $html .= $tkdb->get_html($element);
         unset($tkdb);
     }
     $html = apply_filters('tk_form_end_' . $this->id, $html);
     $html .= '</form>';
     return $html;
 }
    /**
     * Getting the accordion html
     *
     * @package Themekraft Framework
     * @since 0.1.0
     * 
     * @return string $html The accordion as html
     * 
     */
    function get_html($hide_element = TRUE)
    {
        global $tk_hidden_elements;
        // Creating elements
        if (!in_array($this->id, $tk_hidden_elements) && !$hide_element) {
            if ($this->id == '') {
                $id = md5(rand());
            } else {
                $id = $this->id;
            }
            $html = '<script type="text/javascript">
			jQuery(document).ready(function($){
				$( ".' . $id . '" ).accordion({ header: "' . $this->title_tag . '", active: false, autoHeight: false, collapsible:true });
			});
	   		</script>';
            if ($this->id != '') {
                $html = apply_filters('tk_jqueryui_accordion_before_' . $this->id, $html);
            }
            $html .= '<div class="' . $id . '">';
            foreach ($this->elements as $element) {
                if (!in_array($element['id'], $tk_hidden_elements)) {
                    if ($element['id'] == '') {
                        $element_id = md5($element['title']);
                    } else {
                        $element_id = $element['id'];
                    }
                    $html .= '<' . $this->title_tag . ' ' . $element['extra_title'] . '><a href="#">';
                    if (is_object($element['title'])) {
                        $html .= $element['title']->get_html();
                    } else {
                        $html .= $element['title'];
                    }
                    $html .= '</a></' . $this->title_tag . '>';
                    $html .= '<div id="' . $element['id'] . '"' . $element['extra_content'] . '>';
                    if ($this->id != '') {
                        $html = apply_filters('tk_jqueryui_accordion_content_section_before_' . $this->id, $html);
                    }
                    if ($element['id'] != '') {
                        $html = apply_filters('tk_jqueryui_accordion_content_section_before_' . $element['id'], $html);
                    }
                    $tkdb = new TK_Display();
                    $html .= $tkdb->get_html($element['content']);
                    unset($tkdb);
                    if ($this->id != '') {
                        $html = apply_filters('tk_jqueryui_accordion_content_section_after_' . $this->id, $html);
                    }
                    if ($element['id'] != '') {
                        $html = apply_filters('tk_jqueryui_accordion_content_section_after_' . $element['id'], $html);
                    }
                    $html .= '</div>';
                } else {
                    $tkdb = new TK_Display();
                    $html .= $tkdb->get_html($element['content'], TRUE);
                    unset($tkdb);
                }
            }
            $html .= '</div>';
            // Hiding elements
        } else {
            foreach ($this->elements as $element) {
                $tkdb = new TK_Display();
                $html .= $tkdb->get_html($element['content'], TRUE);
                unset($tkdb);
            }
        }
        if ($this->id != '') {
            $html = apply_filters('tk_jqueryui_accordion_after_' . $this->id, $html);
        }
        return $html;
    }
 function get_html()
 {
     $db = new TK_Display();
     return $db->get_html($this->display);
 }
 function create_page()
 {
     global $tkf_text_domain;
     $html = '<div class="wrap">';
     if ($this->icon_url != '') {
         $html .= '<div class="icon32" style="background-image: url(' . $this->icon_url . ');"></div>';
     }
     if ($this->menu_slug != '') {
         $html = apply_filters('tk_admin_page_before_title_' . $this->menu_slug, $html);
     }
     $html .= '<h2>' . __($this->headline, $tkf_text_domain) . '</h2>';
     $html = apply_filters('tk_admin_page_before_content', $html);
     if ($this->menu_slug != '') {
         $html = apply_filters('tk_admin_page_before_content_' . $this->menu_slug, $html);
     }
     $tkdb = new TK_Display();
     $html .= $tkdb->get_html($this->content);
     unset($tkdb);
     if ($this->menu_slug != '') {
         $html = apply_filters('tk_admin_page_after_content_' . $this->menu_slug, $html);
     }
     $html .= '</div>';
     echo $html;
 }
    /**
     * Getting the tabs html
     *
     * @package Themekraft Framework
     * @since 0.1.0
     * 
     * @return string $html The tabs as html
     * 
     */
    function get_html()
    {
        global $tk_hidden_elements;
        // Creating elements
        if (!in_array($this->id, $tk_hidden_elements)) {
            if ($this->id == '') {
                $id = md5(rand());
            } else {
                $id = $this->id;
            }
            $html = '<script type="text/javascript">
			jQuery(document).ready(function($){
				$( ".' . $id . '" ).tabs();
			});
	   		</script>';
            $html .= '<div class="' . $id . '">';
            $html .= '<ul>';
            if ($this->id != '') {
                $html = apply_filters('tk_wp_jqueryui_tabs_before_tabs_' . $id, $html);
            }
            // Creting navigation elements
            foreach ($this->elements as $element) {
                // Show tab
                if (!in_array($element['id'], $tk_hidden_elements)) {
                    if ($element['id'] == '') {
                        $element_id = md5($element['title']);
                    } else {
                        $element_id = $element['id'];
                    }
                    if ($element['id'] != '') {
                        $html = apply_filters('tk_wp_jqueryui_tabs_tabs_before_li_' . $element['id'], $html);
                    }
                    $html .= '<li><a href="#' . $element_id . '" >';
                    if ($element['id'] != '') {
                        $html = apply_filters('tk_wp_jqueryui_tabs_tabs_title_before_' . $element['id'], $html);
                    }
                    if (is_object($element['title'])) {
                        $html .= $element['title']->get_html();
                    } else {
                        $html .= $element['title'];
                    }
                    if ($element['id'] != '') {
                        $html = apply_filters('tk_wp_jqueryui_tabs_tabs_title_after_' . $element['id'], $html);
                    }
                    $html .= '</a></li>';
                    if ($element['id'] != '') {
                        $html = apply_filters('tk_wp_jqueryui_tabs_tabs_after_li_' . $element['id'], $html);
                    }
                }
            }
            if ($this->id != '') {
                $html = apply_filters('tk_wp_jqueryui_tabs_after_tabs_' . $id, $html);
            }
            $html .= '</ul>';
            // Creting content elements
            foreach ($this->elements as $element) {
                // Show tab content
                if (!in_array($element['id'], $tk_hidden_elements)) {
                    if ($element['id'] == '') {
                        $element_id = md5($element['title']);
                    } else {
                        $element_id = $element['id'];
                    }
                    $html .= '<div id="' . $element_id . '" >';
                    if ($element['id'] != '') {
                        $html = apply_filters('tk_wp_jqueryui_tabs_before_content_' . $element['id'], $html);
                    }
                    $tkdb = new TK_Display();
                    $html .= $tkdb->get_html($element['content']);
                    unset($tkdb);
                    if ($element['id'] != '') {
                        $html = apply_filters('tk_wp_jqueryui_tabs_after_content_' . $element['id'], $html);
                    }
                    $html .= '</div>';
                    // Hide tab content
                } else {
                    $tkdb = new TK_Display();
                    $html .= $tkdb->get_html($element['content'], TRUE);
                    unset($tkdb);
                }
            }
            $html .= '</div>';
            return $html;
            // Hiding elements
        } else {
            foreach ($this->elements as $element) {
                $tkdb = new TK_Display();
                $html .= $tkdb->get_html($element['content'], TRUE);
                unset($tkdb);
            }
        }
    }