class-give-tools-delete-import-donors.php
7 years ago
class-give-tools-delete-test-donors.php
7 years ago
class-give-tools-delete-test-transactions.php
7 years ago
class-give-tools-recount-all-stats.php
8 years ago
class-give-tools-recount-donor-stats.php
8 years ago
class-give-tools-recount-form-stats.php
8 years ago
class-give-tools-recount-income.php
7 years ago
class-give-tools-recount-single-donor-stats.php
8 years ago
class-give-tools-reset-stats.php
7 years ago
tools-actions.php
8 years ago
tools-actions.php
74 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Tools Actions |
| 4 | * |
| 5 | * @package Give |
| 6 | * @subpackage Admin/Tools |
| 7 | * @copyright Copyright (c) 2016, WordImpress |
| 8 | * @license https://opensource.org/licenses/gpl-license GNU Public License |
| 9 | * @since 1.5 |
| 10 | */ |
| 11 | |
| 12 | |
| 13 | if ( ! defined( 'ABSPATH' ) ) { |
| 14 | exit; |
| 15 | } |
| 16 | |
| 17 | /** |
| 18 | * Register the recount batch processor. |
| 19 | * |
| 20 | * @since 1.5 |
| 21 | */ |
| 22 | function give_register_batch_recount_export_classes() { |
| 23 | add_action( 'give_batch_export_class_include', 'give_include_batch_export_class', 10, 1 ); |
| 24 | } |
| 25 | |
| 26 | add_action( 'give_register_batch_exporter', 'give_register_batch_recount_export_classes', 10 ); |
| 27 | |
| 28 | |
| 29 | /** |
| 30 | * Loads the tools batch processing classes. |
| 31 | * |
| 32 | * @since 1.8 |
| 33 | * |
| 34 | * @param string $class The class being requested to run for the batch export. |
| 35 | * |
| 36 | * @return void |
| 37 | */ |
| 38 | function give_include_batch_export_class( $class ) { |
| 39 | switch ( $class ) { |
| 40 | |
| 41 | case 'Give_Tools_Delete_Donors': |
| 42 | require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/data/class-give-tools-delete-test-donors.php'; |
| 43 | break; |
| 44 | |
| 45 | case 'Give_Tools_Import_Donors': |
| 46 | require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/data/class-give-tools-delete-import-donors.php'; |
| 47 | break; |
| 48 | |
| 49 | case 'Give_Tools_Delete_Test_Transactions': |
| 50 | require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/data/class-give-tools-delete-test-transactions.php'; |
| 51 | break; |
| 52 | |
| 53 | case 'Give_Tools_Recount_Donor_Stats': |
| 54 | require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/data/class-give-tools-recount-donor-stats.php'; |
| 55 | break; |
| 56 | |
| 57 | case 'Give_Tools_Reset_Stats': |
| 58 | require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/data/class-give-tools-reset-stats.php'; |
| 59 | break; |
| 60 | |
| 61 | case 'Give_Tools_Recount_All_Stats': |
| 62 | require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/data/class-give-tools-recount-all-stats.php'; |
| 63 | break; |
| 64 | |
| 65 | case 'Give_Tools_Recount_Form_Stats': |
| 66 | require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/data/class-give-tools-recount-form-stats.php'; |
| 67 | break; |
| 68 | |
| 69 | case 'Give_Tools_Recount_Income': |
| 70 | require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/data/class-give-tools-recount-income.php'; |
| 71 | break; |
| 72 | } |
| 73 | } |
| 74 |