Last active
June 26, 2022 14:38
-
-
Save ambercouch/4bab595f674ed06d13dac39b73d0e431 to your computer and use it in GitHub Desktop.
Allow access for WordPress editor to the Flamingo CF7 database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function fl_map_meta_cap($meta_caps){ | |
$meta_caps = array( | |
'flamingo_edit_contact' => 'delete_pages', | |
'flamingo_edit_contacts' => 'delete_pages', | |
'flamingo_delete_contact' => 'delete_pages', | |
'flamingo_delete_contacts' => 'delete_pages', //May not be a thing??? | |
'flamingo_edit_inbound_message' => 'delete_pages', | |
'flamingo_edit_inbound_messages' => 'delete_pages', | |
'flamingo_delete_inbound_message' => 'delete_pages', | |
'flamingo_delete_inbound_messages' => 'delete_pages', | |
'flamingo_spam_inbound_message' => 'delete_pages', | |
'flamingo_unspam_inbound_message' => 'delete_pages'); | |
return $meta_caps; | |
} | |
add_filter('flamingo_map_meta_cap', 'fl_map_meta_cap'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That's exactly what I needed, thanks OP.