PluginProbe
Bulk Delete / trunk
Bulk Delete vtrunk
6.12 trunk 0.2 0.3 0.4 0.6 0.7 0.8 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.2.1 2.2.2 3.0 3.1 All 64 releases
bulk-delete / include / helpers / addon.php

addon.php in Bulk Delete trunk, at include/helpers/addon.php

32 lines 849 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Add-on helper functions.
4 *
5 * These functions are not using namespace since they may be used from a PHP 5.2 file.
6 *
7 * @since 6.0.0
8 */
9 defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
10
11 /**
12 * Load an Bulk Delete add-on.
13 *
14 * @since 6.0.0
15 *
16 * @param string $addon_class Add-on class name.
17 * @param array $addon_details Add-on Details.
18 *
19 * @return \BulkWP\BulkDelete\Addon\BaseAddon Instance of the add-on.
20 */
21 function load_bulk_delete_addon( $addon_class, $addon_details ) { //phpcs:ignore
22 $addon_info = new \BulkWP\BulkDelete\Core\Addon\AddonInfo( $addon_details );
23
24 $bulk_delete = \BulkWP\BulkDelete\Core\BulkDelete::get_instance();
25 $bulk_delete->register_addon_namespace( $addon_info );
26
27 $addon = new $addon_class( $addon_info );
28 add_action( 'bd_loaded', array( $addon, 'register' ) );
29
30 return $addon;
31 }
32