前言介紹
- 這款 WordPress 外掛「Shortcode Directives」是 2020-01-08 上架。
- 目前尚無安裝啟用數,是個很新的外掛。如有要安裝使用,建議多測試確保功能沒問題!
- 上一次更新是 2020-01-09,距離現在已有 1942 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 4.5 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 5.2.4 以上。
- 尚未有人給過這款外掛評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
miunosoft | michael-uno |
外掛標籤
posts | command | commands | comments | shortcode |
內容簡介
快速使用類似指令的短碼在前端管理文章/評論
假如您在網站上發現了該隱藏或刪除的評論,通常會點擊評論的編輯連結並在後端進行管理。
若您能夠透過對評論進行評論來刪除/隱藏它呢?
此外掛讓您使用類似指令的短碼來管理文章和評論。
在此情況下,您回覆要隱藏的評論,並鍵入 [$comment hold]。
某些文章/評論的批次操作
如果您想要批量刪除屬於某個文章的評論,請在文章上評論並鍵入 [$comment delete]。
如果您有一個階層式的文章類型,想要將相同的標籤添加到某個文章的所有直接子項及文章本身,請在文章上評論並鍵入 [$tag mytag --to="siblings,self"]。
使用這些短碼指令可以實現一些比較複雜的操作。
快速入門
要體驗此外掛的功能,請按照以下步驟操作。
1. 啟用插件後,選擇一個已經發布的測試文章。
2. 前往文章的頁面。
3. 使用短碼 [$post_status private] 對文章發表評論。
現在,它應該對正常網站訪問者隱藏。
若要還原更改,請使用短碼 [$post_status publish] 對文章發表評論。
這樣,一旦啟用這個外掛,就可以對內置的 post 和 page 文章類型啟用功能。如果您想支持不同類型的文章,請前往儀表板 -> 工具 -> 短碼指令,在那裡您可以選擇您想要新增短碼指令功能的文章類型。
有關使用詳情,請參閱其他說明部分。
現在您應該已經掌握了此外掛的工作原理的概念,希望您找到它有用!
支援語言
英語
用法
$post_status
設置指定的文章狀態。
格式
[$post_status {status}]
範例
將文章狀態更改為 pending。
[$post_status pending]
將文章狀態更改為 draft。
[$post_status draft]
選項:–to
指定要對其應用該指令操作的文章。此 --to 選項對所有指令除了 $comment 可用。使用 children、siblings 和 descendants 進行批次操作。
– self(預設):評論/文章本身。當提交帶有指令的評論到文章時,該文章將是主題文章,並且被認為是由選項值 (self) 指定的文章。
– parent:該文章的父文章。
– {post ID}:文章 ID。
– children:該文章的直接子文章,如果文章類型支持 hierarchical 選項。
– siblings:該文章在階層關係中的兄弟文章,如果文章類型支持 hierarchical 選項。
– decendants:屬於該文章的所有子孫文章,如果文章類型支持 hierarchical 選項。
這將把所有子孫文章移到垃圾桶中。
[$post_status trash --to=descendants]
$post_parent
設置文章的父 ID。
格式
[$post_parent {post ID}]
Se
原文外掛簡介
Quickly manage posts/comments in front-end with command-like-shortcodes
Say, you find a comment that should be hidden or deleted on your site. Usually, you click on the Edit link of the comment and manage it back-end.
What if you could delete/hide it by commenting on it?
This plugin lets you manage posts and comments with command-like-shortcodes.
In this case, you reply to the comment you want to hide by typing [$comment hold].
Bulk actions on certain posts/comments
If you want to bulk-delte comments that belong to a certain post, comment on the post by typing [$comment delete].
If you have a hierarchical post type and want to add the same tag to all direct children of a certain post plus the post itself, then comment on the post by typing [$tag mytag --to="siblings,self"].
Like this, a bit complex operations can be achived with the shortcode directives.
Getting Started
To experience what this plugin does, follow these steps.
1. After activating the plugin, pick a test post which has been published already.
2. Go to the page of the post in front-end.
3. Submit a comment to the post with the shortcode [$post_status private].
Now it should be hidden for normal site visitors.
To revert the change, submit a comment to the post with the shortcode [$post_status publish].
It should be visible to normal site visitors.
By default, the plugin enables the features for the buil-in post and page post types. If you like to support different post types, go to Dashboard -> Tools -> Shortcode Directives. There, you can pick which post types to have the ability of shortcode directives.
For usage details, please see the Other Notes seciton.
You should have grapsed the idea of how this plugin works by now. Hope you find it useful!
Supported Languages
English
Usage
$post_status
Sets a specified post status.
Format
[$post_status {status}]
Examples
Changes the post status to pending.
[$post_status pending]
Changes the post status to draft.
[$post_status draft]
Option: –to
Specifies which post to apply the directive operation. This --to option is avialble for all the directives except $comment. Use children, siblings, and descendants for builk actions.
– self (default): the comment/post iteself. When a comment with a directive is submitted to a post, that post will be the subject post and it is considered the one denoted by the option value, self.
– parent: the parent post of the subject post.
– {post ID}: the post ID.
– children: the direct child posts of the subjec post if the post type supports the hierarchical option.
– siblings: the sibling posts of the subject post in hierarchical relationships if the post type supports the hierarchical option.
– decendants: all the decendants which belong to the subject post if the post type supports the hierarchical option.
This moves all the descendant posts to trash.
[$post_status trash --to=descendants]
$post_parent
Sets a post parent ID.
Format
[$post_parent {post ID}]
Sets a post parent of a post ID of 1451.
[$post_parent 1451]
This removes a post parent.
[$post_parent 0]
Option: –to
The same option values are supported described in the $post_status section above.
$post_column
Sets a value with a specified post column name to an existent post column.
Format
[$post_column --column={colum name} {value}]
[$post_column --column={colum name} --value="some value"]
Setting the value 3 to the menu_order column.
[$post_column column=menu_order 3]
When a value must have a white space, use the --value option.
[$post_column --column=post_title --value="This is a title"]
Option: –to
The same option values are supported described in the $post_status section above.
$post_meta
Sets a post meta value.
Format
[$post_meta {key} {value}]
[$post_meta {key1}="{some value1}" {key2}="{some value2}" {key3}="{some value3}"...]
This sets the post meta value bar to the _foo meta key.
[$post_meta _foo bar]
For values containing white-spaces and multiple key-value pairs, use the attribute style format.
[$post_meta _question="Why did the chicken cross the road?" _answer="To get to the other side"]
To delete meta keys, use the --action option by passing delete. This deletes the _question and _answer meta keys and their values from the database.
[$post_meta _question _answer --action="delete"]
Note: the --to and --action option names are reserved by the plugin so you cannot specify them with the option name like [$post_meta --action="my value" --to="another value"].
If you have to set them, use the command-line style format introduced above.
[$post_meta --action "Some value here."]
[$post_meta --to "Another value here."]
Option: –to
The same option values are supported described in the $post_status section above.
$taxonomy
Sets taxonomy terms with a specified taxonomy slug.
Format
[$taxonomy --slug={taxonomy slug} {term1} {term2} {term3}...]
This adds the Apple, Banana, Apple Pie terms of the post_tag taxonomy to the post.
[$taxonomy --slug=post_tag Apple Banana "Apple Pie"]
Option: –action
– add (default) : adds the specified terms
– remove : removes the specified terms
– remove_all/remove_all : removes all the associated terms
– delete : deletes the specified terms from the database if they are assigned to the post
– delete_all/delete-all : deletes all the associated terms from the database
This removes the Apple, Banana, Apple Pie terms of the post_tag taxonomy from the post.
[$taxonomy --slug=post_tag Apple Banana "Apple Pie" --action=remove]
This deletes the Apple, Banana, Apple Pie terms of the post_tag taxonomy from the database if they are assigned to the post.
[$taxonomy --slug=post_tag Apple Banana "Apple Pie" --action=delete]
This removes all the assigned terms of the post_tag taxonomy from the post.
[$taxonomy --slug=post_tag --action=remove_all]
This deletes all the assigned terms of the post_tag taxonomy from the database.
[$taxonomy --slug=post_tag --action=delete_all]
Option: –to
The same option values are supported described in the $post_status section above.
$tag
Sets non-hierarchical taxonomy terms.
Format
[$tag {tag1} {tag2} {tag3}...]
When the $tag directive is given, the plugin searches for a non-hierarchical taxonomy associated with the post type of the post and sets the given terms to the post. If a non-hierarchical taxonomy is not found, no action will be taken. If you have multiple non-hierarchical taxonomies for a particular post type which supports shortcode directives, use the $taxonomy directive. See the $taxonomy section above.
This adds the Apple, Banana, Apple Pie tags to the post.
[$tag Apple Banana "Apple Pie"]
Option: –action
The same action values with the $taxonomy directive are supported.
This removes the Apple, Banana, Apple Pie tags from the post.
[$tag --action=remove Apple Banana "Apple Pie"]
This deletes the Apple, Banana, Apple Pie terms from the database if they are assigned to the post.
[$tag --action=delete Apple Banana "Apple Pie"]
This removes all the tags associated with the post.
[$tag --action=remove_all]
This deletes all the tags associated with the post from the database.
[$tag --action=delete_all]
Option: –to
The same option values are supported described in the $post_status section above.
$category
Sets hierarchical taxonomy terms.
Format
[$category {category1} {category2} {category3}...]
When the $category directive is given, the plugin searches for a hierarchical taxonomy associated with the post type of the post and sets the given terms to the post. If a hierarchical taxonomy is not found, no action will be taken. If you have multiple hierarchical taxonomies for a particular post type which supports shortcode directives, use the $taxonomy directive. See the $taxonomy section above.
This adds the Apple, Banana, Apple Pie categories to the post.
[$category Apple Banana "Apple Pie"]
This removes the Apple, Banana, Apple Pie categories from the post.
[$category Apple Banana "Apple Pie" --action=remove]
This deletes the Apple, Banana, Apple Pie categories from the database if they are assigned to the post.
[$category --action=delete Apple Banana "Apple Pie"]
This removes all the categories associated with the post.
[$category --action=remove_all]
This deletes all the categories associated with the post from the database.
[$category --action=delete_all]
Option: –action
The same action values with the $taxonomy directive are supported.
Option: –to
The same option values are supported described in the $post_status section above.
$comment
Performs certain actions againt a replying comment. If commented on a post, the action applied to all the comments which belong to the post. So be careful not to do that when you want to do someting on a single comment.
Format
[$comment {sub-command}]
Sub-commands
– delete|remove: deletes the comment
– hold|disapprove: changes the comment status to hold.
– trash: moves the comment to trash
– spam: mark the commet as spam
– convert: converts the comment to a child post.
Replying to an existent comment with the following deletes the comment.
[$comment delete]
For hierarchical post types, the convert sub-command can help bulk-convert comments in to posts.
Commenting on a post (not an existent comment) converts all the comments belonging to the post into posts by keeping the hirarchical relationships.
[$comment convert]
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Shortcode Directives」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
WP Shortcodes Plugin — Shortcodes Ultimate 》Shortcodes Ultimate 是一個全面的視覺與功能性元素收集,您可以在文章編輯器、文字小工具甚至是範本檔案中使用。使用 Shortcodes Ultimate,您可以輕鬆地建...。
Post Duplicator 》這個外掛是用來製作選定文章的完全一模一樣複製。它支援自訂文章類型、自訂分類和自訂欄位。, *注意: 評論不會被複製到新文章。, 這個外掛的目的是為了快速且...。
GenerateBlocks 》將不同的功能整合至編輯器,但並不會因為過多的一維方塊造成內容過於臃腫。使用 GenerateBlocks,您只需深入學習少量的方塊,即可用於創建任何內容。, Genera...。
YARPP – Yet Another Related Posts Plugin 》WordPress 相關文章外掛, Yet Another Related Posts Plugin (YARPP) 是一個經過專業維護、高度自訂和功能豐富的外掛程式,可以顯示與當前文章相關的頁面、文...。
WP Meta and Date Remover 》移除點擊文章的Meta、作者和日期。 安裝、啟用,完成!, 如何移除文章和頁面的作者Meta和日期?, , 安裝 WP Meta and Date remover。, 啟用外掛。, 選擇隱藏...。
WordPress Popular Posts 》WordPress Popular Posts 是一個高度可定製的小工具,可以顯示您最受歡迎的文章。, 主要特點, , 多小工具功能 – 您可以在您的博客上擁有多個 WordPress...。
Public Post Preview 》此外掛可讓您分享一個鏈接給匿名使用者,以便他們在發布前預覽文章(或其他公開文章類型)。, 您是否曾經與沒有訪問您網站權限的人共同撰寫文章,並需要給予...。
List category posts 》List Category Posts 可以讓你透過使用 [catlist] 短碼在文章或頁面中按類別列出文章。在編輯頁面或文章時,直接插入短碼到文章中,文章就會被列出來。基本的...。
Display Posts – Easy lists, grids, navigation, and more 》Display Posts 讓您輕鬆地列出網站上的所有內容。首先在內容編輯器中新增此短碼,以列出最近的文章清單:, [display-posts], , 按類別篩選, 若只想顯示特定類...。
CMS Tree Page View 》將所有頁面和自訂文章以 CMS 樹狀概覽方式添加到 WordPress,類似於專注於頁面的 CMS 中經常找到的檢視方式。, 如果您的目標是將多個內容類型合併到單一檢視...。
Category Posts Widget 》Category Posts Widget是一個輕巧的小工具,設計用於一件事並且做得很好:顯示特定類別中最新的文章。, 基於詞語和類別的文章小工具, 這個免費小工具的高級版...。
WP Telegram (Auto Post and Notifications) 》完美整合 Telegram 至 WordPress,讓您完全掌握控制。, Telegram 的卓越 LIVER 支援, 加入聊天室, 我們在 Telegram 上有一個公開小組,提供協助設置外掛、討...。
WP Admin UI Customize 》, 儀表板, 顯示選項標籤, 輸出 - 元網站, 管理工具列 (Toolbar), 側邊選單 (Side menu), 元箱的管理, 登入畫面, 其他功能, , 這些自訂化都是可以實現的。, , ...。
Ultimate Post Kit Addons For Elementor – (Post Grid, Post Carousel, Post Slider, Category List, Post Tabs, Timeline, Post Ticker and Tag Cloud) 》Ultimate Post Kit Elementor 外掛程式是首個允許您全新且清新地設計部落格網站的外掛程式。這是博客作者、行銷人員和文章類型網站擁有者的最佳工具。, Ultim...。
Reading Time WP 》WP Reading Time 讓你輕鬆地在 WordPress 文章中加入預估閱讀時間。啟用這個外掛會自動在你的文章內容的開始加入閱讀時間。你可以在「閱讀時間」設定中取消這...。