內容簡介
這個外掛是為了主題開發者而設計的。
它會添加一個新的管理員頁面"Classifiers",在這裡您可以定義您的分類器和分類。
例如:您的站點用戶需要選擇他們喜歡的顏色。
1.) 定義分類器類別 “color”
2.) 定義分類器: “black”,“blue”等。
在您的模板中顯示這些選項:
$cm = new ClassifierManager();
print_r($cm->getClassifiers(1));
或者使用 AJAX:
$http({
method: “POST”,
url: $scope.ajaxurl,
params: {
“action”: “wpc_ajax_getclassifiers”,
“security”: $scope.nonce,
“category”: 1
}
}).success( function( data ) {
//進行某些操作..
});
外掛標籤
開發者團隊
原文外掛簡介
This plugin is meant for theme developers.
It adds a new admin side page Classifiers, where you can define your classifiers and categories.
Example: Your site user needs to select her favorite color.
1.) Define classifier category ‘color’
2.) Define classifiers: ‘black’, ‘blue’ etc.
Displaying these options in your template:
$cm = new ClassifierManager();
print_r($cm->getClassifiers(1));
OR AJAX:
$http({
method: ‘POST’,
url: $scope.ajaxurl,
params: {
‘action’: ‘wpc_ajax_getclassifiers’,
‘security’: $scope.nonce,
‘category’ : 1
}
}).success( function( data ) {
//do something..
});
