forked from creedally/bulk-featured-image
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbulk-featured-image.php
73 lines (59 loc) · 1.87 KB
/
bulk-featured-image.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
/*
Plugin Name: Bulk Featured Image
Plugin URI: https://wordpress.org/
Description: Bulk Featured images update.
Version: 1.0.0
Author: CreedAlly
Author URI: https://creedally.com/
License: GPL-2.0+
License URI: http://www.gnu.org/licenses/gpl-2.0.txt
Text Domain: bulk-featured-image
Domain Path: /languages
*/
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) exit;
// Define plugin version.
define( 'BFIE_VERSION', '1.0.0' );
// Define plugin dir path.
define( 'BFIE_PATH', plugin_dir_path( __FILE__ ) );
// Define plugin dir url.
define( 'BFIE_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
// Define default per page.
define( 'BFIE_PER_PAGE', 20 );
// Define plugin menu slug.
define('BFIE_MENU_SLUG', 'bulk-featured-image');
// Define plugin basename.
define('BFIE_PLUGIN_BASENAME', plugin_basename( __FILE__ ));
/**
* The core plugin class that is used to define internationalization,
* admin-specific hooks, and public-facing site hooks.
*/
require plugin_dir_path(__FILE__) . 'includes/class-bulk-featured-image.php';
register_activation_hook( __FILE__, 'activate_bulk_featured_image' );
/**
* The code that runs during plugin activation.
* This action is documented in includes/activator.php
*/
function activate_bulk_featured_image() {
require_once ('includes/activator.php');
BFIE_Activator::activate();
}
register_deactivation_hook( __FILE__, 'deactivate_bulk_featured_image' );
/**
* The code that runs during plugin deactivation.
* This action is documented in includes/deactivator.php
*/
function deactivate_bulk_featured_image() {
require_once ('includes/deactivator.php');
BFIE_Deactivator::deactivate();
}
/**
* Begins execution of the plugin.
*
* @since 1.0.0
*/
function init_bulk_featured_image() {
BFIE::get_instance();
}
add_action( 'plugins_loaded', 'init_bulk_featured_image', apply_filters( 'bulk_featured_image_action_priority', 10 ) );