DragDropBuilder
1 month ago
EmailSettings
1 year ago
Membership
1 month ago
AbstractSettingsPage.php
2 years ago
AddNewForm.php
1 year ago
AdminFooter.php
4 years ago
ExtensionsSettingsPage.php
1 year ago
FormList.php
4 months ago
Forms.php
1 year ago
FuseWP.php
3 years ago
GeneralSettings.php
9 months ago
IDUserColumn.php
5 years ago
LicenseUpgrader.php
3 years ago
MailOptin.php
3 years ago
MemberDirectories.php
1 year ago
MembersDirectoryList.php
5 years ago
ToolsSettingsPage.php
4 years ago
index.php
3 years ago
AdminFooter.php
57 lines
| 1 | <?php |
| 2 | |
| 3 | namespace ProfilePress\Core\Admin\SettingsPages; |
| 4 | |
| 5 | // Exit if accessed directly |
| 6 | if ( ! defined('ABSPATH')) { |
| 7 | exit; |
| 8 | } |
| 9 | |
| 10 | class AdminFooter |
| 11 | { |
| 12 | public function __construct() |
| 13 | { |
| 14 | add_filter('admin_footer_text', [$this, 'admin_rate_us']); |
| 15 | } |
| 16 | |
| 17 | /** |
| 18 | * Add rating links to the admin dashboard |
| 19 | * |
| 20 | * @param string $footer_text The existing footer text |
| 21 | * |
| 22 | * @return string |
| 23 | */ |
| 24 | public function admin_rate_us($footer_text) |
| 25 | { |
| 26 | if (ppress_is_admin_page()) { |
| 27 | $rate_text = sprintf(__('Thank you for using <a href="%1$s" target="_blank">ProfilePress</a>! Please <a href="%2$s" target="_blank">rate us � |
| 28 | � |
| 29 | � |
| 30 | � |
| 31 | � |
| 32 | </a> on <a href="%2$s" target="_blank">WordPress.org</a> to help us spread the word.', 'wp-user-avatar'), |
| 33 | 'https://profilepress.com', |
| 34 | 'https://wordpress.org/support/view/plugin-reviews/wp-user-avatar?filter=5#postform' |
| 35 | ); |
| 36 | |
| 37 | $footer_text = '<span>' . $rate_text . '</span>'; |
| 38 | } |
| 39 | |
| 40 | return $footer_text; |
| 41 | } |
| 42 | |
| 43 | /** |
| 44 | * @return AdminFooter |
| 45 | */ |
| 46 | public static function get_instance() |
| 47 | { |
| 48 | static $instance = null; |
| 49 | |
| 50 | if (is_null($instance)) { |
| 51 | $instance = new self(); |
| 52 | } |
| 53 | |
| 54 | return $instance; |
| 55 | } |
| 56 | } |
| 57 |