该插件尚未通过WordPress的最新3个主要版本进行测试。 当与较新版本的WordPress一起使用时,可能不再受到维护或支持,并且可能会存在兼容性问题。

Better Admin Help Tabs

描述

This plugin will allow creation of admin help tabs (and associated sidebars) on any screen in the WordPress admin area. It creates a custom post type called Help Tabs to store information. You need to add the following info to make it work:

  1. Title – The title of your tab
  2. Main content area
  3. Screen – What page/screen it should appear on
  4. Type – Help tab or tab sidebar

HELP TAB EXAMPLE:
Let’s say I want to add a help tab on the main Help Tabs listing page that says something about my plugin. I would use:

  1. “My Main Tab”
  2. “This is a main tab with my own info on it!”
  3. “edit-sbah_helptab”
  4. Select “Tab” (the default)

HELP SIDEBAR EXAMPLE:
Let’s say I want to add a help sidebar (these are the areas to the right with extra info and links) on the main Help Tabs listing page. I would use:

  1. “My Sidebar”
  2. “This is a sidebar!”
  3. “edit-sbah_helptab”
  4. Select “Sidebar”

IMPORTANT NOTE: While there can be multiple tabs per page, there can be only ONE sidebar per page. If you add others to the same page, only the first one found will show.

NOTE: I also have a plugin that does Admin Pointers (those blue info boxes), if you are interested in that one you can find it here: https://wordpress.org/plugins/better-admin-pointers/

This plugin leverages the great work done by others here:

For configuring metaboxes on the custom post type:
https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress

屏幕截图

  • The config page for my example help tab.
  • The example help tab and sidebar in action.

安装

It is always a good idea to make a backup of your database before installing any plugin.

There are 3 ways to install this plugin:

  1. Search for it in your WordPress Admin (Plugins/Add New/Search) area and install from there

  2. Download the zip file from https://wordpress.org/plugins/better-admin-help-tabs/ and then go to Plugins/Add New/Upload and then upload and activate it.

  3. Upload the folder “better-admin-help-tabs” to “/wp-content/plugins/”, then activate the plugin through the “Plugins” menu in WordPress

常见问题

Q: How can I find the screen/page id name to use?

A: This can be easily deduced from looking at the URL in the admin. For regular posts, it would just be “post”. For a custom post type, it would be the name of that custom post type (my-custom-post-type). For other pages (like my plugin editor example), it usually works to just remove the “.php” from the end of the url (i.e. “plugin-editor.php” becomes “plugin-editor”).

Q: Is there some handy reference somewhere for the main admin screen ids?

A: You are in luck: https://codex.wordpress.org/Plugin_API/Admin_Screen_Reference

Q: I’m the lazy type, is there some tool to help me identify admin screens?

A: You are in even greater luck. I just added an option to show you what screen you are on anywhere in the admin. Go to BAH Options page and check the box for “Show Current Screen”. A small header on every page will identify your admin screen.

Q: If I have more than one tab on a page, how can I order them?

A: Like the blog, they are in reverse cron order. So you can just change the dates of the ones you want to be on the top to the latest. If there is enough interest I may add an order field in a future version.

Q: Can I put the same tab on multiple pages?

A: As of version 1.1, yes. Separate your page(screen) names with either a comma or a space.

评价

2016 年 9 月 3 日 5 回复
Hi! Thanks for the plugin. But I found a little problem, in better-admin-help-tabs.php line 234 you can find: $qargs = array( 'post_type' => 'sbah_helptab', 'posts_per_page' => '-1', 'meta_query' => array( array( 'key' => '_sbah_screen_text', 'value' => $idofscreen, 'compare' => 'like', // <= the problem ) ) ); so edit-{post_type} and {post_type} are showing the same tabs $qargs = array( 'post_type' => 'sbah_helptab', 'posts_per_page' => '-1', 'meta_query' => array( array( 'key' => '_sbah_screen_text', 'value' => $idofscreen, 'compare' => '=', // <= 🙂 ) ) ); English is not my mother tongue; please excuse any errors on my part.
阅读所有4条评价

贡献者及开发者

「Better Admin Help Tabs」是开源软件。 以下人员对此插件做出了贡献。

贡献者

「Better Admin Help Tabs」插件已被翻译至 1 种本地化语言。 感谢所有译者为本插件所做的贡献。

帮助将「Better Admin Help Tabs」翻译成简体中文。

对开发感兴趣吗?

您可以浏览代码,查看SVN仓库,或通过RSS订阅开发日志

更新日志

Version 1.3.4

  • FIX: REGEXP was not matching if item was at end of the line.

Version 1.3.3

  • FIX: Fixes the previous fix to the fix. Who knew MariaDB was not really identical to MySQL?

Version 1.3.2

  • FIX: previous fix was not a fix. This version fixes the fix, sigh.

Version 1.3.1

  • FIX: help tab query was sometimes showing on wrong pages because of partial name matching.

Version 1.3

  • FIX: resolved conflicts with some plugins that did not have a wp screen available.
  • FIX: applying content filter properly to help tab content.

Version 1.2

  • FIX: Screen display option now properly coded and falls after admin bar loads.

Version 1.1

  • NEW FEATURE: Single entry can show on multiple pages

Version 1.0

  • First Version, awaiting bug reports…