-
Notifications
You must be signed in to change notification settings - Fork 1
/
wp-revision-list.php
53 lines (41 loc) · 1.81 KB
/
wp-revision-list.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
<?php
/*
Plugin Name: WP Revision List
Description: Show revisions when viewing lists of posts, pages, or custom post types in the admin dashboard
Version: 1.1.8
Plugin URI: https://github.com/petenelson/wp-revision-list
Author: Pete Nelson <a href="https://twitter.com/CodeGeekATX">(@CodeGeekATX)</a>
Text Domain: wp-revision-list
Domain Path: /lang
*/
if ( ! defined( 'ABSPATH' ) ) exit( 'restricted access' );
// load the text domain
add_action( 'plugins_loaded', 'wp_revision_list_load_text_domain' );
if ( ! function_exists( 'wp_revision_list_load_text_domain' ) ) {
function wp_revision_list_load_text_domain() {
load_plugin_textdomain( 'wp-revision-list', false, basename( plugin_dir_path( __FILE__ ) ) . '/lang/' );
}
}
// include required files
$includes = array( 'core', 'settings', 'screen-options', 'table' );
foreach ( $includes as $include ) {
require_once plugin_dir_path( __FILE__ ) . 'includes/class-wp-revision-list-' . $include . '.php';
}
// load our classes, hook them to WordPress
if ( class_exists( 'WP_Revision_List_Core' ) ) {
$revision_core = new WP_Revision_List_Core();
add_action( 'plugins_loaded', array( $revision_core, 'plugins_loaded' ) );
}
if ( class_exists( 'WP_Revision_List_Settings' ) ) {
$revision_settings = new WP_Revision_List_Settings();
add_action( 'plugins_loaded', array( $revision_settings, 'plugins_loaded' ) );
register_activation_hook( __FILE__, array( $revision_settings, 'activation_hook' ) );
}
if ( class_exists( 'WP_Revision_List_Screen_Options' ) ) {
$revision_screen_opt = new WP_Revision_List_Screen_Options();
add_action( 'plugins_loaded', array( $revision_screen_opt, 'plugins_loaded' ) );
}
if ( class_exists( 'WP_Revision_List_Table' ) ) {
$revision_table = new WP_Revision_List_Table();
add_action( 'plugins_loaded', array( $revision_table, 'plugins_loaded' ) );
}