Skip to content

Commit 7df734b

Browse files
committed
Merge pull request #12 from WojciechSocha/master
Polish localization and getTitle() customization
2 parents 3dfcbed + a51aefc commit 7df734b

File tree

5 files changed

+1080
-7
lines changed

5 files changed

+1080
-7
lines changed

fancybox.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ function mfbfw_defaults() {
117117
'callbackOnComplete' => 'function() { alert("Complete!"); }',
118118
'callbackOnCleanup' => 'function() { alert("CleanUp!"); }',
119119
'callbackOnClose' => 'function() { alert("Close!"); }',
120+
'copyTitleFunction' => 'var arr = jQuery("a.fancybox");
121+
jQuery.each(arr, function() {
122+
var title = jQuery(this).children("img").attr("title");
123+
jQuery(this).attr("title",title);
124+
})',
120125

121126
// Troubleshooting
122127
'nojQuery' => '',
@@ -231,12 +236,9 @@ function mfbfw_init() {
231236
<script type="text/javascript">
232237
jQuery(function(){
233238
234-
jQuery.fn.getTitle = function() { // Copy the title of every IMG tag and add it to its parent A so that fancybox can show titles
235-
var arr = jQuery("a.fancybox");
236-
jQuery.each(arr, function() {
237-
var title = jQuery(this).children("img").attr("title");
238-
jQuery(this).attr("title",title);
239-
})
239+
jQuery.fn.getTitle = function() { // Copy the title of every IMG tag and add it to its parent A so that fancybox can show titles';
240+
<?php echo $settings['copyTitleFunction']; ?>
241+
echo '
240242
}
241243

242244
// Supported file extensions

languages/mfbfw-pl_PL.mo

26.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)