wpcf7_not_allowed_to_edit()
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
wpcf7_not_allowed_to_edit( $page, $action, $object );
- $page (обязательный)
- -
- $action (обязательный)
- -
- $object (обязательный)
- -
Код wpcf7_not_allowed_to_edit() wpcf7 not allowed to edit CF7 5.9.8
function wpcf7_not_allowed_to_edit( $page, $action, $object ) { if ( $object instanceof WPCF7_ContactForm ) { $contact_form = $object; } else { return; } if ( current_user_can( 'wpcf7_edit_contact_form', $contact_form->id() ) ) { return; } $message = __( "You are not allowed to edit this contact form.", 'contact-form-7' ); echo sprintf( '<div class="notice notice-warning"><p>%s</p></div>', esc_html( $message ) ); }