static function remove_script_tag($buffer) { return str_replace(array("<script>", "</script>", "<script type='text/javascript'>"), '', $buffer); } static function tooltip($content, $position = 'top') { echo '<a href="#" class="td-tooltip" data-position="' . $position . '" title="' . $content . '">?</a>'; } static function tooltip_html($content, $position = 'top') { echo '<a href="#" class="td-tooltip" data-position="' . $position . '" data-content-as-html="true" title="' . esc_attr($content) . '">?</a>'; } } //end class td_util //read the theme settings once td_util::read_once_theme_settings(); class td_category2id_array_walker extends Walker { var $tree_type = 'category'; var $db_fields = array('parent' => 'parent', 'id' => 'term_id'); var $td_array_buffer = array(); function start_lvl(&$output, $depth = 0, $args = array()) { } function end_lvl(&$output, $depth = 0, $args = array()) { } function start_el(&$output, $category, $depth = 0, $args = array(), $id = 0) { $this->td_array_buffer[str_repeat(' - ', $depth) . $category->name] = $category->term_id; }