-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmark-posts.php
81 lines (70 loc) · 2.29 KB
/
mark-posts.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
74
75
76
77
78
79
80
81
<?php
/**
* Plugin Name: Mark Posts
* Description: Mark and highlight posts, pages and posts of custom post types within the posts overview.
* Plugin URI: https://wordpress.org/plugins/mark-posts
* Version: 2.2.5
* Author: Sven Hofmann & Michael Schoenrock
* Author URI: https://hofmannsven.com
* Contributor: Michael Schoenrock
* Contributor URI: https://www.halloecho.de
* License: GPL-2.0+
* License URI: https://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: mark-posts
* GitHub URI: https://github.com/hofmannsven/mark-posts
*/
// If this file is called directly, abort.
if (! defined('WPINC')) {
exit;
}
/*----------------------------------------------------------------------------*
* Public-Facing Functionality
*----------------------------------------------------------------------------*/
/*
* plugin version
*
*/
if (! defined('WP_MARK_POSTS_VERSION')) {
define('WP_MARK_POSTS_VERSION', '2.2.5');
}
/*
* plugin dir path
*
*/
if (! defined('WP_MARK_POSTS_PATH')) {
define('WP_MARK_POSTS_PATH', plugin_dir_path(__FILE__));
}
/*
* plugin's class file
*
*/
require_once plugin_dir_path(__FILE__).'public/class-mark-posts.php';
/*
* Register hooks that are fired when the plugin is activated or deactivated.
* When the plugin is deleted, the uninstall.php file is loaded.
*
*/
register_activation_hook(__FILE__, ['Mark_Posts', 'activate']);
register_deactivation_hook(__FILE__, ['Mark_Posts', 'deactivate']);
/*
* Load the plugin text domain for translation
*
*/
function mark_posts_load_textdomain()
{
load_plugin_textdomain('mark-posts', false, dirname(plugin_basename(__FILE__)).'/languages/');
}
add_action('plugins_loaded', 'mark_posts_load_textdomain');
/*
* Add action plugins_loaded
*
*/
add_action('plugins_loaded', ['Mark_Posts', 'get_instance']);
/*----------------------------------------------------------------------------*
* Dashboard and Administrative Functionality
*----------------------------------------------------------------------------*/
if (is_admin()) {
require_once plugin_dir_path(__FILE__).'admin/class-mark-posts-marker.php';
require_once plugin_dir_path(__FILE__).'admin/class-mark-posts-admin.php';
add_action('plugins_loaded', ['Mark_Posts_Admin', 'get_instance']);
}