| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: Simple User Avatar |
| 4 |
* Plugin URI: https://wordpress.org/plugins/simple-user-avatar/ |
| 5 |
* Description: Add a <strong>user avatar</strong> using images from your Media Library. |
| 6 |
* Version: 5.1 |
| 7 |
* Requires at least: 4.0 |
| 8 |
* Requires PHP: 8.0 |
| 9 |
* Author: Matteo Manna |
| 10 |
* Author URI: https://matteomanna.com/ |
| 11 |
* License: GPL v2 or later |
| 12 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| 13 |
* Text Domain: simple-user-avatar |
| 14 |
*/ |
| 15 |
|
| 16 |
// Injection prevention |
| 17 |
if (!defined('ABSPATH')) { |
| 18 |
exit; |
| 19 |
} |
| 20 |
|
| 21 |
/** |
| 22 |
* Global defines |
| 23 |
* |
| 24 |
* @since 2.8 |
| 25 |
*/ |
| 26 |
if (!defined('SUA_PLUGIN_VERSION')) { |
| 27 |
define('SUA_PLUGIN_VERSION', 5.1); |
| 28 |
} |
| 29 |
|
| 30 |
if (!defined('SUA_USER_META_KEY')) { |
| 31 |
define('SUA_USER_META_KEY', 'mm_sua_attachment_id'); |
| 32 |
} |
| 33 |
|
| 34 |
if (!defined('SUA_TRANSIENT_NAME')) { |
| 35 |
define('SUA_TRANSIENT_NAME', 'sua_notice_is_expired'); |
| 36 |
} |
| 37 |
|
| 38 |
/** |
| 39 |
* Require classes |
| 40 |
* |
| 41 |
* @since 2.5 |
| 42 |
*/ |
| 43 |
require_once plugin_dir_path(__FILE__) . 'public/class-sua-public.php'; |
| 44 |
|
| 45 |
if (is_admin()) { |
| 46 |
require_once plugin_dir_path(__FILE__) . 'admin/class-sua-admin.php'; |
| 47 |
} |