Skip to content

Commit b10e6db

Browse files
committed
Настройка добавлена успешно. Функция
wptweaker_setting_37() теперь доступна в секции "Tweaks" плагина. При включении она изменит стандартное сообщение об ошибке логина на кастомное: "ОШИБКА: Неверное имя пользователя или пароль."
1 parent 9cc4d6f commit b10e6db

2 files changed

Lines changed: 27 additions & 4 deletions

File tree

functions/wp-functions.php

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
8: Set limit post revisions to 5
1111
9: Block http-requests by plugins/themes
1212
10: Disable heartbeat
13-
11: Disable Login-Error
14-
12: Disable new themes on major WP updates
13+
11: Disable new themes on major WP updates
14+
12: Remove jQuery Migrate
1515
13: Disable the XML-RPC
1616
14: Remove post by email function
1717
15: Disable URL-fields on comments
@@ -26,8 +26,17 @@
2626
24: Deregister widgets
2727
25: Remove license.txt и readme.html files
2828
26: Add filter to metabox of post taxonomies
29-
27:
30-
28:
29+
27: Disable select taxonomy in top of metabox in post-edit page
30+
28: If posts have status "pending" show numbers it in menu
31+
29: Showing message "Update wordpress" only admin
32+
30: Repalse [...] to "Read more ..." for posts
33+
31: Allow shortcode in "Text" widget
34+
32: Get jquery from google cloud
35+
33: Remove autotop function. Remove <p></p> tags in post content.
36+
34: Allow WEBP support for media
37+
35: Allow SVG support for media
38+
36: Disable browser checking in dashboard
39+
37: Change login error message
3140
3241
*/
3342

@@ -478,4 +487,12 @@ function wptweaker_setting_35() {
478487

479488
function wptweaker_setting_36() {
480489
add_filter( 'pre_site_transient_browser_' . md5( $_SERVER['HTTP_USER_AGENT'] ), '__return_null' );
490+
}
491+
492+
function wptweaker_setting_37() {
493+
// Изменение сообщения об ошибке логина
494+
add_filter( 'login_errors', 'custom_login_error_message' );
495+
function custom_login_error_message() {
496+
return '<strong>ОШИБКА</strong>: Неверное имя пользователя или пароль.';
497+
}
481498
}

src/Config/tweaks.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,4 +221,10 @@
221221
'title' => __('Disable browser checking in dashboard', 'wp-addon'),
222222
'default' => true,
223223
],
224+
[
225+
'id' => 'wptweaker_setting_37',
226+
'type' => 'switcher',
227+
'title' => __('Change login error message', 'wp-addon'),
228+
'default' => true,
229+
],
224230
];

0 commit comments

Comments
 (0)