內容簡介
在您的文章/頁面/自訂文章類型編輯頁面下方新增另一個文字編輯器。
GitHub
外掛主頁
在模板中擷取和顯示
使用get_the_subcontent()來擷取,the_subcontent()來顯示。
更改標籤
預設輸入欄位的標籤是「副標題」。這裡有一個 hook 可以更改。
add_filter( 'nskw-sce-meta_label', 'nskw_changesubcontentlabel' );
function nskw_changesubcontentlabel() {
return '聯絡資訊';
}
更改編輯器高度
預設為10。
add_filter( 'nskw-sce-row', 'change_subcontent_row' );
function change_subcontent_row() {
return 20;
}
在特定文章類型中隱藏
add_filter( 'nskw-sce-post_type', 'nskw_hide_subcontent' );
function nskw_hide_subcontent() {
return array( 'page', 'newposttype' );
}
停用 wpautop
add_filter( 'nskw-sce-wpautop', 'nskw_change_wpautop' );
function nskw_change_wpautop() {
return false;
}
無媒體上傳功能
add_filter( 'nskw-sce-media_buttons', 'nskw_change_mediasetting' );
function nskw_change_mediasetting() {
return false;
}
無tinyMCE編輯器
add_filter( 'nskw-sce-tinymce', 'nskw_cange_tinymce' );
function nskw_cange_tinymce() {
return false;
}
停用短碼渲染
add_filter( 'nskw-sce-shortcode', '__return_false' );
外掛標籤
開發者團隊
📦 歷史版本下載
原文外掛簡介
Adds another text editor below the editor in your post/page/custom-post-type edit page.
GitHub
Plugin Homepage
Retriving and displaying in templates
Use get_the_subcontent() to retrieve and the_subcontent() to display.
Change label
By default the label of the input field is “Subtitle”. There’s a hook for changing it.
add_filter( 'nskw-sce-meta_label', 'nskw_changesubcontentlabel' );
function nskw_changesubcontentlabel() {
return 'Contact Information';
}
Change the height of the editor
Default it’s 10.
add_filter( 'nskw-sce-row', 'change_subcontent_row' );
function change_subcontent_row() {
return 20;
}
Hide in particular post type
add_filter( 'nskw-sce-post_type', 'nskw_hide_subcontent' );
function nskw_hide_subcontent() {
return array( 'page', 'newposttype' );
}
Disable wpautop
add_filter( 'nskw-sce-wpautop', 'nskw_change_wpautop' );
function nskw_change_wpautop() {
return false;
}
No Media Uploader
add_filter( 'nskw-sce-media_buttons', 'nskw_change_mediasetting' );
function nskw_change_mediasetting() {
return false;
}
No tinymce
add_filter( 'nskw-sce-tinymce', 'nskw_cange_tinymce' );
function nskw_cange_tinymce() {
return false;
}
No shortcode rendering
add_filter( 'nskw-sce-shortcode', '__return_false' );
