do not rely on WP core translation and add textdomain for all texts
This commit is contained in:
parent
2dd8e60bd8
commit
e4fd34d036
@ -209,7 +209,7 @@ class StatifyBlacklist_Admin extends StatifyBlacklist {
|
||||
if ( STATIFYBLACKLIST_BASE === $file && current_user_can( 'manage_options' ) ) {
|
||||
array_unshift(
|
||||
$links,
|
||||
sprintf( '<a href="%s">%s</a>', esc_attr( add_query_arg( 'page', 'statify-blacklist', $base ) ), __( 'Settings' ) )
|
||||
sprintf( '<a href="%s">%s</a>', esc_attr( add_query_arg( 'page', 'statify-blacklist', $base ) ), __( 'Settings', 'statify-blacklist' ) )
|
||||
);
|
||||
}
|
||||
|
||||
@ -226,7 +226,7 @@ class StatifyBlacklist_Admin extends StatifyBlacklist {
|
||||
public static function cleanup_database() {
|
||||
// Check user permissions.
|
||||
if ( ! current_user_can( 'manage_options' ) && ! ( defined( 'DOING_CRON' ) && DOING_CRON ) ) {
|
||||
die( esc_html__( 'Are you sure you want to do this?' ) );
|
||||
die( esc_html__( 'Are you sure you want to do this?', 'statify-blacklist' ) );
|
||||
}
|
||||
|
||||
if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
|
||||
|
@ -18,6 +18,12 @@
|
||||
<exclude name="WordPress.DB.DirectDatabaseQuery.NoCaching"/>
|
||||
</rule>
|
||||
|
||||
<rule ref="WordPress.WP.I18n">
|
||||
<properties>
|
||||
<property name="text_domain" type="array" value="statify-blacklist"/>
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
<!-- PHP compatibility level -->
|
||||
<config name="testVersion" value="5.5-"/>
|
||||
<rule ref="PHPCompatibility"/>
|
||||
|
@ -21,7 +21,7 @@ if ( ! empty( $_POST['statifyblacklist'] ) ) {
|
||||
|
||||
// Check user capabilities.
|
||||
if ( ! current_user_can( 'manage_options' ) ) {
|
||||
die( esc_html__( 'Are you sure you want to do this?' ) );
|
||||
die( esc_html__( 'Are you sure you want to do this?', 'statify-blacklist' ) );
|
||||
}
|
||||
|
||||
if ( ! empty( $_POST['cleanUp'] ) ) {
|
||||
@ -375,7 +375,7 @@ if ( ! empty( $_POST['statifyblacklist'] ) ) {
|
||||
</table>
|
||||
|
||||
<p class="submit">
|
||||
<input class="button-primary" type="submit" name="submit" value="<?php esc_html_e( 'Save Changes' ); ?>">
|
||||
<input class="button-primary" type="submit" name="submit" value="<?php esc_html_e( 'Save Changes', 'statify-blacklist' ); ?>">
|
||||
<hr>
|
||||
<input class="button-secondary" type="submit" name="cleanUp"
|
||||
value="<?php esc_html_e( 'CleanUp Database', 'statify-blacklist' ); ?>"
|
||||
|
Loading…
x
Reference in New Issue
Block a user