本文整理汇总了PHP中KT::theTabsIndent方法的典型用法代码示例。如果您正苦于以下问题:PHP KT::theTabsIndent方法的具体用法?PHP KT::theTabsIndent怎么用?PHP KT::theTabsIndent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KT
的用法示例。
在下文中一共展示了KT::theTabsIndent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: postArchivesMenuMetaBoxCallBack
/**
* Zpracování metaboxu pro archivy post typů v menu
* NENÍ POTŘEBA VOLAT VEŘEJNĚ
*
* @author Martin Hlaváč
* @link http://www.ktstudio.cz
*
* @param string $html
*/
public function postArchivesMenuMetaBoxCallBack()
{
$postTypes = get_post_types(array("show_in_nav_menus" => true, "has_archive" => true), "object");
if (KT::arrayIssetAndNotEmpty($postTypes)) {
foreach ($postTypes as $postType) {
$postType->classes = array();
$postType->type = "custom";
//$postType->name;
$postType->object_id = $postType->name;
$postType->title = $postType->labels->name;
$postType->description = $postType->labels->name;
$postType->object = self::POST_TYPE_ARCHIVE_OBJECT_KEY;
$postType->menu_item_parent = null;
$postType->parent = null;
$postType->db_id = null;
$postType->url = get_post_type_archive_link($postType->name);
$postType->target = null;
$postType->attr_title = $postType->labels->name;
$postType->xfn = null;
}
$walker = new Walker_Nav_Menu_Checklist(array());
KT::theTabsIndent(0, "<div id=\"kt-archive\" class=\"posttypediv\">", true);
KT::theTabsIndent(1, "<div id=\"tabs-panel-kt-archive\" class=\"tabs-panel tabs-panel-active\">", true);
KT::theTabsIndent(2, "<ul id=\"kt-archive-checklist\" class=\"categorychecklist form-no-clear\">", true);
KT::theTabsIndent(3, walk_nav_menu_tree(array_map("wp_setup_nav_menu_item", $postTypes), 0, (object) array("walker" => $walker)), true);
KT::theTabsIndent(2, "</ul>", true);
KT::theTabsIndent(1, "</div>", true);
KT::theTabsIndent(0, "</div>", true, true);
$addMenuTitle = htmlspecialchars(__("Přidat do menu", "KT_CORE_DOMAIN"));
KT::theTabsIndent(0, "<p class=\"button-controls\">", true);
KT::theTabsIndent(1, "<span class=\"add-to-menu\">", true);
KT::theTabsIndent(2, "<input type=\"submit\" id=\"submit-kt-archive\" name=\"kt-add-archive-menu-item\" class=\"button-secondary submit-add-to-menu\" value=\"{$addMenuTitle}\" />", true);
KT::theTabsIndent(1, "</span>", true);
KT::theTabsIndent(0, "</p>", true, true);
} else {
KT::theTabsIndent(0, KT_EMPTY_SYMBOL, true, true);
}
}