about-widget.php
6 years ago
accordion-widget.php
6 years ago
accordion.php
6 years ago
attachment-url.php
6 years ago
audio.php
6 years ago
before-after.php
6 years ago
button.php
6 years ago
code.php
6 years ago
contact-box.php
6 years ago
contact-form.php
6 years ago
custom-list.php
6 years ago
divider.php
6 years ago
dropcap.php
6 years ago
facebook.php
6 years ago
flickr.php
6 years ago
gallery.php
6 years ago
general-element-fields.php
6 years ago
gmap.php
6 years ago
highlight.php
6 years ago
image.php
6 years ago
instagram-feed.php
6 years ago
latest-items.php
8 years ago
latest-posts-slider.php
6 years ago
popular-posts-widget.php
6 years ago
quote.php
6 years ago
recent-posts-grid-carousel.php
6 years ago
recent-posts-land-style.php
6 years ago
recent-posts-masonry.php
6 years ago
recent-posts-tiles-carousel.php
6 years ago
recent-posts-tiles.php
6 years ago
recent-posts-timeline.php
6 years ago
recent-posts-widget.php
6 years ago
recent-products.php
6 years ago
related-posts.php
8 years ago
sample-element.php
6 years ago
search.php
6 years ago
socials-list.php
6 years ago
staff.php
6 years ago
tab-widget.php
6 years ago
tabs.php
6 years ago
testimonial.php
6 years ago
text.php
6 years ago
touch-slider.php
6 years ago
video.php
6 years ago
staff.php
736 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Staff Element |
| 4 | * |
| 5 | * |
| 6 | * @package Auxin |
| 7 | * @license LICENSE.txt |
| 8 | * @author averta |
| 9 | * @link http://phlox.pro/ |
| 10 | * @copyright (c) 2010-2020 averta |
| 11 | */ |
| 12 | |
| 13 | function auxin_get_staff_master_array( $master_array ) { |
| 14 | |
| 15 | $master_array['aux_staff'] = array( |
| 16 | 'name' => __('Staff ', 'auxin-elements'), |
| 17 | 'auxin_output_callback' => 'auxin_widget_staff_callback', |
| 18 | 'base' => 'aux_staff', |
| 19 | 'description' => __('You can display your Staffs as a customized widget,', 'auxin-elements'), |
| 20 | 'class' => 'aux-widget-staff', |
| 21 | 'show_settings_on_create' => true, |
| 22 | 'weight' => 1, |
| 23 | 'is_widget' => true, |
| 24 | 'is_shortcode' => true, |
| 25 | 'is_so' => true, |
| 26 | 'is_vc' => true, |
| 27 | 'category' => THEME_NAME, |
| 28 | 'group' => '', |
| 29 | 'admin_enqueue_js' => '', |
| 30 | 'admin_enqueue_css' => '', |
| 31 | 'front_enqueue_js' => '', |
| 32 | 'front_enqueue_css' => '', |
| 33 | 'icon' => 'aux-element aux-pb-icons-staff', |
| 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 | 'heading' => __('Staff Name','auxin-elements'), |
| 44 | 'description' => __('Staff Name, leave it empty if you don`t need title.', 'auxin-elements'), |
| 45 | 'param_name' => 'title', |
| 46 | 'type' => 'textfield', |
| 47 | 'value' => '', |
| 48 | 'holder' => 'textfield', |
| 49 | 'class' => 'title', |
| 50 | 'admin_label' => true, |
| 51 | 'dependency' => '', |
| 52 | 'weight' => '', |
| 53 | 'group' => __( 'Staff Details', 'auxin-elements' ), |
| 54 | 'edit_field_class' => '' |
| 55 | ), |
| 56 | array( |
| 57 | 'heading' => __('Staff Occupation','auxin-elements'), |
| 58 | 'description' => __('Staff Occupation, leave it empty if you don`t need title.', 'auxin-elements'), |
| 59 | 'param_name' => 'subtitle', |
| 60 | 'type' => 'textfield', |
| 61 | 'value' => '', |
| 62 | 'def_value' => '', |
| 63 | 'holder' => 'textfield', |
| 64 | 'class' => 'subtitle', |
| 65 | 'description' => '', |
| 66 | 'admin_label' => true, |
| 67 | 'dependency' => '', |
| 68 | 'weight' => '', |
| 69 | 'group' => 'Staff Details' , |
| 70 | 'edit_field_class' => '' |
| 71 | ), |
| 72 | array( |
| 73 | 'heading' => __('Staff Page Link','auxin-elements'), |
| 74 | 'description' => __('leave it empty if you don`t need to add a page.', 'auxin-elements'), |
| 75 | 'param_name' => 'staff_link', |
| 76 | 'type' => 'textfield', |
| 77 | 'value' => '', |
| 78 | 'def_value' => '', |
| 79 | 'holder' => 'textfield', |
| 80 | 'class' => 'staff_link', |
| 81 | 'admin_label' => true, |
| 82 | 'dependency' => '', |
| 83 | 'weight' => '', |
| 84 | 'group' => __( 'Staff Details', 'auxin-elements' ), |
| 85 | 'edit_field_class' => '' |
| 86 | ), |
| 87 | array( |
| 88 | 'heading' => __('Staff Image', 'auxin-elements'), |
| 89 | 'description' => '', |
| 90 | 'param_name' => 'staff_img', |
| 91 | 'type' => 'attach_image', |
| 92 | 'def_value' => '', |
| 93 | 'value' => '', |
| 94 | 'holder' => '', |
| 95 | 'class' => 'staff_img', |
| 96 | 'admin_label' => true, |
| 97 | 'dependency' => '', |
| 98 | 'weight' => '', |
| 99 | 'group' => __( 'Staff Details', 'auxin-elements' ), |
| 100 | 'edit_field_class' => '' |
| 101 | ), |
| 102 | array( |
| 103 | 'heading' => __('Image Size','auxin-elements'), |
| 104 | 'description' => '', |
| 105 | 'param_name' => 'staff_img_size', |
| 106 | 'type' => 'dropdown', |
| 107 | 'def_value' => 'full', |
| 108 | 'value' => array ( |
| 109 | 'full' => __( 'Orginal Size' , 'auxin-elements' ), |
| 110 | 'large' => __( 'Large' , 'auxin-elements' ), |
| 111 | 'medium' => __( 'Medium' , 'auxin-elements' ), |
| 112 | 'thumbnail' => __( 'Thumbnail' , 'auxin-elements' ), |
| 113 | 'custom' => __( 'Custom' , 'auxin-elements' ), |
| 114 | ), |
| 115 | 'holder' => '', |
| 116 | 'class' => 'staff_img_size', |
| 117 | 'admin_label' => true, |
| 118 | 'weight' => '', |
| 119 | 'group' => __( 'Staff Details', 'auxin-elements' ), |
| 120 | 'edit_field_class' => '' |
| 121 | ), |
| 122 | |
| 123 | array( |
| 124 | 'heading' => __('Width','auxin-elements' ), |
| 125 | 'description' => '', |
| 126 | 'param_name' => 'width', |
| 127 | 'type' => 'textfield', |
| 128 | 'value' => '', |
| 129 | 'def_value' => '', |
| 130 | 'holder' => 'textfield', |
| 131 | 'class' => 'width', |
| 132 | 'admin_label' => true, |
| 133 | 'dependency' => array( |
| 134 | 'element' => 'staff_img_size', |
| 135 | 'value' => array('custom') |
| 136 | ), |
| 137 | 'weight' => '', |
| 138 | 'group' => __( 'Staff Details', 'auxin-elements' ), |
| 139 | 'edit_field_class' => '' |
| 140 | ), |
| 141 | array( |
| 142 | 'heading' => __('Height','auxin-elements' ), |
| 143 | 'description' => '', |
| 144 | 'param_name' => 'height', |
| 145 | 'type' => 'textfield', |
| 146 | 'value' => '', |
| 147 | 'def_value' => '', |
| 148 | 'holder' => 'textfield', |
| 149 | 'class' => 'height', |
| 150 | 'admin_label' => true, |
| 151 | 'dependency' => array( |
| 152 | 'element' => 'staff_img_size', |
| 153 | 'value' => array('custom') |
| 154 | ), |
| 155 | 'weight' => '', |
| 156 | 'group' => __( 'Staff Details', 'auxin-elements' ), |
| 157 | 'edit_field_class' => '' |
| 158 | ), |
| 159 | |
| 160 | array( |
| 161 | 'heading' => __('Image shape','auxin-elements'), |
| 162 | 'description' => '', |
| 163 | 'param_name' => 'img_shape', |
| 164 | 'type' => 'aux_visual_select', |
| 165 | 'def_value' => '', |
| 166 | 'choices' => array( |
| 167 | 'circle' => array( |
| 168 | 'label' => __('Circle', 'auxin-elements'), |
| 169 | 'image' => AUXIN_URL . 'images/visual-select/icon-style-circle.svg' |
| 170 | ), |
| 171 | 'semi-circle' => array( |
| 172 | 'label' => __('Semi-circle', 'auxin-elements'), |
| 173 | 'image' => AUXIN_URL . 'images/visual-select/icon-style-semi-circle.svg' |
| 174 | ), |
| 175 | 'round-rect' => array( |
| 176 | 'label' => __('Round Rectangle', 'auxin-elements'), |
| 177 | 'image' => AUXIN_URL . 'images/visual-select/icon-style-round-rectangle.svg' |
| 178 | ), |
| 179 | 'rect' => array( |
| 180 | 'label' => __('Rectangle', 'auxin-elements'), |
| 181 | 'image' => AUXIN_URL . 'images/visual-select/icon-style-rectangle.svg' |
| 182 | ), |
| 183 | ), |
| 184 | 'holder' => '', |
| 185 | 'class' => 'img_shape', |
| 186 | 'admin_label' => true, |
| 187 | 'weight' => '', |
| 188 | 'group' => __( 'Staff Details', 'auxin-elements' ), |
| 189 | 'edit_field_class' => '' |
| 190 | ), |
| 191 | array( |
| 192 | 'heading' => __('Wrapper style','auxin-elements'), |
| 193 | 'description' => '', |
| 194 | 'param_name' => 'wrapper_style', |
| 195 | 'type' => 'aux_visual_select', |
| 196 | 'def_value' => 'simple', |
| 197 | 'choices' => array( |
| 198 | 'simple' => array( |
| 199 | 'label' => __('Simple', 'auxin-elements'), |
| 200 | 'image' => AUXIN_URL . 'images/visual-select/text-normal.svg' |
| 201 | ), |
| 202 | 'outline' => array( |
| 203 | 'label' => __('Outlined', 'auxin-elements'), |
| 204 | 'image' => AUXIN_URL . 'images/visual-select/text-outline.svg' |
| 205 | ), |
| 206 | 'box' => array( |
| 207 | 'label' => __('Boxed', 'auxin-elements'), |
| 208 | 'image' => AUXIN_URL . 'images/visual-select/text-boxed.svg' |
| 209 | ) |
| 210 | ), |
| 211 | 'holder' => '', |
| 212 | 'class' => 'wrapper_style', |
| 213 | 'admin_label' => true, |
| 214 | 'dependency' => '', |
| 215 | 'weight' => '', |
| 216 | 'group' => '' , |
| 217 | 'edit_field_class' => '' |
| 218 | ), array( |
| 219 | 'heading' => __('Layout Style','auxin-elements'), |
| 220 | 'description' => '', |
| 221 | 'param_name' => 'layout_style', |
| 222 | 'type' => 'aux_visual_select', |
| 223 | 'def_value' => 'top', |
| 224 | 'choices' => array( |
| 225 | 'top' => array( |
| 226 | 'label' => __('Top', 'auxin-elements'), |
| 227 | 'image' => AUXIN_URL . 'images/visual-select/column-icon-top.svg' |
| 228 | ), |
| 229 | 'right' => array( |
| 230 | 'label' => __('Right', 'auxin-elements'), |
| 231 | 'image' => AUXIN_URL . 'images/visual-select/column-icon-right.svg' |
| 232 | ), |
| 233 | 'bottom' => array( |
| 234 | 'label' => __('Bottom', 'auxin-elements'), |
| 235 | 'image' => AUXIN_URL . 'images/visual-select/column-icon-bottom.svg' |
| 236 | ), |
| 237 | 'left' => array( |
| 238 | 'label' => __('Left', 'auxin-elements'), |
| 239 | 'image' => AUXIN_URL . 'images/visual-select/column-icon-left.svg' |
| 240 | ) |
| 241 | ), |
| 242 | 'holder' => '', |
| 243 | 'class' => 'layout_style', |
| 244 | 'admin_label' => true, |
| 245 | 'dependency' => '', |
| 246 | 'weight' => '', |
| 247 | 'group' => '', |
| 248 | 'edit_field_class' => '' |
| 249 | ), |
| 250 | array( |
| 251 | 'heading' => __('Layout Border Color', 'auxin-elements'), |
| 252 | 'description' => __('Choose a border color for this layout.', 'auxin-elements'), |
| 253 | 'param_name' => 'layout_border_color', |
| 254 | 'type' => 'colorpicker', |
| 255 | 'def_value' => '', |
| 256 | 'value' => '', |
| 257 | 'holder' => '', |
| 258 | 'class' => 'layout_border_color', |
| 259 | 'admin_label' => true, |
| 260 | 'dependency' => array( |
| 261 | 'element' => 'wrapper_style', |
| 262 | 'value' => array('simple','box'), |
| 263 | ), |
| 264 | 'weight' => '', |
| 265 | 'group' => '' , |
| 266 | 'edit_field_class' => '' |
| 267 | ), |
| 268 | array( |
| 269 | 'heading' => __('Text align','auxin-elements'), |
| 270 | 'description' => '', |
| 271 | 'param_name' => 'text_align', |
| 272 | 'type' => 'aux_visual_select', |
| 273 | 'def_value' => 'left', |
| 274 | 'choices' => array( |
| 275 | 'left' => array( |
| 276 | 'label' => __('Left', 'auxin-elements'), |
| 277 | 'css_class' => 'axiAdminIcon-text-align-left', |
| 278 | ), |
| 279 | 'center' => array( |
| 280 | 'label' => __('Center', 'auxin-elements'), |
| 281 | 'css_class' => 'axiAdminIcon-text-align-center' |
| 282 | ), |
| 283 | 'right' => array( |
| 284 | 'label' => __('Right', 'auxin-elements'), |
| 285 | 'css_class' => 'axiAdminIcon-text-align-right' |
| 286 | ) |
| 287 | ), |
| 288 | 'holder' => '', |
| 289 | 'class' => 'text_align', |
| 290 | 'admin_label' => true, |
| 291 | 'dependency' => '', |
| 292 | 'weight' => '', |
| 293 | 'group' => '' , |
| 294 | 'edit_field_class' => '' |
| 295 | ), |
| 296 | array( |
| 297 | 'heading' => __('Text color scheme','auxin-elements'), |
| 298 | 'description' => '', |
| 299 | 'param_name' => 'text_color_mode', |
| 300 | 'type' => 'dropdown', |
| 301 | 'def_value' => 'dark', |
| 302 | 'value' => array ( |
| 303 | 'inherit' => __( 'Inherit' , 'auxin-elements' ), |
| 304 | 'light' => __( 'Light' , 'auxin-elements' ), |
| 305 | 'dark' => __( 'Dark' , 'auxin-elements' ) |
| 306 | ), |
| 307 | 'holder' => '', |
| 308 | 'class' => 'text_color_mode', |
| 309 | 'admin_label' => true, |
| 310 | 'dependency' => '', |
| 311 | 'weight' => '', |
| 312 | 'group' => '' , |
| 313 | 'edit_field_class' => '' |
| 314 | ), |
| 315 | array( |
| 316 | 'heading' => __('Enable Socials','auxin-elements' ), |
| 317 | 'description' => '', |
| 318 | 'param_name' => 'socials', |
| 319 | 'type' => 'checkbox', |
| 320 | 'value' => 1, |
| 321 | 'class' => '', |
| 322 | 'admin_label' => false, |
| 323 | 'dependency' => '', |
| 324 | 'weight' => '', |
| 325 | 'group' => __( 'Socials', 'auxin-elements' ), |
| 326 | 'edit_field_class' => '' |
| 327 | ), |
| 328 | array( |
| 329 | 'heading' => __('Twitter Address' ,'auxin-elements' ), |
| 330 | 'param_name' => 'social_twitter', |
| 331 | 'type' => 'textfield', |
| 332 | 'value' => '', |
| 333 | 'holder' => '', |
| 334 | 'class' => '', |
| 335 | 'admin_label' => false, |
| 336 | 'dependency' => array( |
| 337 | 'element' => 'socials', |
| 338 | 'value' => array('true', 1) |
| 339 | ), |
| 340 | 'weight' => '', |
| 341 | 'group' => __( 'Socials', 'auxin-elements' ), |
| 342 | 'edit_field_class' => '' |
| 343 | ), |
| 344 | array( |
| 345 | 'heading' => __('Linkedin Address','auxin-elements' ), |
| 346 | 'param_name' => 'social_linkedin', |
| 347 | 'type' => 'textfield', |
| 348 | 'value' => '', |
| 349 | 'holder' => '', |
| 350 | 'class' => '', |
| 351 | 'admin_label' => false, |
| 352 | 'dependency' => array( |
| 353 | 'element' => 'socials', |
| 354 | 'value' => array('true', 1) |
| 355 | ), |
| 356 | 'weight' => '', |
| 357 | 'group' => __( 'Socials', 'auxin-elements' ), |
| 358 | 'edit_field_class' => '' |
| 359 | ), |
| 360 | array( |
| 361 | 'heading' => __('Facebook Address','auxin-elements' ), |
| 362 | 'param_name' => 'social_facebook', |
| 363 | 'type' => 'textfield', |
| 364 | 'value' => '', |
| 365 | 'holder' => '', |
| 366 | 'class' => '', |
| 367 | 'admin_label' => false, |
| 368 | 'dependency' => array( |
| 369 | 'element' => 'socials', |
| 370 | 'value' => array('true', 1) |
| 371 | ), |
| 372 | 'weight' => '', |
| 373 | 'group' => __( 'Socials', 'auxin-elements' ), |
| 374 | 'edit_field_class' => '' |
| 375 | ), |
| 376 | array( |
| 377 | 'heading' => __('Google Plus Address','auxin-elements' ), |
| 378 | 'param_name' => 'social_gp', |
| 379 | 'type' => 'textfield', |
| 380 | 'value' => '', |
| 381 | 'holder' => '', |
| 382 | 'class' => '', |
| 383 | 'admin_label' => false, |
| 384 | 'dependency' => array( |
| 385 | 'element' => 'socials', |
| 386 | 'value' => array('true', 1) |
| 387 | ), |
| 388 | 'weight' => '', |
| 389 | 'group' => __( 'Socials', 'auxin-elements' ), |
| 390 | 'edit_field_class' => '' |
| 391 | ), |
| 392 | array( |
| 393 | 'heading' => __('Flickr Address','auxin-elements' ), |
| 394 | 'param_name' => 'social_flickr', |
| 395 | 'type' => 'textfield', |
| 396 | 'value' => '', |
| 397 | 'holder' => '', |
| 398 | 'class' => '', |
| 399 | 'admin_label' => false, |
| 400 | 'dependency' => array( |
| 401 | 'element' => 'socials', |
| 402 | 'value' => array('true', 1) |
| 403 | ), |
| 404 | 'weight' => '', |
| 405 | 'group' => __( 'Socials', 'auxin-elements' ), |
| 406 | 'edit_field_class' => '' |
| 407 | ), |
| 408 | array( |
| 409 | 'heading' => __('Delicious Address','auxin-elements' ), |
| 410 | 'param_name' => 'social_delicious', |
| 411 | 'type' => 'textfield', |
| 412 | 'value' => '', |
| 413 | 'holder' => '', |
| 414 | 'class' => '', |
| 415 | 'admin_label' => false, |
| 416 | 'dependency' => array( |
| 417 | 'element' => 'socials', |
| 418 | 'value' => array('true', 1) |
| 419 | ), |
| 420 | 'weight' => '', |
| 421 | 'group' => __( 'Socials', 'auxin-elements' ), |
| 422 | 'edit_field_class' => '' |
| 423 | ), |
| 424 | array( |
| 425 | 'heading' => __('Pinterest Address','auxin-elements' ), |
| 426 | 'param_name' => 'social_pinterest', |
| 427 | 'type' => 'textfield', |
| 428 | 'value' => '', |
| 429 | 'holder' => '', |
| 430 | 'class' => '', |
| 431 | 'admin_label' => false, |
| 432 | 'dependency' => array( |
| 433 | 'element' => 'socials', |
| 434 | 'value' => array('true', 1) |
| 435 | ), |
| 436 | 'weight' => '', |
| 437 | 'group' => __( 'Socials', 'auxin-elements' ), |
| 438 | 'edit_field_class' => '' |
| 439 | ), |
| 440 | array( |
| 441 | 'heading' => __('GitHub Address','auxin-elements' ), |
| 442 | 'param_name' => 'social_github', |
| 443 | 'type' => 'textfield', |
| 444 | 'value' => '', |
| 445 | 'holder' => '', |
| 446 | 'class' => '', |
| 447 | 'admin_label' => false, |
| 448 | 'dependency' => array( |
| 449 | 'element' => 'socials', |
| 450 | 'value' => array('true', 1) |
| 451 | ), |
| 452 | 'weight' => '', |
| 453 | 'group' => __( 'Socials', 'auxin-elements' ), |
| 454 | 'edit_field_class' => '' |
| 455 | ), |
| 456 | array( |
| 457 | 'heading' => __('Socials Icon size','auxin-elements'), |
| 458 | 'description' => '', |
| 459 | 'param_name' => 'icon_size', |
| 460 | 'type' => 'dropdown', |
| 461 | 'def_value' => 'aux-medium', |
| 462 | 'value' => array ( |
| 463 | 'aux-small' => __( 'Small' , 'auxin-elements' ), |
| 464 | 'aux-medium' => __( 'Medium' , 'auxin-elements' ), |
| 465 | 'aux-large' => __( 'Large' , 'auxin-elements' ), |
| 466 | 'aux-extra-large' => __( 'X-Large' , 'auxin-elements' ) |
| 467 | ), |
| 468 | 'holder' => '', |
| 469 | 'class' => 'icon_size', |
| 470 | 'admin_label' => true, |
| 471 | 'dependency' => array( |
| 472 | 'element' => 'socials', |
| 473 | 'value' => array('true', 1) |
| 474 | ), |
| 475 | 'weight' => '', |
| 476 | 'group' => __( 'Socials', 'auxin-elements' ), |
| 477 | 'edit_field_class' => '' |
| 478 | ), |
| 479 | array( |
| 480 | 'heading' => __('Icon Direction','auxin-elements'), |
| 481 | 'description' => '', |
| 482 | 'param_name' => 'icon_align', |
| 483 | 'type' => 'dropdown', |
| 484 | 'def_value' => 'aux-horizontal', |
| 485 | 'value' => array ( |
| 486 | 'aux-vertical' => __( 'Vertical' , 'auxin-elements' ), |
| 487 | 'aux-horizontal' => __( 'Horizontal' , 'auxin-elements' ), |
| 488 | ), |
| 489 | 'holder' => '', |
| 490 | 'class' => 'icon_align', |
| 491 | 'admin_label' => true, |
| 492 | 'dependency' => array( |
| 493 | 'element' => 'socials', |
| 494 | 'value' => array('true', 1) |
| 495 | ), |
| 496 | 'weight' => '', |
| 497 | 'group' => __( 'Socials', 'auxin-elements' ), |
| 498 | 'edit_field_class' => '' |
| 499 | ), |
| 500 | array( |
| 501 | 'heading' => __('Maximum Words','auxin-elements' ), |
| 502 | 'description' => __('Limit the number of words in the Content','auxin-elements' ), |
| 503 | 'param_name' => 'max_words', |
| 504 | 'type' => 'textfield', |
| 505 | 'value' => '', |
| 506 | 'holder' => '', |
| 507 | 'def_value' => 22, |
| 508 | 'class' => 'max_words', |
| 509 | 'admin_label' => false, |
| 510 | 'weight' => '', |
| 511 | 'group' => '', |
| 512 | 'edit_field_class' => '' |
| 513 | ), array( |
| 514 | 'heading' => __('Content','auxin-elements'), |
| 515 | 'description' => __('Enter a text as a text content.','auxin-elements'), |
| 516 | 'param_name' => 'content', |
| 517 | 'type' => 'textarea_html', |
| 518 | 'value' => '', |
| 519 | 'def_value' => '', |
| 520 | 'holder' => 'div', |
| 521 | 'class' => 'content', |
| 522 | 'admin_label' => true, |
| 523 | 'dependency' => '', |
| 524 | 'weight' => '', |
| 525 | 'group' => '' , |
| 526 | 'edit_field_class' => '' |
| 527 | ), |
| 528 | ) |
| 529 | ); |
| 530 | |
| 531 | return $master_array; |
| 532 | } |
| 533 | |
| 534 | add_filter( 'auxin_master_array_shortcodes', 'auxin_get_staff_master_array', 10, 1 ); |
| 535 | |
| 536 | |
| 537 | /** |
| 538 | * Staff Element Widget Markup |
| 539 | * |
| 540 | * The front-end output of this element is returned by the following function |
| 541 | * |
| 542 | * @param array $atts The array containing the parsed values from shortcode, it should be same as defined params above. |
| 543 | * @param string $shortcode_content The shorcode content |
| 544 | * @return string The output of element markup |
| 545 | */ |
| 546 | function auxin_widget_staff_callback( $atts, $shortcode_content = null ){ |
| 547 | |
| 548 | // Defining default attributes |
| 549 | $default_atts = array( |
| 550 | 'title' => '', // header title |
| 551 | 'subtitle' => '', |
| 552 | 'staff_link' => '', |
| 553 | 'staff_img' => '', |
| 554 | 'staff_img_size' => 'full', |
| 555 | 'content' => '', |
| 556 | 'text_color_mode' => 'dark', |
| 557 | 'text_align' => 'left', |
| 558 | 'width' => '', |
| 559 | 'height' => '', |
| 560 | 'img_shape' => 'rect', |
| 561 | 'preloadable' => false, |
| 562 | 'preload_preview' => true, |
| 563 | 'preload_bgcolor' => '', |
| 564 | 'layout_border_color' => '', |
| 565 | 'socials' => 0, |
| 566 | 'icon_size' => 'aux-medium', |
| 567 | 'social_twitter' => '', |
| 568 | 'image_html' => '', |
| 569 | 'social_facebook' => '', |
| 570 | 'social_linkedin' => '', |
| 571 | 'social_gp' => '', |
| 572 | 'wrapper_style' => 'simple', |
| 573 | 'max_words' => 22, |
| 574 | 'social_flickr' => '', |
| 575 | 'social_pinterest' => '', |
| 576 | 'icon_align' => 'aux-horizontal', |
| 577 | 'social_github' => '', |
| 578 | 'social_delicious' => '', |
| 579 | 'social_instagram' => '', |
| 580 | 'layout_style' => 'top', |
| 581 | 'extra_classes' => '', // custom css class names for this element |
| 582 | 'custom_el_id' => '', // custom id attribute for this element |
| 583 | 'base_class' => 'aux-widget-staff' // base class name for container |
| 584 | ); |
| 585 | |
| 586 | |
| 587 | if( ! empty( $atts['wrapper_style'] ) ){ |
| 588 | $atts['extra_classes'] = ' aux-wrap-style-' . esc_attr( $atts['wrapper_style'] ); |
| 589 | |
| 590 | } elseif( ! empty( $default_atts['wrapper_style'] ) ){ |
| 591 | |
| 592 | if( ! isset( $atts['extra_classes'] ) ){ |
| 593 | |
| 594 | $atts['extra_classes'] = ''; |
| 595 | |
| 596 | } |
| 597 | |
| 598 | $atts['extra_classes'] .= ' aux-wrap-style-' . esc_attr( $default_atts['wrapper_style'] ); |
| 599 | |
| 600 | } |
| 601 | |
| 602 | $result = auxin_get_widget_scafold( $atts, $default_atts ); |
| 603 | |
| 604 | extract( $result['parsed_atts'] ); |
| 605 | |
| 606 | $image_classes = ''; |
| 607 | |
| 608 | if( 'custom' == $staff_img_size ){ |
| 609 | $staff_img_size = array( 'width' => $width, 'height' => $height ); |
| 610 | } |
| 611 | |
| 612 | if( ! empty( $staff_img ) && is_numeric( $staff_img ) ) { |
| 613 | $image = auxin_get_the_responsive_attachment( $staff_img, |
| 614 | array( |
| 615 | 'quality' => 100, |
| 616 | 'preloadable' => $preloadable, |
| 617 | 'preload_preview' => $preload_preview, |
| 618 | 'preload_bgcolor' => $preload_bgcolor, |
| 619 | 'size' => $staff_img_size, |
| 620 | 'crop' => true, |
| 621 | 'add_hw' => true, |
| 622 | 'upscale' => false, |
| 623 | 'original_src' => 'full' === $staff_img_size ? true : false, |
| 624 | 'attr' => array( 'class' => $image_classes ) |
| 625 | ) |
| 626 | ); |
| 627 | } |
| 628 | |
| 629 | |
| 630 | $content = empty( $content ) ? $shortcode_content : $content ; |
| 631 | $content = ( ! empty( $max_words ) && is_numeric( $max_words ) ) ? wp_trim_words( $content , (int) $max_words , ' ...') : $content; |
| 632 | $layout_border_color = ! empty( $layout_border_color ) ? 'style= "border-color: ' . esc_attr( $layout_border_color ) . '"': '' ; |
| 633 | $main_classes = 'aux-staff-container aux-staff-pos-'.$layout_style. ' aux-staff-text-' .$text_align. ' aux-staff-text-' .$text_color_mode. ' '; |
| 634 | $main_classes .= ! empty( $layout_border_color ) ? ' aux-staff-border' : '' ; |
| 635 | $header_classes = 'aux-staff-img-' . $img_shape ; |
| 636 | $footer_classes = $icon_size . ' ' .$icon_align ; |
| 637 | |
| 638 | ob_start(); |
| 639 | |
| 640 | // widget header ------------------------------ |
| 641 | echo $result['widget_header']; |
| 642 | ?> |
| 643 | <div class="<?php echo esc_attr( $main_classes );?>" <?php echo $layout_border_color ;?>> |
| 644 | <?php if( ! empty( $image ) ){ ;?> |
| 645 | <div class="aux-staff-header <?php echo esc_attr( $header_classes ) ;?>"> |
| 646 | <?php echo sprintf( '<div class="aux-media-image">%s</div>' , $image );?> |
| 647 | </div> |
| 648 | <?php } ?> |
| 649 | <div class="aux-staff-content"> |
| 650 | <?php if( ! empty( $title ) && empty( $staff_link ) ) { ?> |
| 651 | <h4 class="col-title"><?php echo $title; ?></h4> |
| 652 | <?php } elseif( ! empty( $title ) && ! empty( $staff_link ) ) {?> |
| 653 | <h4 class="col-title"><a href="<?php echo esc_url($staff_link); ?>"> |
| 654 | <?php echo $title; ?></a> |
| 655 | </h4> |
| 656 | <?php } if( ! empty( $subtitle ) ) { ?> |
| 657 | <h5 class="col-subtitle"><?php echo $subtitle; ?></h5> |
| 658 | <?php } if( ! empty( $content ) ) { ?> |
| 659 | <div class="entry-content"> |
| 660 | <?php $encoding_flag = defined('ENT_HTML401') ? ENT_HTML401 : ENT_QUOTES; ?> |
| 661 | <?php echo do_shortcode( html_entity_decode( $content, $encoding_flag, 'UTF-8') ); ?> |
| 662 | </div> |
| 663 | <?php } if ( auxin_is_true( $socials ) ) { ?> |
| 664 | <div class="aux-staff-footer <?php echo esc_attr( $footer_classes ) ;?>"> |
| 665 | <ul class="aux-social-list"> |
| 666 | |
| 667 | <?php if ( ! empty( $social_facebook ) ) { ;?> |
| 668 | <li> |
| 669 | <a class="facebook" href="<?php echo esc_url( $social_facebook ) ;?>" target="_blank"><span class="auxicon-facebook"></span> |
| 670 | </a> |
| 671 | </li> |
| 672 | <?php } ?> |
| 673 | <?php if ( ! empty( $social_linkedin ) ) { ;?> |
| 674 | <li> |
| 675 | <a class="linkedin" href="<?php echo esc_url( $social_linkedin ) ;?>" target="_blank"><span class="auxicon-linkedin"></span> |
| 676 | </a> |
| 677 | </li> |
| 678 | <?php } ?> |
| 679 | <?php if ( ! empty( $social_twitter ) ) { ;?> |
| 680 | <li> |
| 681 | <a class="twitter" href="<?php echo esc_url( $social_twitter ) ;?>" target="_blank"><span class="auxicon-twitter"></span> |
| 682 | </a> |
| 683 | </li> |
| 684 | <?php } ?> |
| 685 | <?php if ( ! empty( $social_gp ) ) { ;?> |
| 686 | <li> |
| 687 | <a class="googleplus" href="<?php echo esc_url( $social_gp ) ;?>" target="_blank"><span class="auxicon-googleplus"></span> |
| 688 | </a> |
| 689 | </li> |
| 690 | <?php } ?> |
| 691 | <?php if ( ! empty( $social_flickr ) ) { ;?> |
| 692 | <li> |
| 693 | <a class="flickr" href="<?php echo esc_url( $social_flickr ) ;?>" target="_blank"><span class="auxicon-flickr"></span> |
| 694 | </a> |
| 695 | </li> |
| 696 | <?php } ?> |
| 697 | <?php if ( ! empty( $social_delicious ) ) { ;?> |
| 698 | <li> |
| 699 | <a class="delicious" href="<?php echo esc_url( $social_delicious ) ;?>" target="_blank"><span class="auxicon-delicious"></span> |
| 700 | </a> |
| 701 | </li> |
| 702 | <?php } ?> |
| 703 | <?php if ( ! empty( $social_pinterest ) ) { ;?> |
| 704 | <li> |
| 705 | <a class="pinterest" href="<?php echo esc_url( $social_pinterest ) ;?>" target="_blank"><span class="auxicon-pinterest"></span> |
| 706 | </a> |
| 707 | </li> |
| 708 | <?php } ?> |
| 709 | <?php if ( ! empty( $social_github ) ) { ;?> |
| 710 | <li> |
| 711 | <a class="github" href="<?php echo esc_url( $social_github ) ;?>" target="_blank"><span class="auxicon-github"></span> |
| 712 | </a> |
| 713 | </li> |
| 714 | <?php } ?> |
| 715 | <?php if ( ! empty( $social_instagram ) ) { ;?> |
| 716 | <li> |
| 717 | <a class="instagram" href="<?php echo esc_url( $social_instagram ) ;?>" target="_blank"><span class="auxicon-instagram"></span> |
| 718 | </a> |
| 719 | </li> |
| 720 | <?php } ?> |
| 721 | </ul> |
| 722 | </div> |
| 723 | <?php } ?> |
| 724 | </div> |
| 725 | |
| 726 | </div> |
| 727 | |
| 728 | |
| 729 | <?php |
| 730 | |
| 731 | // widget footer ------------------------------ |
| 732 | echo $result['widget_footer']; |
| 733 | return ob_get_clean(); |
| 734 | |
| 735 | } |
| 736 |