PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 1.0.2
Shortcodes and extra features for Phlox theme v1.0.2
2.17.22 2.17.21 2.17.20 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.6 1.0.9 1.1.0 1.3.0 1.3.1 1.3.10 1.3.14 1.3.2 1.3.3 1.3.6 1.4.0 1.4.1 1.4.2 1.5.0 1.5.2 1.6.0 1.6.2 1.6.4 1.7.0 1.7.2 2.10.0 2.10.1 2.10.3 2.10.5 2.10.7 2.10.8 2.10.9 2.11.0 2.11.1 2.11.2 2.12.0 2.14.0 2.15.0 2.15.2 2.15.4 2.15.5 2.15.6 2.15.7 2.15.8 2.15.9 2.16.0 2.16.1 2.16.2 2.16.3 2.16.4 2.17.0 2.17.1 2.17.12 2.17.13 2.17.14 2.17.15 2.17.16 2.17.2 2.17.3 2.17.4 2.17.5 2.17.6 2.17.8 2.17.9 2.4.12 2.4.13 2.4.14 2.4.16 2.4.18 2.4.19 2.4.9 2.5.0 2.5.1 2.5.10 2.5.11 2.5.12 2.5.13 2.5.14 2.5.15 2.5.16 2.5.17 2.5.19 2.5.2 2.5.20 2.5.3 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.10 2.6.12 2.6.13 2.6.14 2.6.15 2.6.16 2.6.17 2.6.19 2.6.2 2.6.20 2.6.4 2.6.5 2.6.7 2.7.0 2.7.1 2.7.10 2.7.11 2.7.12 2.7.13 2.7.14 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.9 2.9.0 2.9.12 2.9.14 2.9.15 2.9.16 2.9.17 2.9.18 2.9.19 2.9.2 2.9.20 2.9.21 2.9.22 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8
auxin-elements / includes / elements / about-widget.php
auxin-elements / includes / elements Last commit date
about-widget.php 10 years ago accordion.php 10 years ago attachment-url.php 10 years ago audio.php 10 years ago button.php 10 years ago code.php 10 years ago contact-box.php 10 years ago contact-form.php 10 years ago divider.php 10 years ago dropcap.php 10 years ago gallery.php 10 years ago gmap.php 10 years ago highlight.php 10 years ago image.php 10 years ago instagram-feed.php 10 years ago latest-items.php 10 years ago latest-posts-slider.php 10 years ago quote.php 10 years ago recent-posts-widget.php 10 years ago recent-posts.php 10 years ago sample-element.php 10 years ago search.php 10 years ago socials-list.php 10 years ago tabs.php 10 years ago text.php 10 years ago video.php 10 years ago
about-widget.php
261 lines
1 <?php
2 /**
3 * About element
4 *
5 *
6 * @package auxin-elements
7 * @license LICENSE.txt
8 * @author
9 * @link https://bitbucket.org/averta/
10 * @copyright (c) 2010-2016
11 */
12
13 function get_auxin_about_widget( $master_array ) {
14
15 $master_array['aux_about_widget'] = array(
16 'name' => __("[Phlox] About Author", 'auxin-elements' ),
17 'auxin_output_callback' => 'auxin_widget_about_callback',
18 'base' => 'aux_about_widget',
19 'description' => __('It adds an about author element.', 'auxin-elements' ),
20 'class' => 'aux-widget-about',
21 'show_settings_on_create' => true,
22 'weight' => 1,
23 'is_widget' => true,
24 'is_shortcode' => true,
25 'is_so' => false,
26 'is_vc' => false,
27 'category' => THEME_NAME,
28 'group' => '',
29 'admin_enqueue_js' => '',
30 'admin_enqueue_css' => '',
31 'front_enqueue_js' => '',
32 'front_enqueue_css' => '',
33 'icon' => 'auxin-element auxin-about',
34 'custom_markup' => '',
35 'js_view' => '',
36 'html_template' => '',
37 'deprecated' => '',
38 'content_element' => '',
39 'as_parent' => '',
40 'as_child' => '',
41 'params' => array(
42 array(
43 'param_name' => 'title',
44 'type' => 'textfield',
45 'value' => '',
46 'def_value' => '',
47 'holder' => 'textfield',
48 'class' => 'id',
49 'heading' => __('Title','auxin-elements' ),
50 'description' => '',
51 'admin_label' => true,
52 'dependency' => '',
53 'weight' => '',
54 'group' => '' ,
55 'edit_field_class' => ''
56 ),
57 array(
58 'param_name' => 'name',
59 'type' => 'textfield',
60 'value' => '',
61 'holder' => 'textfield',
62 'class' => 'title',
63 'heading' => __('Name','auxin-elements' ),
64 'description' => __('The name which appears in about widget.', 'auxin-elements' ),
65 'admin_label' => true,
66 'dependency' => '',
67 'weight' => '',
68 'group' => '' ,
69 'edit_field_class' => ''
70 ),
71 array(
72 'param_name' => 'skills',
73 'type' => 'textfield',
74 'value' => '',
75 'holder' => 'textfield',
76 'class' => 'skills',
77 'heading' => __('Skills','auxin-elements' ),
78 'description' => __('It appears below the name.', 'auxin-elements' ),
79 'admin_label' => true,
80 'weight' => '',
81 'group' => '',
82 'edit_field_class' => ''
83 ),
84 array(
85 'param_name' => 'info',
86 'type' => 'textarea_html',
87 'def_value' => '',
88 'value' => '',
89 'holder' => 'div',
90 'class' => 'info',
91 'heading' => __('Info','auxin-elements' ),
92 'description' => __('Biographical info or any other content.', 'auxin-elements' ),
93 'admin_label' => false,
94 'dependency' => '',
95 'weight' => '',
96 'group' => '' ,
97 'edit_field_class' => ''
98 ),
99 array(
100 'param_name' => 'about_image',
101 'type' => 'attach_image',
102 'value' => '',
103 'def_value' => '',
104 'holder' => 'textfield',
105 'class' => 'about_image',
106 'heading' => __('Image','auxin-elements' ),
107 'description' => __('It appears above the name.', 'auxin-elements' ),
108 'admin_label' => true,
109 'dependency' => '',
110 'weight' => '',
111 'group' => '' ,
112 'edit_field_class' => ''
113 ),
114 array(
115 'param_name' => 'image_style',
116 'type' => 'dropdown',
117 'def_value' => 'circle',
118 'value' => array(
119 'circle' => __('Circle', 'auxin-elements' ),
120 'square' => __('Square', 'auxin-elements' )
121 ),
122 'holder' => 'dropdown',
123 'class' => 'image_style',
124 'heading' => __('Image style','auxin-elements' ),
125 'description' => '',
126 'admin_label' => true,
127 'dependency' => '',
128 'weight' => '',
129 'group' => '' ,
130 'edit_field_class' => ''
131 ),
132 array(
133 'param_name' => 'align_center',
134 'type' => 'aux_switch',
135 'def_value' => '',
136 'value' => '1',
137 'holder' => 'dropdown',
138 'class' => 'align_center',
139 'heading' => __('Align center texts', 'auxin-elements' ),
140 'description' => '',
141 'admin_label' => true,
142 'dependency' => '',
143 'weight' => '',
144 'group' => '' ,
145 'edit_field_class' => ''
146 ),
147 array(
148 'param_name' => 'show_socials',
149 'type' => 'aux_switch',
150 'def_value' => '',
151 'value' => '0',
152 'holder' => 'dropdown',
153 'class' => 'show_socials',
154 'heading' => __('Show socials below the info','auxin-elements' ),
155 'description' => '',
156 'admin_label' => true,
157 'dependency' => '',
158 'weight' => '',
159 'group' => '' ,
160 'edit_field_class' => ''
161 ),
162 array(
163 'param_name' => 'extra_classes',
164 'type' => 'textfield',
165 'value' => '',
166 'def_value' => '',
167 'holder' => 'textfield',
168 'class' => 'extra_classes',
169 'heading' => __('Extra class name','auxin-elements' ),
170 'description' => __('If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.', 'auxin-elements' ),
171 'admin_label' => true,
172 'dependency' => '',
173 'weight' => '',
174 'group' => '' ,
175 'edit_field_class' => ''
176 )
177
178 )
179 );
180
181 return $master_array;
182 }
183
184 add_filter( 'auxin_master_array_shortcodes', 'get_auxin_about_widget', 10, 1 );
185
186 /**
187 * The front-end output of this element is returned by the following function
188 *
189 * @param array $atts The array containing the parsed values from shortcode, it should be same as defined params above.
190 * @param string $shortcode_content The shorcode content
191 * @return string The output of element markup
192 */
193 function auxin_widget_about_callback( $atts, $shortcode_content = null ){
194
195 // Defining default attributes
196 $default_atts = array(
197 'title' => '',
198 'about_image' => '',
199 'show_socials' => '0',
200 'image_style' => 'square',
201 'align_center' => '1',
202 'info' => '',
203 'name' => '',
204 'skills' => '',
205
206 'extra_classes' => '',
207 'custom_el_id' => '', // custom id attribute for this element
208 'base_class' => 'aux-widget-about' // base class name for container
209 );
210
211 $result = auxin_get_widget_scafold( $atts, $default_atts, $shortcode_content );
212 extract( $result['parsed_atts'] );
213
214 ob_start();
215
216 // widget header ------------------------------
217 echo $result['widget_header'];
218 echo $result['widget_title'];
219 ?>
220
221
222 <div class="<?php echo ($align_center ? 'aux-text-center' : ''); ?>">
223
224 <!--- The output for element here -->
225 <?php
226
227 if ( !empty( $about_image ) && is_numeric( $about_image ) ) {
228 echo '<div class="aux-about-image aux-style-' . $image_style . '">' . auxin_get_the_resized_attachment( $about_image, 240, ( $image_style == 'square' ? 400 : 240 ), true ) . '</div>';
229 }
230
231 echo '<dl>';
232
233 if ( !empty( $name ) ) {
234 echo '<dt class="aux-about-name">' . $name . '</dt>';
235 }
236
237 if ( !empty( $skills ) ) {
238 echo '<dd class="aux-about-skills">' . $skills . '</dd>';
239 }
240
241 if ( !empty( $info ) ) {
242 echo '<dd class="aux-about-content">'.$info.'</dd>';
243 }
244
245 echo '</dl>';
246
247 if( $show_socials ) {
248 echo auxin_the_socials();
249 }
250 ?>
251
252 </div><!-- widget-inner -->
253
254
255 <?php
256 // widget footer ------------------------------
257 echo $result['widget_footer'];
258
259 return ob_get_clean();
260 }
261