gpt4 book ai didi

php - 自定义 Wordpress 3.5.2 插件 "You do not have sufficient permissions to access this page."

转载 作者:可可西里 更新时间:2023-10-31 22:12:18 24 4
gpt4 key购买 nike

我一直在尝试按照 http://net.tutsplus.com/tutorials/wordpress/creating-a-custom-wordpress 将名为 custom_rss 的自定义 Wordpress 插件集成到 Wordpress 中-plugin-from-scratch/.

我已经在settings 的菜单项中成功获得了正确的URL。但是,当我单击设置下的 custom_rss 链接时,加载插件的 url 仅返回带有文本的内容 You do not have sufficient permissions to access this page.。我以 super 用户管理员身份登录。

单击菜单项时触发的脚本是 wordpress/wp-admin/options-general.php,它传递 page 作为其参数:options-general.php?page=自定义 RSS 生成器

有没有人对如何允许此页面或更好的权限有任何想法,有没有人发现如何为 Wordpress 3.5.2 做一个自定义插件谁可以提供解决我的问题的方法?这已经困扰我大约一个星期了,我很感激任何建议。

最佳答案

所以有一个解决方案!

如果您阅读教程下方的评论,您会发现 Robert 角色的评论指出:

Great article. 2 things: 1. The following code produces an error in Admin panel, that makes the page inaccessible:

add_options_page("OSCommerce Product Display", "OSCommerce Product Display", 1, "OSCommerce Product Display", "oscimp_admin");

ERROR: "You do not have sufficient permissions to access this page."

To remove this error, modify the above code to:

add_options_page("OSCommerce Product Display", "OSCommerce Product Display", 1, "OSCommerce_Product_Display", "oscimp_admin");

That change will help you display the page correctly when the link "OSCommerce Product Display" is clicked under the "Settings" menu option. Hope this helps anyone who experienced a problem with the code.

  1. "The first parameter of this function is the option name which will be sued later to uniquely identify this option and its value." It should have been "used" but incorrectly spelled as "sued". Not a big deal, but just wanted to let you know.

关于php - 自定义 Wordpress 3.5.2 插件 "You do not have sufficient permissions to access this page.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18136064/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com