PluginProbe
Mark Posts / 1.2.0
Mark Posts v1.2.0
trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 2.0.0 2.0.1 2.1.0 2.2.0 2.2.1 2.2.2 2.2.3 All 28 releases
mark-posts / mark-posts.php

mark-posts.php in Mark Posts 1.2.0, at mark-posts.php

82 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Mark Posts
4 * Description: Mark and highlight posts, pages and posts of custom post types within the posts overview.
5 * Plugin URI: https://wordpress.org/plugins/mark-posts
6 * Version: 1.2.0
7 * Author: Michael Schoenrock, Sven Hofmann
8 * Author URI: https://www.halloecho.de
9 * Contributor: Sven Hofmann
10 * Contributor URI: https://hofmannsven.com
11 * License: GPL-2.0+
12 * License URI: https://www.gnu.org/licenses/gpl-2.0.txt
13 * Text Domain: mark-posts
14 * GitHub URI: https://github.com/hofmannsven/mark-posts
15 */
16
17 // If this file is called directly, abort.
18 if ( ! defined( 'WPINC' ) ) {
19 die;
20 }
21
22 /*----------------------------------------------------------------------------*
23 * Public-Facing Functionality
24 *----------------------------------------------------------------------------*/
25
26 /*
27 * plugin version
28 *
29 */
30 if ( ! defined( 'WP_MARK_POSTS_VERSION' ) ) {
31 define( 'WP_MARK_POSTS_VERSION', '1.2.0' );
32 }
33
34 /*
35 * plugin dir path
36 *
37 */
38 if ( ! defined( 'WP_MARK_POSTS_PATH' ) ) {
39 define( 'WP_MARK_POSTS_PATH', plugin_dir_path( __FILE__ ) );
40 }
41
42 /*
43 * plugin's class file
44 *
45 */
46 require_once( plugin_dir_path( __FILE__ ) . 'public/class-mark-posts.php' );
47
48 /*
49 * Register hooks that are fired when the plugin is activated or deactivated.
50 * When the plugin is deleted, the uninstall.php file is loaded.
51 *
52 */
53 register_activation_hook( __FILE__, array( 'Mark_Posts', 'activate' ) );
54 register_deactivation_hook( __FILE__, array( 'Mark_Posts', 'deactivate' ) );
55
56 /*
57 * Load the plugin text domain for translation
58 *
59 */
60 function mark_posts_load_textdomain() {
61 load_plugin_textdomain( 'mark-posts', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
62 }
63 add_action( 'plugins_loaded', 'mark_posts_load_textdomain' );
64
65 /*
66 * Add action plugins_loaded
67 *
68 */
69 add_action( 'plugins_loaded', array( 'Mark_Posts', 'get_instance' ) );
70
71 /*----------------------------------------------------------------------------*
72 * Dashboard and Administrative Functionality
73 *----------------------------------------------------------------------------*/
74
75 if ( is_admin() ) {
76
77 require_once( plugin_dir_path( __FILE__ ) . 'admin/class-mark-posts-marker.php' );
78 require_once( plugin_dir_path( __FILE__ ) . 'admin/class-mark-posts-admin.php' );
79 add_action( 'plugins_loaded', array( 'Mark_Posts_Admin', 'get_instance' ) );
80
81 }
82