function my_update_all_term_caches_menu_item() { function my_update_all_term_caches_menu_item(){ $args = array(
$ args =数组(
'id' => 'my-update-all-term-caches',
'id'=>'my-update-all-term-caches',
'title' => 'Update Term Cache',
'title'=>'Update Term Cache',
'function' => 'my_update_all_term_caches'
'功能'=>'my_update_all_term_caches'
);
);
afc_add_item( $args );
afc_add_item($ args);
}
}
add_action( 'init', 'my_update_all_term_caches_menu_item' );
add_action('init','my_update_all_term_caches_menu_item');
code> pre>
This code will generate a menu item labelled “Update Term Cache” that creates a link that will run the function defined
此代码将生成一个标签为“ Update Term Cache”的菜单项,该菜单项创建一个链接,该链接将运行定义的功能
in the “function” key of the $args array (in this case, my_update_all_term_caches()).
在$ args数组的“功能”键(在本例中为my_update_all_term_caches())中。 p>
The primary purpose of this plugin is to provide an easy tool for developers to refresh cached items when developing new
此插件的主要目的是为开发人员提供一个简单的工具,使其在开发新产品时刷新缓存的项目。
features.
特征。
Additionally, it can serve as a convenient tool for users to be able to update cached items when needed.
此外,它可以作为方便的工具,使用户能够在需要时更新缓存的项目。 p>
Note that this is not merely a wrapper for the admin bar API.
请注意,这不仅是管理栏API的包装。
Rather, it allows you to add items to the admin bar and provides
相反,它允许您将项目添加到管理栏中并提供
all of the necessary coding that will link a callback function to a menu item.
将回调函数链接到菜单项的所有必要编码。
You can think of it as an extension of
您可以将其视为
的扩展
the admin bar that adds a very specific functionality.
管理栏,添加了非常特定的功能。
The plugin also uses the admin bar as intended and only adds a
该插件还按预期使用了管理栏,仅添加了一个
few extra arguments that support the functionality of this plugin.
支持该插件功能的一些额外参数。 p>
A more complete tutorial that describes the full functionality of the plugin can be read at
可以在以下网址阅读更完整的教程,其中描述了插件的全部功能:
tollmanz.com.
tollmanz.com 。 p>