Permissions Issue
-
We are running into an issue with using null as the parent slug and add_submenu_page. On Line 81 of emr-plugin.php, you add the sub menu page to allow for the ?page= GET process, but we use permissions based on the parent slug, so this is generating errors. We have temporarily worked around this issue by editing this file and using upload.php as the parent slug, and then using null as the actual menu title:
add_submenu_page('upload.php', esc_html__("Replace media", "enable-media-replace"), null, 'upload_files', 'enable-media-replace/enable-media-replace', array($this, 'route'));Of course, we had to use some admin side JS to actually remove the “blank” menu item as well. Is there any way to do this without actually editing your core files?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Permissions Issue’ is closed to new replies.