Skip to content

Commit

Permalink
Use callback, since 'description' field type support was removed.
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Oct 4, 2023
1 parent 73985eb commit 451bb33
Showing 1 changed file with 28 additions and 22 deletions.
50 changes: 28 additions & 22 deletions src/Integration.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,10 +370,12 @@ public function get_settings_fields() {
* @link https://www.howsmyssl.com/a/check
*/
$fields[] = [
'section' => 'feedback',
'title' => __( 'SSL Version', 'pronamic_ideal' ),
'type' => 'description',
'html' => __( 'Choose the SSL Version of your server on the Adyen Customer Area.', 'pronamic_ideal' ),
'section' => 'feedback',
'title' => \__( 'SSL Version', 'pronamic_ideal' ),
'type' => 'custom',
'callback' => function () {
\esc_html_e( 'Choose the SSL Version of your server on the Adyen Customer Area.', 'pronamic_ideal' );
},
];

/**
Expand All @@ -383,29 +385,33 @@ public function get_settings_fields() {
* @link https://www.howsmyssl.com/a/check
*/
$fields[] = [
'section' => 'feedback',
'title' => _x( 'Method', 'adyen notification', 'pronamic_ideal' ),
'type' => 'description',
'html' => __( 'JSON', 'pronamic_ideal' ),
'section' => 'feedback',
'title' => \_x( 'Method', 'adyen notification', 'pronamic_ideal' ),
'type' => 'custom',
'callback' => function () {
\esc_html_e( 'JSON', 'pronamic_ideal' );
},
];

// Webhook authentication settings.
$fields[] = [
'section' => 'feedback',
'title' => __( 'Authentication', 'pronamic_ideal' ),
'type' => 'description',
'html' => \sprintf(
/* translators: %s: Pronamic Pay settings page URL. */
__( 'Go to the <a href="%s">Pronamic Pay settings page</a> for webhook authentication settings.', 'pronamic_ideal' ),
\esc_url(
\add_query_arg(
[
'page' => 'pronamic_pay_settings',
],
\admin_url( 'admin.php' )
'section' => 'feedback',
'title' => \__( 'Authentication', 'pronamic_ideal' ),
'type' => 'custom',
'callback' => function () {
\printf(
/* translators: %s: Pronamic Pay settings page URL. */
__( 'Go to the <a href="%s">Pronamic Pay settings page</a> for webhook authentication settings.', 'pronamic_ideal' ),

Check failure on line 404 in src/Integration.php

View workflow job for this annotation

GitHub Actions / phpcs / phpcs

All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '__'.
\esc_url(
\add_query_arg(
[
'page' => 'pronamic_pay_settings',
],
\admin_url( 'admin.php' )
)
)
)
),
);
},
];

// Return fields.
Expand Down

0 comments on commit 451bb33

Please sign in to comment.