wordpress下拉菜单_如何在WordPress管理区域中修改帮助下拉文本

本文介绍如何在WordPress管理区域中修改帮助下拉菜单的文本,以适应自定义网站或插件的需求。通过编辑主题的functions.php文件,可以针对不同页面如新增页面等设置个性化的帮助说明。
摘要由CSDN通过智能技术生成

wordpress下拉菜单

Each WordPress admin screen has a Help button. This area drop downs and contains text that helps the user understand the features of the specific page. When creating a custom site for your clients or a plugin, then you may find a need to modify the Help Dropdown text. In this article, we will show you how to modify the help dropdown text in WordPress admin area.

每个WordPress管理屏幕都有一个“帮助”按钮。 该区域下拉菜单中包含帮助用户理解特定页面功能的文本。 在为客户或插件创建自定义站点时,可能会发现需要修改“帮助”下拉菜单文本。 在本文中,我们将向您展示如何在WordPress管理区域中修改帮助下拉文本。

First open your theme’s functions.php file and paste the following code:

首先打开主题的functions.php文件,然后粘贴以下代码:

add_action('load-page-new.php','custom_help_page');
add_action('load-page.php','custom_help_page');
function custom_help_page() {
  add_filter('contextual_help','custom_page_help');
}
function custom_page_help($help) {
  // echo $help; // Uncomment if you just want to append your custom Help text to the default Help text
  echo "<h5>Custom Help text</h5>";
  echo "<p> HTML goes here.</p>";
}

This code above will add custom help text on every Add New Page screen. You can do this for your posts page, or any other screen. This is something that we will be utilizing for our plugins that we have intentions of creating.

上面的代码将在每个“添加新页面”屏幕上添加自定义帮助文本。 您可以在帖子页面或任何其他屏幕上执行此操作。 这是我们将要用于打算创建的插件的东西。

Source: Sixrevisions Blog

资料来源: Sixrevisions博客

翻译自: https://www.wpbeginner.com/wp-tutorials/how-to-modify-the-help-dropdown-text-in-wordpress-admin-area/

wordpress下拉菜单

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值