Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display Tweets plugin #5

Closed
BenBish opened this issue Dec 9, 2013 · 3 comments
Closed

Display Tweets plugin #5

BenBish opened this issue Dec 9, 2013 · 3 comments

Comments

@BenBish
Copy link

BenBish commented Dec 9, 2013

@mattbanks Apologies if this is a plugin issue rather than a theme issue but I am not sure where the issue lies at the moment.

The conflict arises when the 'Display Tweets' plugin is enabled with your theme.

http://wordpress.org/plugins/display-tweets-php/

The plugin has a settings page that is normally located under Settings called 'Twitter Feed'. When the plugin is enabled with your theme the menu item disappears and the page returns a You do not have sufficient permissions to access this page.

/wp-admin/options-general.php?page=displaytweets

This erroneous message does not occur and the Setting menu item is listed when the default Twenty Thirteen theme is enabled.

I have tested this on a vanilla WordPress 3.7.1 install, logged in as admin with only your Starter Theme and the Display Tweets plugin. Please advise where to go next because its got me stumped.

@mattbanks
Copy link
Owner

It looks like Display Tweets is checking current_user_can( 'edit_plugins' ) for the $capability of add_option_page, which isn't the best way to check that (see here for Codex entry).

My starter theme has a line in lib/init.php to set DISALLOW_FILE_EDIT to true (line 37, which disables the Theme and Plugin Editor so no one can change the code in themes and plugins from the dashboard. If you delete or comment this out in init.php, it'll fix the issue with the Display Tweets plugin.

I set DISALLOW_FILE_EDIT to prevent clients from editing code (and giving them extra confusing options in the Admin area) and for added security just in case a site gets hacked.

@BenBish
Copy link
Author

BenBish commented Dec 10, 2013

Thank you, much appreciated sir! Its given me what I needed to go on. I like the added security so will probably modify their plugin to make it work with your theme.

Thanks for the prompt response and especially for the theme!

@mattbanks
Copy link
Owner

No problem! Glad the theme works for you! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants