PluginProbe
Groups – Memberships and Access Control / 1.1.4
Groups – Memberships and Access Control v1.1.4
4.7.1 4.7.0 4.6.0 4.5.0 4.4.0 4.3.0 trunk 1.0.0-beta-1 1.0.0-beta-2 1.0.0-beta-3 1.0.0-beta-3b 1.0.0-beta-3c 1.0.0-beta-3d 1.1.4 1.1.5 1.10.0 1.10.1 1.10.2 1.10.3 1.11.0 1.11.1 1.11.2 1.11.3 1.12.0 1.13.0 All 131 releases
groups / lib / core / wp-init.php

wp-init.php in Groups – Memberships and Access Control 1.1.4, at lib/core/wp-init.php

111 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * wp-init.php
4 *
5 * Copyright (c) "kento" Karim Rahimpur www.itthinx.com
6 *
7 * This code is released under the GNU General Public License.
8 * See COPYRIGHT.txt and LICENSE.txt.
9 *
10 * This code is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * This header and all notices must be kept intact.
16 *
17 * @author Karim Rahimpur
18 * @package groups
19 * @since groups 1.0.0
20 */
21
22 global $groups_version, $groups_admin_messages;
23
24 if ( !isset( $groups_admin_messages ) ) {
25 $groups_admin_messages = array();
26 }
27
28 if ( !isset( $groups_version ) ) {
29 $groups_version = GROUPS_CORE_VERSION;
30 }
31
32 // <= 3.2.1
33 if ( !function_exists( 'is_user_member_of_blog' ) ) {
34 function is_user_member_of_blog( $user_id, $blog_id = 0 ) {
35 return false !== get_user_by( "id", $user_id );
36 }
37 }
38
39 /**
40 * Load core :
41 */
42
43 require_once( GROUPS_CORE_LIB . '/class-groups-utility.php' );
44
45 // options
46 require_once( GROUPS_CORE_LIB . '/class-groups-options.php' );
47
48 // plugin control: activation, deactivation, ...
49 require_once( GROUPS_CORE_LIB . '/class-groups-controller.php' );
50
51 // admin
52 require_once( GROUPS_ADMIN_LIB . '/class-groups-admin.php' );
53 require_once( GROUPS_ADMIN_LIB . '/class-groups-admin-users.php' );
54
55 // help
56 require_once( GROUPS_CORE_LIB . '/class-groups-help.php' );
57
58 require_once( GROUPS_CORE_LIB . '/class-groups-capability.php' );
59 require_once( GROUPS_CORE_LIB . '/class-groups-group.php' );
60 require_once( GROUPS_CORE_LIB . '/class-groups-group-capability.php' );
61 require_once( GROUPS_CORE_LIB . '/class-groups-user.php' );
62 require_once( GROUPS_CORE_LIB . '/class-groups-user-capability.php' );
63 require_once( GROUPS_CORE_LIB . '/class-groups-user-group.php' );
64
65 /**
66 * Load auto :
67 */
68
69 require_once( GROUPS_AUTO_LIB . '/class-groups-registered.php' );
70
71 /**
72 * Load access :
73 */
74
75 require_once( GROUPS_ACCESS_LIB . '/class-groups-post-access.php' );
76
77 if ( is_admin() ) {
78 require_once( GROUPS_ACCESS_LIB . '/class-groups-access-meta-boxes.php' );
79 }
80 require_once( GROUPS_ACCESS_LIB . '/class-groups-access-shortcodes.php' );
81 require_once( GROUPS_VIEWS_LIB . '/class-groups-shortcodes.php' );
82
83 /**
84 * Load wp :
85 */
86 require_once( GROUPS_WP_LIB . '/class-groups-wordpress.php' );
87
88 // widgets
89 // include_once( GROUPS_CORE_LIB . '/class-groups-widgets.php' );
90 // add_action( 'widgets_init', 'groups_widgets_init' );
91
92 /**
93 * Register widgets
94 */
95 // function groups_widgets_init() {
96 // register_widget( 'Groups_Widget' );
97 // }
98
99
100
101
102 /**
103 * Returns the prefixed DB table name.
104 * @param string $name the name of the DB table
105 * @return string prefixed DB table name
106 */
107 function _groups_get_tablename( $name ) {
108 global $wpdb;
109 return $wpdb->prefix . GROUPS_TP . $name;
110 }
111