File Editor
Directories:
.. (Back)
block-editor
config-validator
css
js
swv
Files:
capabilities.php
contact-form-functions.php
contact-form-template.php
contact-form.php
controller.php
file.php
form-tag.php
form-tags-manager.php
formatting.php
functions.php
html-formatter.php
integration.php
l10n.php
mail-tag.php
mail.php
pipe.php
pocket-holder.php
rest-api.php
shortcodes.php
special-mail-tags.php
submission.php
upgrade.php
validation-functions.php
validation.php
Create New File
Create
Edit File: capabilities.php
<?php add_filter( 'map_meta_cap', 'wpcf7_map_meta_cap', 10, 4 ); function wpcf7_map_meta_cap( $caps, $cap, $user_id, $args ) { $meta_caps = array( 'wpcf7_edit_contact_form' => WPCF7_ADMIN_READ_WRITE_CAPABILITY, 'wpcf7_edit_contact_forms' => WPCF7_ADMIN_READ_WRITE_CAPABILITY, 'wpcf7_read_contact_form' => WPCF7_ADMIN_READ_CAPABILITY, 'wpcf7_read_contact_forms' => WPCF7_ADMIN_READ_CAPABILITY, 'wpcf7_delete_contact_form' => WPCF7_ADMIN_READ_WRITE_CAPABILITY, 'wpcf7_delete_contact_forms' => WPCF7_ADMIN_READ_WRITE_CAPABILITY, 'wpcf7_manage_integration' => 'manage_options', 'wpcf7_submit' => 'read', ); $meta_caps = apply_filters( 'wpcf7_map_meta_cap', $meta_caps ); $caps = array_diff( $caps, array_keys( $meta_caps ) ); if ( isset( $meta_caps[$cap] ) ) { $caps[] = $meta_caps[$cap]; } return $caps; }
Save Changes
Rename File
Rename