自定义Wordpress 3.5.2插件“您没有足够的权限访问此页面。” [英] Custom Wordpress 3.5.2 plugin "You do not have sufficient permissions to access this page."

查看:122
本文介绍了自定义Wordpress 3.5.2插件“您没有足够的权限访问此页面。”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试通过遵循 http://net.tutsplus.com/tutorials/将名为 custom_rss 的自定义Wordpress插件集成到Wordpress中。 wordpress /从头开始创建自定义wordpress-plugin /

I have been trying to integrate a custom Wordpress plugin called custom_rss into Wordpress by following http://net.tutsplus.com/tutorials/wordpress/creating-a-custom-wordpress-plugin-from-scratch/.

我已成功获得菜单项中的正确URL 设置。但是,当我单击设置下的 custom_rss 链接时,加载插件的URL只会返回带有文本的内容。进入此页面。。我以超级用户管理员身份登录。

I have successfully achieved the proper URL in the menu items for settings. However, when I click on the custom_rss link under settings, the url that loads the plugin just returns content with the text You do not have sufficient permissions to access this page.. I am logged in as the super user admin.

单击菜单项时触发的脚本是 wordpress / wp-admin / options-general.php 它通过page作为其参数: options-general.php?page = CustomRSSGenerator

The script that fires when the menu item is clicked is wordpress/wp-admin/options-general.php which passes page as its parameter :options-general.php?page=CustomRSSGenerator.

是否有人对如何允许此页面的特权或更好的想法有任何想法,是否有人发现如何为Wordpress 3.5.2做自定义插件的人可以解决我的问题?

Does anyone have any ideas about how to allow privileges for this page or better yet, has anyone found out how to do a custom plugin for Wordpress 3.5.2 who can offer a solution to my problem? This has been beating me for about a week now and any advice is appreciated.

推荐答案

有一个解决方案!

如果您阅读本教程下方的注释,则会发现一个罗伯特字符的注释,其中指出:

If you read the comments below the tutorial you will find a comment by a Robert character which states:


很棒的文章。 2件事情:
1.以下代码在管理面板中产生错误,使页面无法访问:

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");

错误:您没有足够的权限访问此页面。

要删除此错误,请将上面的代码修改为:

To remove this error, modify the above code to:

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

此更改将帮助您在链接
OSCommerce产品显示时正确显示页面在设置菜单的
选项下单击。希望这对遇到
代码问题的人有所帮助。

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. 该函数的第一个参数是选项名称稍后将被起诉以唯一标识此选项及其价值。
    应该已经使用,但错误地拼写为起诉。
    交易不大,只是想让您知道。


这篇关于自定义Wordpress 3.5.2插件“您没有足够的权限访问此页面。”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆