本文整理汇总了PHP中ThemeHelper::createTermDictionary方法的典型用法代码示例。如果您正苦于以下问题:PHP ThemeHelper::createTermDictionary方法的具体用法?PHP ThemeHelper::createTermDictionary怎么用?PHP ThemeHelper::createTermDictionary使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ThemeHelper
的用法示例。
在下文中一共展示了ThemeHelper::createTermDictionary方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: adminCreateMetaBoxPage
function adminCreateMetaBoxPage()
{
global $post;
$data = array();
$data['option'] = ThemeOption::getPostMeta($post);
$data['dictionary']['postCategory'] = ThemeHelper::createTermDictionary('category', array(), array(), array(), 'id');
ThemeHelper::setDefaultOption($data['option'], 'post_category', array());
$Template = new ThemeTemplate($data, THEME_PATH_TEMPLATE . 'admin/meta_box_page.php');
echo $Template->output();
}
示例2: adminCreateMetaBoxGeneral
function adminCreateMetaBoxGeneral()
{
global $post;
$Menu = new ThemeMenu();
$WidgetArea = new ThemeWidgetArea();
$data = array();
$data['option'] = ThemeOption::getPostMeta($post);
$data['nonce'] = wp_nonce_field('adminSaveMetaBox', THEME_CONTEXT . '_meta_box_noncename', false, false);
$data['dictionary']['widgetArea'] = $WidgetArea->getWidgetAreaDictionary();
$data['dictionary']['widgetAreaLocation'] = $WidgetArea->getWidgetAreaLocationDictionary(false);
$data['dictionary']['menu'] = $Menu->getMenuDictionary(true, true, false);
$data['dictionary']['postCategory'] = ThemeHelper::createTermDictionary('category', array(), array(), array(), 'id');
ThemeHelper::setDefaultOption($data['option'], 'menu_top', -1);
ThemeHelper::setDefaultOption($data['option'], 'widget_area_sidebar', -1);
ThemeHelper::setDefaultOption($data['option'], 'widget_area_sidebar_location', -1);
ThemeHelper::setDefaultOption($data['option'], 'widget_area_footer', -1);
ThemeHelper::setDefaultOption($data['option'], 'footer_bottom_enable', -1);
ThemeHelper::setDefaultOption($data['option'], 'page_background_color', '');
$Template = new ThemeTemplate($data, THEME_PATH_TEMPLATE . 'admin/meta_box_general.php');
echo $Template->output();
}
示例3: adminCreateMetaBoxGeneral
function adminCreateMetaBoxGeneral()
{
global $post;
$Menu = new ThemeMenu();
$WidgetArea = new ThemeWidgetArea();
$data = array();
$data['option'] = ThemeOption::getPostMeta($post);
$data['nonce'] = wp_nonce_field('adminSaveMetaBox', THEME_CONTEXT . '_meta_box_noncename', false, false);
$data['dictionary']['widgetArea'] = $WidgetArea->getWidgetAreaDictionary();
$data['dictionary']['widgetAreaLocation'] = $WidgetArea->getWidgetAreaLocationDictionary(false);
$data['dictionary']['menu'] = $Menu->getMenuDictionary(true, true, false);
$data['dictionary']['postCategory'] = ThemeHelper::createTermDictionary('category', array(), array(), array(), 'id');
$this->setPostMetaDefault($data['option'], 'general');
$Template = new ThemeTemplate($data, THEME_PATH_TEMPLATE . 'admin/meta_box_general.php');
echo $Template->output();
}