Révision 18596a08
Ajouté par Assos Assos il y a presque 7 ans
drupal7/sites/all/modules/views_slideshow/theme/views_slideshow.theme.inc | ||
---|---|---|
57 | 57 |
$settings = $options[$main_frame_module]; |
58 | 58 |
$view = $vars['view']; |
59 | 59 |
$rows = $vars['rows']; |
60 |
$num_divs = count($rows); |
|
61 | 60 |
$vss_id = $view->name . '-' . $view->current_display; |
62 | 61 |
|
63 | 62 |
// Give each slideshow a unique id if there are more than one on the page. |
... | ... | |
68 | 67 |
} |
69 | 68 |
else { |
70 | 69 |
$instances[$vss_id] = 1; |
70 |
$vss_id .= '_1'; |
|
71 | 71 |
} |
72 | 72 |
|
73 | 73 |
// Building our default methods. |
... | ... | |
196 | 196 |
|
197 | 197 |
/** |
198 | 198 |
* The current element of the slideshow. |
199 |
* |
|
200 |
* @param array $vars |
|
201 |
* Theme variables. |
|
202 |
* |
|
203 |
* @return string |
|
204 |
* The html string for the slideshow element. |
|
199 | 205 |
*/ |
200 | 206 |
function theme_views_slideshow_main_section($vars) { |
201 | 207 |
return '<div id="' . $vars['plugin'] . '_main_' . $vars['vss_id'] . '" class="' . $vars['plugin'] . '_main views_slideshow_main">' . $vars['slides'] . '</div>'; |
... | ... | |
203 | 209 |
|
204 | 210 |
/** |
205 | 211 |
* Views Slideshow: pager. |
212 |
* |
|
213 |
* @param array $vars |
|
214 |
* Theme variables. |
|
215 |
* |
|
216 |
* @return string |
|
217 |
* The html string for the pager widget or an empty string if disabled. |
|
206 | 218 |
*/ |
207 | 219 |
function theme_views_slideshow_pager_widget_render($vars) { |
208 | 220 |
if (isset($vars['settings']['hide_on_single_slide']) && $vars['settings']['hide_on_single_slide'] === 1 && count($vars['rows']) < 2) { |
... | ... | |
238 | 250 |
|
239 | 251 |
/** |
240 | 252 |
* Theme pager fields. |
253 |
* |
|
254 |
* @param array $vars |
|
255 |
* Theme variables. |
|
241 | 256 |
*/ |
242 | 257 |
function template_preprocess_views_slideshow_pager_fields(&$vars) { |
243 | 258 |
// Build our JavaScript settings. |
... | ... | |
300 | 315 |
|
301 | 316 |
/** |
302 | 317 |
* Views Slideshow: pager item. |
318 |
* |
|
319 |
* @param array $vars |
|
320 |
* Theme variables. |
|
303 | 321 |
*/ |
304 | 322 |
function template_preprocess_views_slideshow_pager_field_item(&$vars) { |
305 | 323 |
$vars['classes_array'][] = 'views_slideshow_pager_field_item'; |
... | ... | |
314 | 332 |
|
315 | 333 |
/** |
316 | 334 |
* Views Slideshow: pager field item field. |
335 |
* |
|
336 |
* @param array $vars |
|
337 |
* Theme variables. |
|
317 | 338 |
*/ |
318 | 339 |
function template_preprocess_views_slideshow_pager_field_field(&$vars) { |
319 | 340 |
$view = $vars['view']; |
... | ... | |
327 | 348 |
|
328 | 349 |
/** |
329 | 350 |
* Views Slideshow: Controls. |
351 |
* |
|
352 |
* @param array $vars |
|
353 |
* Theme variables. |
|
354 |
* |
|
355 |
* @return string |
|
356 |
* The html string for the control widget. |
|
330 | 357 |
*/ |
331 | 358 |
function theme_views_slideshow_controls_widget_render($vars) { |
332 | 359 |
// Add JavaScript settings for the controls type. |
... | ... | |
360 | 387 |
|
361 | 388 |
/** |
362 | 389 |
* The slideshow controls. |
390 |
* |
|
391 |
* @param array $vars |
|
392 |
* Theme variables. |
|
363 | 393 |
*/ |
364 | 394 |
function template_preprocess_views_slideshow_controls_text(&$vars) { |
365 | 395 |
$module_path = drupal_get_path('module', 'views_slideshow'); |
... | ... | |
388 | 418 |
|
389 | 419 |
/** |
390 | 420 |
* Views Slideshow: "previous" control. |
421 |
* |
|
422 |
* @param array $vars |
|
423 |
* Theme variables. |
|
391 | 424 |
*/ |
392 | 425 |
function template_preprocess_views_slideshow_controls_text_previous(&$vars) { |
393 | 426 |
$vars['classes_array'][] = 'views_slideshow_controls_text_previous'; |
... | ... | |
395 | 428 |
|
396 | 429 |
/** |
397 | 430 |
* Views Slideshow: "pause" control. |
431 |
* |
|
432 |
* @param array $vars |
|
433 |
* Theme variables. |
|
398 | 434 |
*/ |
399 | 435 |
function template_preprocess_views_slideshow_controls_text_pause(&$vars) { |
400 | 436 |
$vars['classes_array'][] = 'views_slideshow_controls_text_pause views-slideshow-controls-text-status-play'; |
... | ... | |
403 | 439 |
|
404 | 440 |
/** |
405 | 441 |
* Views Slideshow: "next" control. |
442 |
* |
|
443 |
* @param array $vars |
|
444 |
* Theme variables. |
|
406 | 445 |
*/ |
407 | 446 |
function template_preprocess_views_slideshow_controls_text_next(&$vars) { |
408 | 447 |
$vars['classes_array'][] = 'views_slideshow_controls_text_next'; |
... | ... | |
410 | 449 |
|
411 | 450 |
/** |
412 | 451 |
* Views Slideshow: Slide Counter. |
452 |
* |
|
453 |
* @param array $vars |
|
454 |
* Theme variables. |
|
455 |
* |
|
456 |
* @return string |
|
457 |
* The html string for the counter widget. |
|
413 | 458 |
*/ |
414 | 459 |
function theme_views_slideshow_slide_counter_widget_render($vars) { |
415 | 460 |
return theme(views_theme_functions('views_slideshow_slide_counter', $vars['view'], $vars['view']->display[$vars['view']->current_display]), array( |
... | ... | |
423 | 468 |
|
424 | 469 |
/** |
425 | 470 |
* Views Slideshow: slide counter. |
471 |
* |
|
472 |
* @param array $vars |
|
473 |
* Theme variables. |
|
426 | 474 |
*/ |
427 | 475 |
function template_preprocess_views_slideshow_slide_counter(&$vars) { |
428 | 476 |
$vars['classes_array'][] = 'views_slideshow_slide_counter'; |
... | ... | |
430 | 478 |
} |
431 | 479 |
|
432 | 480 |
/** |
433 |
* Backwards compatability wrapper. |
|
481 |
* Backwards compatibility wrapper. |
|
482 |
* |
|
483 |
* @param array $vars |
|
484 |
* Theme variables. |
|
434 | 485 |
* |
435 | 486 |
* @deprecated Removed in 3.5 when the hook_theme() implementation was fixed. |
436 | 487 |
* |
... | ... | |
441 | 492 |
} |
442 | 493 |
|
443 | 494 |
/** |
444 |
* Backwards compatability wrapper. |
|
495 |
* Backwards compatibility wrapper. |
|
496 |
* |
|
497 |
* @param array $vars |
|
498 |
* Theme variables. |
|
445 | 499 |
* |
446 | 500 |
* @deprecated Removed in 3.5 when the hook_theme() implementation was fixed. |
447 | 501 |
* |
... | ... | |
452 | 506 |
} |
453 | 507 |
|
454 | 508 |
/** |
455 |
* Backwards compatability wrapper. |
|
509 |
* Backwards compatibility wrapper. |
|
510 |
* |
|
511 |
* @param array $vars |
|
512 |
* Theme variables. |
|
513 |
* |
|
514 |
* @param array $vars |
|
515 |
* Theme variables. |
|
456 | 516 |
* |
457 | 517 |
* @deprecated Removed in 3.5 when the hook_theme() implementation was fixed. |
458 | 518 |
* |
... | ... | |
463 | 523 |
} |
464 | 524 |
|
465 | 525 |
/** |
466 |
* Backwards compatability wrapper. |
|
526 |
* Backwards compatibility wrapper. |
|
527 |
* |
|
528 |
* @param array $vars |
|
529 |
* Theme variables. |
|
467 | 530 |
* |
468 | 531 |
* @deprecated Removed in 3.5 when the hook_theme() implementation was fixed. |
469 | 532 |
* |
... | ... | |
474 | 537 |
} |
475 | 538 |
|
476 | 539 |
/** |
477 |
* Backwards compatability wrapper. |
|
540 |
* Backwards compatibility wrapper. |
|
541 |
* |
|
542 |
* @param array $vars |
|
543 |
* Theme variables. |
|
478 | 544 |
* |
479 | 545 |
* @see template_preprocess_views_slideshow_controls_text_previous(). |
480 | 546 |
*/ |
... | ... | |
483 | 549 |
} |
484 | 550 |
|
485 | 551 |
/** |
486 |
* Backwards compatability wrapper. |
|
552 |
* Backwards compatibility wrapper. |
|
553 |
* |
|
554 |
* @param array $vars |
|
555 |
* Theme variables. |
|
487 | 556 |
* |
488 | 557 |
* @deprecated Removed in 3.5 when the hook_theme() implementation was fixed. |
489 | 558 |
* |
... | ... | |
494 | 563 |
} |
495 | 564 |
|
496 | 565 |
/** |
497 |
* Backwards compatability wrapper. |
|
566 |
* Backwards compatibility wrapper. |
|
567 |
* |
|
568 |
* @param array $vars |
|
569 |
* Theme variables. |
|
498 | 570 |
* |
499 | 571 |
* @deprecated Removed in 3.5 when the hook_theme() implementation was fixed. |
500 | 572 |
* |
... | ... | |
505 | 577 |
} |
506 | 578 |
|
507 | 579 |
/** |
508 |
* Backwards compatability wrapper. |
|
580 |
* Backwards compatibility wrapper. |
|
581 |
* |
|
582 |
* @param array $vars |
|
583 |
* Theme variables. |
|
509 | 584 |
* |
510 | 585 |
* @deprecated Removed in 3.5 when the hook_theme() implementation was fixed. |
511 | 586 |
* |
Formats disponibles : Unified diff
Weekly update of contrib modules