From 8130335b9d42e1c40c4e76df8983204ee9f560fe Mon Sep 17 00:00:00 2001 From: "Drew Jaynes (DrewAPicture)" Date: Wed, 25 Jun 2014 21:47:14 +0000 Subject: [PATCH] Add braces missed while adding docs for the `option_page_capability_{$option_page}` hook. See [25372]. See #25229. git-svn-id: https://develop.svn.wordpress.org/trunk@28833 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/options.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/options.php b/src/wp-admin/options.php index c5cab20474..5e58b0d312 100644 --- a/src/wp-admin/options.php +++ b/src/wp-admin/options.php @@ -26,9 +26,10 @@ wp_reset_vars(array('action', 'option_page')); $capability = 'manage_options'; -if ( empty($option_page) ) // This is for back compat and will eventually be removed. +// This is for back compat and will eventually be removed. +if ( empty($option_page) ) { $option_page = 'options'; -else +} else { /** * Filter the capability required when using the Settings API. @@ -41,6 +42,7 @@ else * @param string $capability The capability used for the page, which is manage_options by default. */ $capability = apply_filters( "option_page_capability_{$option_page}", $capability ); +} if ( !current_user_can( $capability ) ) wp_die(__('Cheatin’ uh?'));