diff --git a/app/Gianism/Pattern/Singleton.php b/app/Gianism/Pattern/Singleton.php index 78f5406..cde842a 100644 --- a/app/Gianism/Pattern/Singleton.php +++ b/app/Gianism/Pattern/Singleton.php @@ -23,7 +23,8 @@ abstract class Singleton { * * @param array $argument */ - protected function __construct( array $argument = [] ) { // @phpstan-ignore constructor.unusedParameter + protected function __construct( array $argument = [] ) { + // @phpstan-ignore constructor.unusedParameter // Override something. } diff --git a/app/Gianism/UI/Screen.php b/app/Gianism/UI/Screen.php index dd9b6ba..ca5fec4 100644 --- a/app/Gianism/UI/Screen.php +++ b/app/Gianism/UI/Screen.php @@ -115,10 +115,13 @@ protected function load_template( $name ) { } else { printf( '
%s
is missing.', 'wp-gianism' ),
- esc_html( $name )
- ) )
+ wp_kses_post(
+ sprintf(
+ // translators: %s is template name.
+ __( 'Template file %s
is missing.', 'wp-gianism' ),
+ esc_html( $name )
+ )
+ )
);
}
/**
diff --git a/phpstan.neon b/phpstan.neon
index 2a8b570..fdd702e 100644
--- a/phpstan.neon
+++ b/phpstan.neon
@@ -18,5 +18,3 @@ parameters:
bootstrapFiles:
- vendor/autoload.php
-
- editorUrlTitle: '%%relFile%%:%%line%%'
diff --git a/templates/advanced.php b/templates/advanced.php
index 7a2aad1..b551cd4 100644
--- a/templates/advanced.php
+++ b/templates/advanced.php
@@ -86,11 +86,14 @@ function my_facebook_auth( $facebook, $args $token ) {
Note: $facebook
object is instance of Facebook class which is part of Facebook PHP SDK. To know what you can do with it, read the documentation.', 'wp-gianism' ),
- 'https://developers.facebook.com/docs/reference/php/'
- ) ); ?>
+ __( 'Note: $facebook
object is instance of Facebook class which is part of Facebook PHP SDK. To know what you can do with it, read the documentation.', 'wp-gianism' ),
+ 'https://developers.facebook.com/docs/reference/php/'
+ )
+ );
+ ?>
here to get required infomation.', 'wp-gianism' ), - 'Facebook', - 'https://developers.facebook.com/apps' - ) ); - echo wp_kses_post( sprintf( + __( 'You have to create %1$s App here to get required infomation.', 'wp-gianism' ), + 'Facebook', + 'https://developers.facebook.com/apps' + ) + ); + echo wp_kses_post( + sprintf( // translators: %1$s is URL, %2$s is label. - __( 'See detail at %2$s.', 'wp-gianism' ), - esc_url( $this->setting_url( 'setup' ) ), - esc_html__( 'How to set up', 'wp-gianism' ) - ) ); + __( 'See detail at %2$s.', 'wp-gianism' ), + esc_url( $this->setting_url( 'setup' ) ), + esc_html__( 'How to set up', 'wp-gianism' ) + ) + ); ?>
@@ -94,10 +98,13 @@ fb_use_api ) : ?>Facebook API page.', 'wp-gianism' ), - $this->setting_url( 'fb-api' ) - ) ); + echo wp_kses_post( + sprintf( + // translators: %s is URL. + __( 'You must set up token on Facebook API page.', 'wp-gianism' ), + $this->setting_url( 'fb-api' ) + ) + ); ?>