-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfrontend-dashboard-custom-post.php
78 lines (70 loc) · 2.09 KB
/
frontend-dashboard-custom-post.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
<?php
/**
* Plugin Name: Frontend Dashboard Custom Post
* Plugin URI: https://buffercode.com/plugin/frontend-dashboard-custom-post-and-taxonomies
* Description: Frontend Dashboard Custom Post is a plugin to show the custom post inside the Frontend Dashboard.
* Version: 1.5.10
* Author: vinoth06
* Author URI: http://buffercode.com/
* License: GPLv2
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: frontend-dashboard-custom-post
*
* @package frontend-dashboard
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$fed_check = get_option( 'fed_plugin_version' );
include_once ABSPATH . 'wp-admin/includes/plugin.php';
if ( $fed_check && is_plugin_active( 'frontend-dashboard/frontend-dashboard.php' ) ) {
/**
* Version Number
*/
define( 'FED_CP_PLUGIN_VERSION', '1.5.10' );
/**
* App Name
*/
define( 'FED_CP_APP_NAME', 'Frontend Dashboard Pages' );
/**
* Root Path
*/
define( 'FED_CP_PLUGIN', __FILE__ );
/**
* Plugin Base Name
*/
define( 'FED_CP_PLUGIN_BASENAME', plugin_basename( FED_CP_PLUGIN ) );
/**
* Plugin Name
*/
define( 'FED_CP_PLUGIN_NAME', trim( dirname( FED_CP_PLUGIN_BASENAME ), '/' ) );
/**
* Plugin Directory
*/
define( 'FED_CP_PLUGIN_DIR', untrailingslashit( dirname( FED_CP_PLUGIN ) ) );
require_once FED_CP_PLUGIN_DIR . '/install.php';
require_once FED_CP_PLUGIN_DIR . '/menu/class-fed-cp-menu.php';
require_once FED_CP_PLUGIN_DIR . '/menu/class-fed-cp-custom-posts.php';
require_once FED_CP_PLUGIN_DIR . '/menu/class-fed-cp-taxonomies.php';
require_once FED_CP_PLUGIN_DIR . '/functions.php';
fed_custom_post_install();
}
else {
/**
* Global Admin Notification for Custom Post Taxonomies
*/
function fed_global_admin_notification_post() {
?>
<div class="notice notice-warning">
<p>
<b>
<?php _e( 'Please install <a href="https://buffercode.com/plugin/frontend-dashboard">Frontend Dashboard</a> to use this plugin [Frontend Dashboard Custom Post and Taxonomies]',
'frontend-dashboard-custom-post' );
?>
</b>
</p>
</div>
<?php
}
add_action( 'admin_notices', 'fed_global_admin_notification_post' );
}