內容簡介
這一節需要開發。
編輯所選的特色評論
添加用戶標記評論的功能
添加用戶收藏評論的功能
添加支持註冊新評論類型和狀態的功能,類似於 WP 核心的 register_post_type(),請參閱註冊自定義評論類型的部分
歷史
特色評論最初是在 bSocial (插件庫, Github) 中引入的,但現在已轉移到此處。新的 bSocial 評論功能將在此插件中開發。
在 WordPress.org 的插件庫中
最終在此處:https://wordpress.org/plugins/bsocial-comments/
複製我!
此插件在 Github 上:https://github.com/misterbisson/bsocial-comments
構建狀態
Travis-CI 上的主要構建狀態:
註冊自定義評論類型
自定義評論類型
`php
$args = array(
‘labels’ => array(
‘name’ => ‘收藏’,
‘singular_name’ => ‘收藏’,
‘edit_item’ => ‘編輯收藏’,
‘update_item’ => ‘更新收藏’,
‘view_item’ => ‘查看收藏’,
‘all_items’ => ‘所有收藏’,
),
‘description’ => ‘評論收藏’,
‘public’ => TRUE,
‘show_ui’ => TRUE,
‘admin_actions’ => array( ‘trash’, ‘untrash’, ‘delete’ ),
‘statuses’ => array(
‘feedback’,
‘trash’,
),
);
bsocial_comments()->register()->comment_type( ‘fave’, $args );
`
自定義評論狀態
`php
$args = array(
‘label’ => ‘Feedback’,
‘label_count’ => _n_noop( ‘Feedback (%s)’, ‘Feedback (%s)’ ),
‘status_links_show’ => TRUE,
‘include_in_all’ => FALSE,
);
bsocial_comments()->register()->comment_status( ‘feedback’, $args );
`
外掛標籤
開發者團隊
原文外掛簡介
This section needs development.
Adds featured comments selected by editors
Adds ability for users to flag comments
Adds ability for users to fave comments
Adds support for registering new comment types and statuses, similar to WP core’s register_post_type(), see the section on registering custom comment types
History
Featured comments were originally introduced in bSocial (plugin repo, github), but have moved here. New bSocial commenting features will be developed in this plugin.
In the WordPress.org plugin repo
Eventually here: https://wordpress.org/plugins/bsocial-comments/
Fork me!
This plugin is on Github: https://github.com/misterbisson/bsocial-comments
Build status
Master build status at Travis-CI:
Registering custom comment types
Custom comment types
`php
$args = array(
‘labels’ => array(
‘name’ => ‘Faves’,
‘singular_name’ => ‘Fave’,
‘edit_item’ => ‘Edit Fave’,
‘update_item’ => ‘Update Fave’,
‘view_item’ => ‘View Fave’,
‘all_items’ => ‘All Faves’,
),
‘description’ => ‘Comment faves’,
‘public’ => TRUE,
‘show_ui’ => TRUE,
‘admin_actions’ => array( ‘trash’, ‘untrash’, ‘delete’ ),
‘statuses’ => array(
‘feedback’,
‘trash’,
),
);
bsocial_comments()->register()->comment_type( ‘fave’, $args );
`
Custom comment statuses
`php
$args = array(
‘label’ => ‘Feedback’,
‘label_count’ => _n_noop( ‘Feedback (%s)’, ‘Feedback (%s)’ ),
‘status_links_show’ => TRUE,
‘include_in_all’ => FALSE,
);
bsocial_comments()->register()->comment_status( ‘feedback’, $args );
`
