PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.6.31
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.6.31
1.8.12.3 1.8.12.2 1.8.12.1 1.8.12 1.8.11.3 1.8.11.2 1.8.11.1 1.8.11 1.6.6 1.6.60 1.6.7 1.6.8 1.6.9 1.7.0 1.7.0.1 1.7.0.11 1.7.0.12 1.7.0.14 1.7.0.2 1.7.0.3 1.7.0.5 1.7.0.6 1.7.0.7 1.7.0.9 1.8.0 All 210 releases
charitable / includes / admin / charitable-admin-hooks.php

charitable-admin-hooks.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.6.31, at includes/admin/charitable-admin-hooks.php

109 lines 3.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Charitable Admin Hooks.
4 *
5 * @package Charitable/Functions/Admin
6 * @version 1.3.0
7 * @author Eric Daams
8 * @copyright Copyright (c) 2020, Studio 164a
9 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
10 */
11
12 // Exit if accessed directly.
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit;
15 }
16
17 /**
18 * Enqueue Charitable's admin-area scripts & styles.
19 *
20 * @see Charitable_Admin::admin_enqueue_scripts()
21 */
22 add_action( 'admin_enqueue_scripts', array( Charitable_Admin::get_instance(), 'admin_enqueue_scripts' ) );
23
24 /**
25 * Set custom admin body classes.
26 *
27 * @see Charitable_Admin::set_body_class()
28 */
29 add_filter( 'admin_body_class', array( Charitable_Admin::get_instance(), 'set_body_class' ) );
30
31 /**
32 * Do an admin action.
33 *
34 * @see Charitable_Admin::maybe_do_admin_action()
35 */
36 add_action( 'admin_init', array( Charitable_Admin::get_instance(), 'maybe_do_admin_action' ), 999 );
37
38 /**
39 * Check if there are any notices to be displayed in the admin.
40 *
41 * @see Charitable_Admin::add_notices()
42 */
43 add_action( 'admin_notices', array( Charitable_Admin::get_instance(), 'add_notices' ) );
44
45 /**
46 * Dismiss a notice.
47 *
48 * @see Charitable_Admin::dismiss_notice()
49 */
50 add_action( 'wp_ajax_charitable_dismiss_notice', array( Charitable_Admin::get_instance(), 'dismiss_notice' ) );
51
52 /**
53 * Add a generic body class to donations page
54 *
55 * @see Charitable_Admin::add_admin_body_class()
56 */
57 add_filter( 'admin_body_class', array( Charitable_Admin::get_instance(), 'add_admin_body_class' ) );
58
59 /**
60 * Remove jQuery UI styles added by Ninja Forms.
61 *
62 * @see Charitable_Admin::remove_jquery_ui_styles_nf()
63 */
64 add_filter( 'media_buttons_context', array( Charitable_Admin::get_instance(), 'remove_jquery_ui_styles_nf' ), 20 );
65
66 /**
67 * Add action links to the Charitable plugin block.
68 *
69 * @see Charitable_Admin::add_plugin_action_links()
70 */
71 add_filter( 'plugin_action_links_' . plugin_basename( charitable()->get_path() ), array( Charitable_Admin::get_instance(), 'add_plugin_action_links' ) );
72
73 /**
74 * Add a link to the settings page from the Charitable plugin block.
75 *
76 * @see Charitable_Admin::add_plugin_row_meta()
77 */
78 add_filter( 'plugin_row_meta', array( Charitable_Admin::get_instance(), 'add_plugin_row_meta' ), 10, 2 );
79
80 /**
81 * Export handlers.
82 *
83 * @see Charitable_Admin::export_donations()
84 * @see Charitable_Admin::export_campaigns()
85 */
86 add_action( 'charitable_export_donations', array( Charitable_Admin::get_instance(), 'export_donations' ) );
87 add_action( 'charitable_export_campaigns', array( Charitable_Admin::get_instance(), 'export_campaigns' ) );
88
89 /**
90 * Add Charitable menu.
91 *
92 * @see Charitable_Admin_Pages::add_menu()
93 */
94 add_action( 'admin_menu', array( Charitable_Admin_Pages::get_instance(), 'add_menu' ), 5 );
95
96 /**
97 * Redirect to welcome page after install.
98 *
99 * @see Charitable_Admin_Pages::redirect_to_welcome()
100 */
101 add_action( 'charitable_install', array( Charitable_Admin_Pages::get_instance(), 'setup_welcome_redirect' ), 100 );
102
103 /**
104 * Stash any notices that haven't been displayed.
105 *
106 * @see Charitable_Admin_Notices::shutdown()
107 */
108 add_action( 'shutdown', array( charitable_get_admin_notices(), 'shutdown' ) );
109