← All changes
|
includes/admin/campaigns/charitable-admin-campaign-hooks.php
+25
-4
1.7.0.7
→
1.8.13
View file →
| @@ -5,12 +5,12 @@ | ||
| 5 | 5 | * Action/filter hooks used for setting up donations in the admin. |
| 6 | 6 | * |
| 7 | 7 | * @package Charitable/Functions/Admin |
| 8 | 8 | * @author David Bisset |
| 9 | - * @copyright Copyright (c) 2022, WP Charitable LLC | |
| 9 | + * @copyright Copyright (c) 2023, WP Charitable LLC | |
| 10 | 10 | * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
| 11 | 11 | * @since 1.5.0 |
| 12 | - * @version 1.6.24 | |
| 12 | + * @version 1.6.24, 1.8.9.1 | |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | 15 | // Exit if accessed directly. |
| 16 | 16 | if ( ! defined( 'ABSPATH' ) ) { |
| @@ -16,9 +16,9 @@ | ||
| 16 | 16 | if ( ! defined( 'ABSPATH' ) ) { |
| 17 | 17 | exit; |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | -$registry = charitable()->registry(); | |
| 20 | +$registry = charitable()->registry(); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- $registry is used in multiple add_action/add_filter hooks throughout this file. Changing it would break hook registrations. | |
| 21 | 21 | $registry->register_object( Charitable_Campaign_Meta_Boxes::get_instance() ); |
| 22 | 22 | |
| 23 | 23 | /** |
| 24 | 24 | * Sets the placeholder text of the campaign title field. |
| @@ -118,5 +118,26 @@ | ||
| 118 | 118 | * Add custom filters to the query that returns the campaigns to be displayed. |
| 119 | 119 | * |
| 120 | 120 | * @see Charitable_Campaign_List_Table::filter_request_query() |
| 121 | 121 | */ |
| 122 | -add_filter( 'request', array( Charitable_Campaign_List_Table::get_instance(), 'filter_request_query' ) ); | |
| 122 | +add_filter( 'request', array( Charitable_Campaign_List_Table::get_instance(), 'filter_request_query' ) ); | |
| 123 | + | |
| 124 | +/** | |
| 125 | + * Add custom css to body for campaign page. | |
| 126 | + * | |
| 127 | + * @see Charitable_Campaign_List_Table::admin_body_class() | |
| 128 | + */ | |
| 129 | +add_filter( 'admin_body_class', array( Charitable_Campaign_List_Table::get_instance(), 'admin_body_class' ) ); | |
| 130 | + | |
| 131 | +/** | |
| 132 | + * Add the legacy add button above the campaigns table. | |
| 133 | + * | |
| 134 | + * @see Charitable_Campaign_List_Table::add_export() | |
| 135 | + */ | |
| 136 | +add_action( 'manage_posts_extra_tablenav', array( Charitable_Campaign_List_Table::get_instance(), 'add_legacy_link' ) ); | |
| 137 | + | |
| 138 | +/** | |
| 139 | + * Set the content of each column item. | |
| 140 | + * | |
| 141 | + * @see Charitable_Campaign_List_Table::maybe_render_blank_state() | |
| 142 | + */ | |
| 143 | +add_action( 'manage_posts_extra_tablenav', array( Charitable_Campaign_List_Table::get_instance(), 'maybe_render_blank_state' ), 11, 2 ); | |