| 1 |
<?php |
| 2 |
/* |
| 3 |
Plugin Name: Easy Basic Authentication |
| 4 |
description: Enhance WordPress security with Easy Basic Authentication plugin. |
| 5 |
Version: 2.1 |
| 6 |
Author: Matteo Enna |
| 7 |
Author URI: https://matteoenna.it/it/wordpress-work/ |
| 8 |
Text Domain: easy-basic-authentication |
| 9 |
License: GPL2 |
| 10 |
*/ |
| 11 |
|
| 12 |
if ( ! defined( 'ABSPATH' ) ) { |
| 13 |
exit; |
| 14 |
} |
| 15 |
|
| 16 |
require_once (dirname(__FILE__).'/class/easy-basic-authentication-class.php'); |
| 17 |
|
| 18 |
function easy_basic_authentication_admin_notice() { |
| 19 |
$current_user = wp_get_current_user(); |
| 20 |
$user_language = esc_html(get_user_meta($current_user->ID, 'locale', true)); |
| 21 |
|
| 22 |
?> |
| 23 |
<div class="notice notice-info is-dismissible"> |
| 24 |
<p> |
| 25 |
<?php |
| 26 |
// Translators: 1: Link to profile, 2: User language, 3: Link to translation instructions |
| 27 |
printf( |
| 28 |
wp_kses( |
| 29 |
/* translators: 1: Link to profile, 2: User language, 3: Link to translation instructions */ |
| 30 |
__('Hi, I\'m <a href="%1$s">Matteo</a>, the developer of <b>Easy Basic Authentication</b>. If you are enjoying and finding this plugin useful, please consider helping us translate it into %2$s. Check if translations are available for your language and start contributing. <a href="%3$s">Click here to find out how you can help</a>.', 'easy-basic-authentication'), |
| 31 |
array( |
| 32 |
'a' => array( |
| 33 |
'href' => array(), |
| 34 |
), |
| 35 |
'b' => array(), |
| 36 |
) |
| 37 |
), |
| 38 |
esc_url('https://profiles.wordpress.org/matteoenna/'), |
| 39 |
esc_html($user_language ? $user_language : __('your language', 'easy-basic-authentication')), |
| 40 |
esc_url('https://make.wordpress.org/polyglots/handbook/translating/') |
| 41 |
); |
| 42 |
?> |
| 43 |
</p> |
| 44 |
</div> |
| 45 |
<?php |
| 46 |
} |
| 47 |
add_action('admin_notices', 'easy_basic_authentication_admin_notice'); |
| 48 |
|
| 49 |
$scb = new easy_basic_authentication_class(); |
| 50 |
|