[Patch] has_cap was called with an argument that is deprecated
-
When using this plugin with WP_DEBUG enabled, I get the PHP notice:
PHP Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead.
The issue is caused in /path/to//iframe-embed-for-youtube/iframe-embed-for-youtube.php method
iefy_settings()
.It’s an easy fix. Replace
add_options_page('IFRAME Embed For YouTube', 'IFRAME Embed For YouTube', 9, basename(__FILE__), 'iefy_settings_page');
with
add_options_page('IFRAME Embed For YouTube', 'IFRAME Embed For YouTube', 'manage_options', basename(__FILE__), 'iefy_settings_page');
https://www.ads-software.com/plugins/iframe-embed-for-youtube/
- The topic ‘[Patch] has_cap was called with an argument that is deprecated’ is closed to new replies.