[wordpress插件] Classifiers分类器

wordpress 插件 文章 2020-03-24 07:20 423 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

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’

1.)定义分类器类别“颜色”

2.) Define classifiers: ‘black’, ‘blue’ etc.

2.)定义分类器:“黑色”,“蓝色”等。

Displaying these options in your template:
    

在模板中显示以下选项:
    

$cm = new ClassifierManager();
    

$ cm = new ClassifierManager();
    

print_r($cm->getClassifiers(1));

print_r($ cm-> getClassifiers(1));

OR AJAX:
    

或AJAX:
    

$http({
        

$ http({
        

method: ‘POST’,
        

方法:“ POST”,
        

url: $scope.ajaxurl,
        

网址:$ scope.ajaxurl,
        

params: {
            

参数:{
            

‘action’: ‘wpc_ajax_getclassifiers’,
            

‘action’:‘wpc_ajax_getclassifiers’,
            

‘security’: $scope.nonce,
            

‘安全性’:$ scope.nonce,
            

‘category’ : 1
        

‘类别’:1
        

}
    

}
    

}).success( function( data ) {
        

})。success(function(data){
        

//do something..
    

//做点事..
    

});

});

安装步骤

    1. Upload classifiers folder to the /wp-content/plugins/ directory
    2. classifiers 文件夹上传到 / wp-content / plugins / 目录

    3. Activate the plugin through the ‘Plugins’ menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

下载地址
https://downloads.wordpress.org/plugin/classifiers.1.1.zip
-EOF-

AI助手支持GPT4.0