PluginProbe
UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP / 1.2.65
UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP v1.2.65
1.2.72 1.2.71 1.2.70 1.2.69 1.2.68 1.2.67 1.2.66 1.2.65 1.2.64 1.2.63 trunk 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.20 1.0.21 1.0.22 1.0.23 All 172 releases
userswp / widgets / users-item.php

users-item.php in UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP 1.2.65, at widgets/users-item.php

78 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit;
4 }
5
6 /**
7 * UsersWP users widget.
8 *
9 * @since 1.0.22
10 */
11 class UWP_Users_Item_Widget extends WP_Super_Duper {
12
13 /**
14 * Register the users widget with WordPress.
15 *
16 */
17 public function __construct() {
18
19
20 $options = array(
21 'textdomain' => 'userswp',
22 'block-icon' => 'admin-site',
23 'block-category' => 'widgets',
24 'block-keywords' => "['userswp','users']",
25 'class_name' => __CLASS__,
26 'base_id' => 'uwp_users_item',
27 'no_wrap' => true,
28 'block-wrap' => '',
29 'name' => __( 'UWP > Users Item', 'userswp' ),
30 'widget_ops' => array(
31 'classname' => 'uwp-users-item-class',
32 'description' => esc_html__( 'Template for displaying a single user item inside the users loop.', 'userswp' ),
33 ),
34 'arguments' => array()
35
36 );
37
38
39 parent::__construct( $options );
40 }
41
42 /**
43 * The Super block output function.
44 *
45 * @param array $args
46 * @param array $widget_args
47 * @param string $content
48 *
49 * @return mixed|string|bool
50 */
51 public function output( $args = array(), $widget_args = array(), $content = '' ) {
52
53 ob_start();
54
55 $design_style = uwp_get_option( "design_style", 'bootstrap' );
56
57 if ( $design_style == 'bootstrap' ) {
58
59 echo do_shortcode( "[uwp_profile_header]" );
60
61 ?>
62
63 <div class="card-body">
64 <?php echo do_shortcode( "[uwp_output_location location='users']" ); ?>
65 </div>
66 <div class="card-footer">
67 <?php echo do_shortcode( "[uwp_user_actions]" ); ?>
68 </div>
69 <?php
70 } else {
71 echo do_shortcode( "[uwp_profile_header][uwp_user_title tag= 'h4'][uwp_profile_social][uwp_output_location location='users'][uwp_user_actions]" );
72 }
73
74 return ob_get_clean();
75
76 }
77
78 }