PluginProbe
AWSM Team – Team Showcase Plugin / 1.3.3
AWSM Team – Team Showcase Plugin v1.3.3
trunk 1.0 1.1 1.1.2 1.2.1 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4
awsm-team / includes / team-details.php

team-details.php in AWSM Team – Team Showcase Plugin 1.3.3, at includes/team-details.php

179 lines 7.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Team Details Meta.
4 *
5 * @package awsm-team
6 */
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit;
10 }
11 ?>
12 <div class="wrap">
13 <div class="awsm-team-customize">
14 <!-- <h2 class="awsm-sub-heading"></h2> -->
15 <div class="awsm-team-customize-inner">
16 <div class="awsm-team-customize-member">
17 <div class="awsm-heading-group">
18 <h2 class="sub-h"><?php esc_html_e( 'Members', 'awsm-team' ); ?></h2>
19 <span><?php esc_html_e( 'Select members from the dropdown, drag and drop them to reorder.', 'awsm-team' ); ?></span>
20 </div>
21 <div class="awsm-select-members">
22 <?php
23 if ( $members->have_posts() ) :
24 ?>
25 <select name="members" id="awsm-members">
26 <?php
27 echo '<option value="" data-img="' . esc_attr( $defaultimage ) . '">' . esc_html_e( 'Select a member', 'awsm-team' ) . '</option>';
28 while ( $members->have_posts() ) :
29 $members->the_post();
30 $disabled = '';
31 if ( in_array( $members->post->ID, $options['memberlist'] ) ) {
32 $disabled = 'disabled';
33 }
34 echo '<option value="' . esc_attr( $members->post->ID ) . '" data-img="' . esc_attr( $this->team_thumbnail( $members->post->ID, 'thumbnail' ) ) . '" ' . esc_attr( $disabled ) . '>' . esc_html( get_the_title() ) . '</option>';
35 endwhile;
36 wp_reset_postdata();
37 ?>
38 </select>
39 <?php
40 else :
41 $addmember = admin_url( 'post-new.php?post_type=awsm_team_member' );
42 echo '<p>';
43 esc_html_e( 'You haven’t added any team members yet. ', 'awsm-team' );
44 echo '<a href="' . esc_url( $addmember ) . '">' . esc_html__( 'Add a team member', 'awsm-team' ) . '</a>';
45 echo '</p>';
46 endif;
47 ?>
48 </div><!-- .awsm-select-members -->
49 <ul class="awsm-members-list-selected">
50 <div class="awsm-members-info"><?php esc_html_e( 'No Members Selected', 'awsm-team' ); ?></div>
51 <script type="text/html" id="tmpl-awsm-member-list">
52 <li data-member-id="{{{data.id}}}" class="">
53 <img width="31" height="31" src="{{{data.src}}}"/>
54 <p>{{{data.title}}}</p><span class="remove-member-to-list" data-member="{{{data.id}}}"><i class="awsm-icon-close"></i></span>
55 <input type="hidden" name="memberlist[]" value='{{{data.id}}}'>
56 </li>
57 </script>
58 <?php
59 if ( $options['memberlist'] ) :
60 $teamargs = array(
61 'orderby' => 'post__in',
62 'post_type' => 'awsm_team_member',
63 'post__in' => $options['memberlist'],
64 'posts_per_page' => -1,
65 );
66 $team = new WP_Query( $teamargs );
67 if ( $team->have_posts() ) :
68 while ( $team->have_posts() ) :
69 $team->the_post();
70 ?>
71 <li data-member-id="<?php echo esc_attr( $team->post->ID ); ?>" class="">
72 <img width="31" height="31" src="<?php echo esc_url( $this->team_thumbnail( $team->post->ID, 'thumbnail' ) ); ?>"/>
73 <p><?php the_title(); ?></p><span class="remove-member-to-list" data-member="<?php echo esc_attr( $team->post->ID ); ?>"><i class="awsm-icon-close"></i></span>
74 <input type="hidden" name="memberlist[]" value="<?php echo esc_attr( $team->post->ID ); ?>">
75 </li>
76 <?php
77 endwhile;
78 wp_reset_postdata();
79 endif;
80 endif;
81 ?>
82 </ul><!-- .awsm-members-list-selected -->
83 </div><!-- .awsm-team-customize-member -->
84 <div class="awsm-team-customize-style">
85 <div class="awsm-heading-group">
86 <h2 class="sub-h"><?php esc_html_e( 'Presets', 'awsm-team' ); ?></h2>
87 <span><?php esc_html_e( 'Choose a preset from below.', 'awsm-team' ); ?></span>
88 </div>
89 <div class="awsm-preset-list awsm-clearfix">
90 <?php
91 $styles = array(
92 'Cards' => array( 4, 1, 1 ),
93 'List' => array( 2, 0, 1 ),
94 'Table' => array( 3, 0, 1 ),
95 'Drawer' => array( 2, 1, 0 ),
96 'Modal' => array( 1, 1, 0 ),
97 'Grid' => array( 4, 1, 0 ),
98 'Circles' => array( 4, 1, 0 ),
99 'Slide-Ins' => array( 2, 1, 0 ),
100 );
101 foreach ( $styles as $key => $set ) :
102 $val = strtolower( $key );
103 ?>
104 <input class="awsm-radio-hidden" id="rad-<?php echo esc_attr( $val ); ?>" type="radio" data-style="<?php echo esc_attr( $set[0] ); ?>" data-column="<?php echo esc_attr( $set[1] ); ?>" name="team-style" value="<?php echo esc_attr( $val ); ?>" <?php checked( $val, $options['team-style'] ); ?><?php echo ! $set[2] ? ' disabled' : ''; ?>>
105 <label for="rad-<?php echo esc_attr( $val ); ?>" class="<?php echo ! $set[2] ? 'awsm_pro_feature' : ''; ?>"><img src="<?php echo esc_url( $this->settings['plugin_url'] . '/images/' . $val . '.jpg' ); ?>">
106 <span data-type="<?php echo esc_attr( $val ); ?>"><?php echo esc_html( $key ); ?></span>
107 </label>
108 <?php endforeach; ?>
109 </div><!-- .awsm-preset-list -->
110 <div class="awsm-section awsm-clearfix">
111 <div class="awsm-heading-group">
112 <h2 class="sub-h"><?php esc_html_e( 'Style', 'awsm-team' ); ?></h2>
113 <span>
114 <?php
115 $url = 'https://demo.awsm.in/team-pro/';
116 printf(
117 wp_kses(
118 /* translators: %s: Team demo link */
119 __( 'We have a set of predefined styles for each preset. Choose your favorite. Refer <a href="%s" target="_blank">demo</a>.', 'awsm-team' ),
120 array(
121 'a' => array(
122 'href' => array(),
123 'target' => array(),
124 ),
125 )
126 ),
127 esc_url( $url )
128 );
129 ?>
130 </span>
131 </div><!-- .awsm-heading-group -->
132 <div class="awsm-row">
133 <div class="awsm-col-2">
134 <?php
135 $preset = array(
136 'style-1' => 'Style 1',
137 'style-2' => 'Style 2',
138 'style-3' => 'Style 3',
139 'style-4' => 'Style 4',
140 );
141 $this->selectbuilder( 'preset', $preset, $options['preset'], '', 'awsm-select-default dyn-sel awsm-styles', 'key' );
142 ?>
143 </div><!-- .awsm-col-2 -->
144 <div class="awsm-col-2 awsm-columns-wrap">
145 <?php
146 $columns = array(
147 '2' => '2 Column',
148 '3' => '3 Column',
149 '4' => '4 Column',
150 '5' => '5 Column',
151 );
152 $this->selectbuilder( 'columns', $columns, $options['columns'], '', 'awsm-select-default dyn-sel awsm-columns', 'key' );
153 ?>
154 </div><!-- .awsm-col-2 -->
155 </div><!-- .awsm-row -->
156 </div><!-- .awsm-row -->
157 <div class="awsm-custom-css-wrap">
158 <div class="awsm-heading-group">
159 <h2 class="sub-h"><?php esc_html_e( 'Custom CSS', 'awsm-team' ); ?></h2>
160 <span><?php esc_html_e( 'Want to add your own colours and flavours? Add your custom CSS in the text box below.', 'awsm-team' ); ?></span>
161 </div><!-- .awsm-heading-group -->
162 <textarea name="custom_css"><?php echo esc_textarea( $options['custom_css'] ); ?></textarea>
163 </div>
164 </div><!-- .awsm-team-customize-style -->
165 <div class="awsm-clearfix"></div>
166 </div><!-- .awsm-team-customize-inner -->
167 </div><!-- .awsm-team-customize -->
168 </div><!-- wrap -->
169 <script type="text/html" id="tmpl-awsm-member-select">
170 <div class="select2-result-repository clearfix">
171 <# if ( data.src ) { #>
172 <div class="awsm-member-thumb">
173 <img class="select2-result-repository__avatar" width="150" height="150" src="{{{data.src}}}" />
174 </div>
175 <# } #>
176 <p class="select2-result-repository__title">{{{data.title}}}</p>
177 </div>
178 </script>
179