diff --git a/includes/class-admin.php b/includes/class-admin.php index 1d63c58..eae587b 100644 --- a/includes/class-admin.php +++ b/includes/class-admin.php @@ -167,14 +167,26 @@ function ( $args ) { */ public function bu_liaison_inquiry_options_page() { add_options_page( - 'Liaison API Keys', - 'Liaison API Keys', + 'Liaison Forms', + 'Liaison Forms', 'manage_categories', 'bu_liaison_inquiry', array( $this, 'bu_liaison_inquiry_options_page_html' ) ); } + /** + * Check if the current user can edit settings. + * + * @return boolean + */ + public function check_edit_capability() { + $required_capabilty = apply_filters( + 'option_page_capability_bu_liaison_inquiry', 'manage_options' + ); + return current_user_can( $required_capabilty ); + } + /** * Outputs the form on the admin page using the defined actions. */ @@ -184,37 +196,36 @@ public function bu_liaison_inquiry_options_page_html() { return; } - // Add status messages. - // WordPress will add the "settings-updated" $_GET parameter to the url. - if ( isset( $_GET['settings-updated'] ) ) { - // Add settings saved message with the class of "updated". - add_settings_error( 'bu_liaison_inquiry_messages', 'bu_liaison_inquiry_message', __( 'Settings Saved', 'bu_liaison_inquiry' ), 'updated' ); - } - // Show status messages. settings_errors( 'bu_liaison_inquiry_messages' ); - ?> -
-

-
- -
-
+
+

+ check_edit_capability() ) : ?> +
+ +
+
+ +
+

+
+ +
-

Select Liaison Form

Select a form below to see the list of field IDs that it contains.