PluginProbe
Easy Basic Authentication – Add basic auth to site or admin area / 2.1
Easy Basic Authentication – Add basic auth to site or admin area v2.1
trunk 1.1 1.2 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.4 1.4.1 1.5 1.5.1 1.5.2 1.5.3 1.6 1.6.1 1.6.2 1.6.3 1.6.4 1.7 1.7.1 1.8 1.8.1 1.9 All 50 releases
easy-basic-authentication / easy-basic-authentication.php

easy-basic-authentication.php in Easy Basic Authentication – Add basic auth to site or admin area 2.1, at easy-basic-authentication.php

50 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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