PluginProbe
Groups – Memberships and Access Control / 1.11.0
Groups – Memberships and Access Control v1.11.0
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 / admin / groups-admin-tree-view.php

groups-admin-tree-view.php in Groups – Memberships and Access Control 1.11.0, at lib/admin/groups-admin-tree-view.php

55 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * groups-admin-tree-view.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 if ( !defined( 'ABSPATH' ) ) {
23 exit;
24 }
25
26 /**
27 * Tree view : a simple tree view
28 */
29 function groups_admin_tree_view() {
30
31 global $wpdb;
32
33 $output = '';
34 $today = date( 'Y-m-d', time() );
35
36 if ( !current_user_can( GROUPS_ACCESS_GROUPS ) ) {
37 wp_die( __( 'Access denied.', GROUPS_PLUGIN_DOMAIN ) );
38 }
39
40 $output .=
41 '<div class="groups-tree-view">' .
42 '<h1>' .
43 __( 'Tree of Groups', GROUPS_PLUGIN_DOMAIN ) .
44 '</h1>';
45
46 $tree = Groups_Utility::get_group_tree();
47 $tree_output = '';
48 Groups_Utility::render_group_tree( $tree, $tree_output );
49 $output .= $tree_output;
50
51 $output .= '</div>'; // .groups-tree-view
52
53 echo $output;
54 } // function groups_admin_tree_view()
55