diff --git a/inc/admin/options.php b/inc/admin/options.php index 7f1d02825f..b822cd876b 100644 --- a/inc/admin/options.php +++ b/inc/admin/options.php @@ -54,7 +54,7 @@ function rocket_field( $args ) { $readonly = isset( $args['readonly'] ) && $args['readonly'] ? ' readonly="readonly" disabled="disabled"' : ''; $cols = isset( $args['cols'] ) ? (int) $args['cols'] : 50; $rows = isset( $args['rows'] ) ? (int) $args['rows'] : 5; - + if( ! isset( $args['fieldset'] ) || 'start' == $args['fieldset'] ){ echo '
'; } @@ -68,7 +68,7 @@ function rocket_field( $args ) { if ( $value === false ) { $value = $default; } - + $value = esc_attr( $value ); $number_options = $args['type']=='number' ? ' min="0" class="small-text"' : ''; $autocomplete = in_array( $args['name'], array( 'consumer_key', 'consumer_email' ) ) ? ' autocomplete="off"' : ''; @@ -83,11 +83,11 @@ function rocket_field( $args ) { case 'cloudflare_api_key' : $value = get_rocket_option( $args['name'] ); - + if ( 'cloudflare_api_key' == $args['name'] && defined( 'WP_ROCKET_CF_API_KEY' ) ) { $value = WP_ROCKET_CF_API_KEY; - } - + } + $value = esc_attr( $value ); $disabled = ( 'cloudflare_api_key' == $args['name'] && defined( 'WP_ROCKET_CF_API_KEY' ) ) ? ' disabled="disabled"' : $readonly; $cf_valid_credentials = false; @@ -95,7 +95,7 @@ function rocket_field( $args ) { $cf_valid_credentials = ( is_wp_error( rocket_cloudflare_valid_auth() ) ) ? false : true; } ?> - +