前言介紹
- 這款 WordPress 外掛「Global Meta Box Order」是 2015-03-27 上架。
- 目前有 500 個安裝啟用數。
- 上一次更新是 2015-12-02,距離現在已有 3440 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 4.1 以上版本才可以安裝。
- 有 5 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
nosurs |
外掛標籤
post | admin | custom | customize | customization |
內容簡介
這個外掛可以直覺地調節 WordPress 安裝的後台使用者的元框位置和畫面欄位配置。
功能簡介
安裝並啟用外掛
進入一篇文章、頁面、自訂文章型別或儀表板
變更元框的順序和位置(或所有元框)
變更欄位配置
切換不同的使用者(也許需要另一個User Switching外掛幫助)
檢視已變更的結果
安裝
下載並解壓縮,然後將“global-meta-box-order”文件夾移至“plugins”文件夾中。前往 WordPress 安裝並在管理區啟用外掛。
回滾
外掛不會將任何內容寫入資料庫,只讀取。因此,它不會碰觸任何使用者設定,而是基於每個請求進行篩選。雖然所有應用的更改從使用者角度來看都是永久的,但它們實際上不是永久的。只需停用外掛,所有更改即會消失。重新啟用它,它們將全部重新應用。
運作方式
外掛基於藍圖使用者操作,對於所有其他後台使用者,它會即時複製其元框的畫面設定(可見性、位置和順序)和欄位配置。
預設情況下,此藍圖使用者是找到的第一個管理員使用者,因此您需要以該使用者身份登錄以全局更改畫面設定。有關如何變更預設藍圖使用者以及其他設定的說明,請參閱下面的設定部分。
適用情境
預設情況下,當使用者進行以下操作時,外掛會啟用:
編輯文章
編輯頁面
編輯自訂文章型別
進入儀表板
修改內容
外掛始終會變更
元框的可見性、順序和欄位位置
欄位配置
如果使用者要求,它還會
移除畫面選項方塊
將所有框固定,因此使用者無法再自行移動
使用方式
以您的藍圖使用者身份登錄。預設情況下,這是系統中找到的第一個管理員使用者。
選擇一個編輯畫面(文章、頁面、自訂文章型別)或儀表板,移動元框,變更它們的畫面設定和畫面的欄位配置。切換到某個使用者以檢視您的設定,然後再切換回來進行調整。
完成後,您可能希望通過移除畫面選項方塊和鎖定框的排序來鎖定您的視圖。當然,您的藍圖使用者不會受到此影響。
設定
後台整合最小。沒有導航項目、沒有選項頁面、沒有數據庫中的項目。相反,配置外掛的地方是您的主題的functions.php。
順帶一提,您不需要設定外掛。只要找到管理員使用者,它就可以正常運作。
準備工作
打開編輯器,加載您的functions.php,然後將以下代碼複製並粘貼到其中。想要有某種方式來進行設置,但反正都可以。
為了簡潔,我們將假設外掛已載入並啟用,所以我們不會進行檢查(不過可以參考QueryLoop上非常好的教程來了解如何檢查)。
if (is_admin()) {
// The path to the configuation is rather long, so let's
原文外掛簡介
Intuitively harmonize meta box positions and screen column layout for all backend users of your WordPress installation.
Quick Overview
Install and activate the plugin
Switch to a post, a page, a custom post type, or the dashboard
Change the order and position of a meta box (or all of them)
Change the column layout
Switch to a different user (maybe with the help of the User Switching plugin)
See your changes applied
Installation
Download and unpack, then move the folder ‘global-meta-box-order’ into your ‘plugins’ folder. Head over to your WordPress installation and activate the plugin in the admin area.
Rollback
The plugin doesn’t write anything to the database, it just reads. So it never touches any user settings, but instead filters them on a per request basis. Though all applied changes appear to be permanent from a user’s perspective, they are not. Just deactivate the plugin and see all changes disappear. Activate it again, and they will all be reapplied.
How It Works
The plugin operates on a blueprint user whose screen settings for meta boxes (visibility, position and ordering), and column layout are cloned for all other backend users on the fly.
By default, this blueprint user is the first admin user found, so you’ll need to be logged in as that user to globally change screen settings. For how to change the default blueprint user as well as other settings, please refer to the Configuration section below.
Where It Works
By default, the plugin kicks in when a user:
edits a post
edits a page
edits a custom post type
hits the dashboard
What It Changes
It will always change
the meta boxes visibility, ordering, and column positions
the column layout
When told so, it will also
remove the screen options box
immobilize all boxes, so they can’t be moved around by your users anymore
Usage
Log in as your blueprint user. By default, the is the first admin user found in your system.
Select an editing screen (post, page, custom post type) or the dashboard, move the meta boxes around, change their screen settings and the screen’s column layout. Switch to some user to review your settings, switch back to adjust them.
When done, you might want to lock your views down by removing the screen options box and by locking the boxes’ sort order. Your blueprint user, of course, wil not be affected by this.
Configuration
The backend integration is kept to a minimum. No navigation entry, no options page, no entry in the database. Instead, the place to go to configure the plugin is your theme’s functions.php.
By the way: You don’t need to configure the plugin. As long as it finds an admin user, it will work just fine.
Preparation
Fire up an editor, load your functions.php, and copy and paste the following code into it. The idea is to have some sort of container to do the configuration in, but do it any way you like.
For brevity, we’ll assume the plugin is loaded and active, so we won’t check for that (see this nice write-up on QueryLoop on some ways to do it, though).
if (is_admin()) {
// The path to the configuation is rather long, so let's
// make us a shorthand.
class_alias('\GlobalMetaBoxOrder\Config', 'MetaBoxConfig');
// Add MetaBoxConfig below this line
...
}
Now we are ready to add some of the configuration settings below to adjust the plugin’s default behaviour. You might also want to have a look at the example configuration near the end of this document.
Please keep in mind that you need to be logged in as any user but your blueprint user to see a setting applied. Again, the User Switching plugin might come in handy.
Screens To Operate On
By default, the plugin operates on the post, page, and custom post type editing screens, and the dashboard.
You can change this as follows:
// Operate on post and page screens only, leave the dashboard alone.
// This will still include custom post types.
MetaBoxConfig::$filter = array('post', 'page');
// Exclude custom post types
MetaBoxConfig::$include_cpts = false;
// Allow custom post types...
MetaBoxConfig::$include_cpts = true;
// ...but not all of them
MetaBoxConfig::$exclude = array('acme_product');
MetaBoxConfig in the example above is assumed to be an alias to \GlobalMetaBoxOrder\Config as shown in the preparation section above.
Changing the Blueprint User
Register a function that returns a user id, like so:
MetaBoxConfig::$getBlueprintUserId = function () { return 1; };
Or, more involved:
MetaBoxConfig::$getBlueprintUserId = function () {
$user = get_user_by('slug', 'jane');
return $user ? $user->ID : false;
};
MetaBoxConfig in the example above is assumed to be an alias to \GlobalMetaBoxOrder\Config as shown in the preparation section above.
Locking Views
By default, all users will be able to interact with the screen options box, and to move around the meta boxes themselves. There is a rationale behind it, but to cut things short, this is how you might want to change it:
// No screen options
MetaBoxConfig::$remove_screen_options = true;
// Meta boxes can't be moved anymore
MetaBoxConfig::$lock_meta_box_order = true;
MetaBoxConfig in the example above is assumed to be an alias to \GlobalMetaBoxOrder\Config as shown in the preparation section above.
Example Configuration
if (is_admin()) {
// Make sure plugin is active
if (class_exists('\GlobalMetaBoxOrder\Config')) {
// Make a long name short.
class_alias('\GlobalMetaBoxOrder\Config', 'MetaBoxConfig');
// Settings
MetaBoxConfig::$filter = array('post', 'page', 'dashboard'); // default
MetaBoxConfig::$include_cpts = true; // default
MetaBoxConfig::$getBlueprintUserId = function () { return 1; };
MetaBoxConfig::$exclude = array('acme_product');
MetaBoxConfig::$remove_screen_options = true;
MetaBoxConfig::$lock_meta_box_order = true;
}
}
On Moving the WYSIWYG Editor
The position of WordPress’ WYSIWYG editor is fixed, and can’t be changed out of the box (mostly because it lacks a box around it). There are reasons for this, but if you want to have a positionable editor anyway, you might want to have a look at our very own Movable Editor plugin.
If, on the other hand, if you want to place one specific box above the editor, you might want to check out this answer on stackexchange.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Global Meta Box Order」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
White Label CMS 》White Label CMS 外掛針對開發者設計,提供客戶更具個性化且易於使用的內容管理系統。, 詳細瞭解 2.0 版本外掛變更,請參閱 Video User Manuals 網站。, 功能...。
Simple Custom CSS Plugin 》無需麻煩地將自訂 CSS 新增到 WordPress 網站中。, 這是一個易於使用的 WordPress 外掛,可以添加自訂 CSS 樣式以覆寫外掛和佈景主題的預設樣式。該外掛旨在...。
ACF Photo Gallery Field 》t; 'Status', , 'name' => 'status', , 'choices' => array(, 'public' => 'Public', , 'private' => ...。
Smart Custom Fields 》Smart Custom Fields 是一個管理自訂欄位的簡單外掛。, 功能, , 支援自訂欄位群組迴圈。, 支援元資料修訂。, 支援元資料預覽。, , , 欄位類型, , 文字, 文字...。
Gallery Custom Links 》Gallery Custom Links 可讓您將相片連結到指定的 URL。已經過 WordPress 相片集、Gutenberg、Meow Gallery 等等的測試。官方網頁在這裡:Gallery Custom Link...。
Scripts n Styles 》這個外掛讓管理員用戶能夠將自訂的 CSS 和 JavaScript 直接添加到個別文章、頁面或任何註冊的自訂文章類型中,也可以將類別添加到 body 標籤和文章容器中。還...。
Ocean Custom Sidebar 》這個 WordPress 外掛可以生成無限數量的側邊欄,您可以把它們放置在想要的任何頁面上。前往主題面板 > 側邊欄以創建自定義側邊欄。, 此外掛需要安裝 Ocean...。
Custom Block Builder – Lazy Blocks 》WordPress 自訂區塊外掛程式, ★★★★★, 開發商使用於 WordPress 自訂區塊的魔法棒。我們創建了 Lazy Blocks WordPress 外掛程式,協助每位開發商取得他們需要的...。
Custom Body Class 》這個外掛程式可供您為頁面或文章添加獨特的 CSS 類別。, 範例, TasteWP 已經準備好一個快速的 WordPress 實例來展示此外掛程式,您可以在 此範例 中試用它。,...。
Woo Custom Stock Status 》此外掛可用於為每個 WooCommerce 產品或全域編寫自定義庫存狀態,並為每種狀態文字設置不同的顏色以便讓使用者在產品詳細頁面中確切知道庫存狀態名稱。, 您可...。
SMK Sidebar Generator 》這個外掛可以生成任意數量的側邊欄,然後讓你將它們放置在你想要的任何頁面。, , 特色:, , 無限數量的側邊欄。, 使用條件替換預設主題側邊欄,或全局替換只...。
PixTypes 》, , 使用 PixTypes,您可以允許您的主題在啟用時定義自定義文章類型或元框。 , 注意:此外掛針對開發人員,如果沒有正確配置,它將不會執行任何操作。。
Meks Time Ago 》Meks Time Ago WordPress 外掛讓您可以輕鬆將文章日期顯示改為「多久以前」的格式,例如「1小時前」、「2週前」、「5個月前」、「4天前」等,同時提供多種選...。
All Meta Tags 》這是一款易於使用、界面直觀的 WordPress 外掛程式,可以讓您輕鬆而安全地在 WordPress 管理區中直接添加自訂 Meta 標籤,而無需使用外部編輯器。, , 此工具...。
Post/Page specific custom CSS 》「Post/Page specific custom CSS」外掛能讓你為特定的文章或頁面新增 CSS 樣式表,並在編輯文章/頁面的欄位中提供一個區域來貼上你的 CSS 代碼。您也可以決...。