add-ons
5 years ago
donors
5 years ago
emails
6 years ago
forms
4 years ago
payments
4 years ago
reports
5 years ago
settings
4 years ago
shortcodes
5 years ago
tools
5 years ago
upgrades
5 years ago
views
6 years ago
abstract-admin-settings-page.php
6 years ago
admin-actions.php
5 years ago
admin-filters.php
6 years ago
admin-footer.php
5 years ago
admin-pages.php
5 years ago
class-addon-activation-banner.php
6 years ago
class-admin-settings.php
5 years ago
class-api-keys-table.php
6 years ago
class-blank-slate.php
6 years ago
class-give-admin.php
5 years ago
class-give-html-elements.php
6 years ago
class-i18n-module.php
6 years ago
dashboard-widgets.php
6 years ago
give-metabox-functions.php
5 years ago
import-functions.php
5 years ago
misc-functions.php
5 years ago
plugins.php
5 years ago
setting-page-functions.php
6 years ago
admin-footer.php
43 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Admin Footer |
| 4 | * |
| 5 | * @package Give |
| 6 | * @subpackage Admin/Footer |
| 7 | * @copyright Copyright (c) 2016, GiveWP |
| 8 | * @license https://opensource.org/licenses/gpl-license GNU Public License |
| 9 | * @since 1.0 |
| 10 | */ |
| 11 | |
| 12 | // Exit if accessed directly. |
| 13 | if ( ! defined( 'ABSPATH' ) ) { |
| 14 | exit; |
| 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 | * @since 1.0 |
| 24 | * @global string $typenow |
| 25 | */ |
| 26 | function give_admin_rate_us( $footer_text ) { |
| 27 | global $typenow; |
| 28 | |
| 29 | if ( 'give_forms' === $typenow ) { |
| 30 | $rate_text = sprintf( |
| 31 | /* translators: %s: Link to 5 star rating */ |
| 32 | __( 'If you like <strong>GiveWP</strong> please leave us a %s rating. It takes a minute and helps a lot. Thanks in advance!', 'give' ), |
| 33 | '<a href="https://wordpress.org/support/view/plugin-reviews/give?filter=5#postform" target="_blank" class="give-rating-link" style="text-decoration:none;" data-rated="' . esc_attr__( 'Thanks :)', 'give' ) . '">★★★★★</a>' |
| 34 | ); |
| 35 | |
| 36 | return $rate_text; |
| 37 | } else { |
| 38 | return $footer_text; |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | add_filter( 'admin_footer_text', 'give_admin_rate_us' ); |
| 43 |