Plugin Directory

Changeset 1174533


Ignore:
Timestamp:
06/04/2015 03:56:10 PM (11 years ago)
Author:
sedLex
Message:

Bug in PHP 5.2 which does not allow function definition inside arguments

Location:
image-zoom/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • image-zoom/trunk/image-zoom.php

    r1170913 r1174533  
    44Plugin Tag: zoom, highslide, image, panorama
    55Description: <p>Allow to dynamically zoom on images in posts/pages/... </p><p>When clicked, the image will dynamically scale-up. Please note that you have to insert image normally with the wordpress embedded editor.</p><p>You may configure:</p><ul><li>The max width/height of the image; </li><li>The transition delay; </li><li>The position of the buttons; </li><li>The auto-start of the slideshow; </li><li>the opacity of the background; </li><li>the pages to be excluded. </li></ul><p>If the image does not scale-up, please verify that the HTML looks like the following : &lt;a href=' '&gt;&lt;img src=' '&gt;&lt;/a&gt;.</p><p>This plugin implements the colorbox javascript library. </p><p>This plugin is under GPL licence.</p>
    6 Version: 1.8.6
     6Version: 1.8.7
    77Author: SedLex
    88Author Email: sedlex@sedlex.fr
     
    461461       
    462462        if (preg_match($pattern_img, $matches[0])) {
    463             return preg_replace_callback($pattern_img, function ($m) {
    464                 return stripslashes("<a".$m[2]."href=\"".$m[3]."".$m[4]."\" class=\"gallery_colorbox\"".$m[5].">".$m[6]."<img".$m[7]."src=\"".$m[8]."".$m[9]."\" ".$m[10].">".$m[11]."</a>");
    465             }, $matches[0]);
     463            return preg_replace_callback($pattern_img, array($this, "_modify_content_callback2"), $matches[0]);
    466464        }
    467465       
     
    477475            $this->image_temp = $image ;
    478476           
    479             return preg_replace_callback($pattern, function ($m) {
    480                 return stripslashes("<a".$m[2]."href=\"".$this->image_temp[0]."\" class=\"gallery_colorbox\"".$m[4].">".$m[5]."<img".$m[6]."src=\"".$m[7]."".$m[8]."\" ".$m[9].">".$m[10]."</a>") ;
    481             }, $matches[0]);
     477            return preg_replace_callback($pattern, array($this, "_modify_content_callback3"), $matches[0]);
    482478        }
    483479       
    484480        return $matches[0];
    485481    }
    486    
     482   
     483    function _modify_content_callback2 ($m) {
     484        return stripslashes("<a".$m[2]."href=\"".$m[3]."".$m[4]."\" class=\"gallery_colorbox\"".$m[5].">".$m[6]."<img".$m[7]."src=\"".$m[8]."".$m[9]."\" ".$m[10].">".$m[11]."</a>");
     485    }
     486   
     487    function _modify_content_callback3 ($m) {
     488        return stripslashes("<a".$m[2]."href=\"".$this->image_temp[0]."\" class=\"gallery_colorbox\"".$m[4].">".$m[5]."<img".$m[6]."src=\"".$m[7]."".$m[8]."\" ".$m[9].">".$m[10]."</a>") ;
     489    }
    487490   
    488491   
  • image-zoom/trunk/lang/imagezoom.pot

    r1170913 r1174533  
    2222msgstr ""
    2323
    24 #: image-zoom.php:516
     24#: image-zoom.php:519
    2525#@ imagezoom
    2626msgid "Your theme contains (i.e. in %s file) a hardcoded reference to the jQuery javascript library."
    2727msgstr ""
    2828
    29 #: image-zoom.php:516
     29#: image-zoom.php:519
    3030#@ imagezoom
    3131msgid "This reference may break the plugin. So, if the plugin does not work, please either delete this reference or move it just after the %s declaration."
    3232msgstr ""
    3333
    34 #: image-zoom.php:530
     34#: image-zoom.php:533
    3535#@ imagezoom
    3636msgid "What are the clipped dimensions of the zoomed image?"
    3737msgstr ""
    3838
    39 #: image-zoom.php:531
     39#: image-zoom.php:534
    4040#@ imagezoom
    4141msgid "Max width:"
    4242msgstr ""
    4343
    44 #: image-zoom.php:532
     44#: image-zoom.php:535
    4545#@ imagezoom
    4646msgid "Max height:"
    4747msgstr ""
    4848
    49 #: image-zoom.php:533
     49#: image-zoom.php:536
    5050#@ imagezoom
    5151msgid "Do you want to clip to browser size:"
    5252msgstr ""
    5353
    54 #: image-zoom.php:534
     54#: image-zoom.php:537
    5555#@ imagezoom
    5656msgid "Do you want other width/height for mobile terminals?"
    5757msgstr ""
    5858
    59 #: image-zoom.php:535
     59#: image-zoom.php:538
    6060#@ imagezoom
    6161msgid "Max width for mobile:"
    6262msgstr ""
    6363
    64 #: image-zoom.php:536
     64#: image-zoom.php:539
    6565#@ imagezoom
    6666msgid "Max height for mobile:"
    6767msgstr ""
    6868
    69 #: image-zoom.php:538
     69#: image-zoom.php:541
    7070#@ imagezoom
    7171msgid "What is the text for the frontend?"
    7272msgstr ""
    7373
    74 #: image-zoom.php:539
     74#: image-zoom.php:542
    7575#@ imagezoom
    7676msgid "Previous:"
    7777msgstr ""
    7878
    79 #: image-zoom.php:540
     79#: image-zoom.php:543
    8080#@ imagezoom
    8181msgid "Next:"
    8282msgstr ""
    8383
    84 #: image-zoom.php:541
     84#: image-zoom.php:544
    8585#@ imagezoom
    8686msgid "Close:"
    8787msgstr ""
    8888
    89 #: image-zoom.php:542
     89#: image-zoom.php:545
    9090#@ imagezoom
    9191msgid "Play:"
    9292msgstr ""
    9393
    94 #: image-zoom.php:543
     94#: image-zoom.php:546
    9595#@ imagezoom
    9696msgid "Pause:"
    9797msgstr ""
    9898
    99 #: image-zoom.php:544
     99#: image-zoom.php:547
    100100#@ imagezoom
    101101msgid "The image counter:"
    102102msgstr ""
    103103
    104 #: image-zoom.php:545
     104#: image-zoom.php:548
    105105#@ imagezoom
    106106msgid "The %s will be replace with the index of the image and %s with the total number of images in the page."
    107107msgstr ""
    108108
    109 #: image-zoom.php:547
     109#: image-zoom.php:550
    110110#@ imagezoom
    111111msgid "What is the theme?"
    112112msgstr ""
    113113
    114 #: image-zoom.php:548
     114#: image-zoom.php:551
    115115#@ imagezoom
    116116msgid "Choose the theme:"
    117117msgstr ""
    118118
    119 #: image-zoom.php:549
     119#: image-zoom.php:552
    120120#@ imagezoom
    121121msgid "Theme 01 is : %s."
    122122msgstr ""
    123123
    124 #: image-zoom.php:550
     124#: image-zoom.php:553
    125125#@ imagezoom
    126126msgid "Theme 02 is : %s."
    127127msgstr ""
    128128
    129 #: image-zoom.php:551
     129#: image-zoom.php:554
    130130#@ imagezoom
    131131msgid "Theme 03 is : %s."
    132132msgstr ""
    133133
    134 #: image-zoom.php:552
     134#: image-zoom.php:555
    135135#@ imagezoom
    136136msgid "Theme 04 is : %s (created by %s)."
    137137msgstr ""
    138138
    139 #: image-zoom.php:553
     139#: image-zoom.php:556
    140140#@ imagezoom
    141141msgid "Additional CSS you want to add:"
    142142msgstr ""
    143143
    144 #: image-zoom.php:554
     144#: image-zoom.php:557
    145145#@ imagezoom
    146146msgid "If you want to modify sligthly the CSS, you can modify it here."
    147147msgstr ""
    148148
    149 #: image-zoom.php:557
     149#: image-zoom.php:560
    150150#@ imagezoom
    151151msgid "Show description text"
    152152msgstr ""
    153153
    154 #: image-zoom.php:558
     154#: image-zoom.php:561
    155155#@ imagezoom
    156156msgid "Show the title of the image:"
    157157msgstr ""
    158158
    159 #: image-zoom.php:559
     159#: image-zoom.php:562
    160160#@ imagezoom
    161161msgid "Show the alternative text of the image:"
    162162msgstr ""
    163163
    164 #: image-zoom.php:561
     164#: image-zoom.php:564
    165165#@ imagezoom
    166166msgid "What are the other parameters?"
    167167msgstr ""
    168168
    169 #: image-zoom.php:562
     169#: image-zoom.php:565
    170170#@ imagezoom
    171171msgid "Transition time if the slideshow is on:"
    172172msgstr ""
    173173
    174 #: image-zoom.php:563
     174#: image-zoom.php:566
    175175#@ imagezoom
    176176msgid "Auto-start the slideshow when launched:"
    177177msgstr ""
    178178
    179 #: image-zoom.php:564
     179#: image-zoom.php:567
    180180#@ imagezoom
    181181msgid "The opacity of the background:"
    182182msgstr ""
    183183
    184 #: image-zoom.php:566
     184#: image-zoom.php:569
    185185#@ imagezoom
    186186msgid "Advanced parameters?"
    187187msgstr ""
    188188
    189 #: image-zoom.php:567
     189#: image-zoom.php:570
    190190#@ imagezoom
    191191msgid "Disable the navigation buttons on images:"
    192192msgstr ""
    193193
    194 #: image-zoom.php:568
     194#: image-zoom.php:571
    195195#@ imagezoom
    196196msgid "Disable click on the image for next (it will then close the slideshow):"
    197197msgstr ""
    198198
    199 #: image-zoom.php:569
     199#: image-zoom.php:572
    200200#@ imagezoom
    201201msgid "Disable the slideshow buttons on images:"
    202202msgstr ""
    203203
    204 #: image-zoom.php:571
     204#: image-zoom.php:574
    205205#@ imagezoom
    206206msgid "List of page exclusions (regular expressions):"
    207207msgstr ""
    208208
    209 #: image-zoom.php:572
     209#: image-zoom.php:575
    210210#@ imagezoom
    211211msgid "For instance, you may exclude page with URL like %s by setting this option to %s. Please add one regular expressions by line"
    212212msgstr ""
    213213
    214 #: image-zoom.php:573
     214#: image-zoom.php:576
    215215#@ imagezoom
    216216msgid "You may also exclude this same page by setting this option to %s"
    217217msgstr ""
    218218
    219 #: image-zoom.php:574
     219#: image-zoom.php:577
    220220#@ imagezoom
    221221msgid "In addition, you may set this option to %s and to %s to exclude the home page"
    222222msgstr ""
    223223
    224 #: image-zoom.php:576
     224#: image-zoom.php:579
    225225#@ imagezoom
    226226msgid "Disable if the user uses mobile terminal:"
    227227msgstr ""
    228228
    229 #: image-zoom.php:579
     229#: image-zoom.php:582
    230230#@ imagezoom
    231231msgid "Parameters"
    232232msgstr ""
    233233
    234 #: image-zoom.php:583
     234#: image-zoom.php:586
    235235#@ imagezoom
    236236msgid "This plugin allows a dynamic zoom on the images."
    237237msgstr ""
    238238
    239 #: image-zoom.php:584
     239#: image-zoom.php:587
    240240#@ imagezoom
    241241msgid "All images in your pages/posts like %s will be zoomable."
    242242msgstr ""
    243243
    244 #: image-zoom.php:585
     244#: image-zoom.php:588
    245245#@ imagezoom
    246246msgid "Purpose of that plugin"
    247247msgstr ""
    248248
    249 #: image-zoom.php:587
     249#: image-zoom.php:590
    250250#@ imagezoom
    251251msgid "If you want to exclude one specific image, please modify the HTML code so that this image is like that: %s or %s."
    252252msgstr ""
    253253
    254 #: image-zoom.php:588
     254#: image-zoom.php:591
    255255#@ imagezoom
    256256msgid "Exclude an image"
    257257msgstr ""
    258258
    259 #: image-zoom.php:590
     259#: image-zoom.php:593
    260260#@ imagezoom
    261261msgid "If you want to exclude one specific page, please use the advanced option in the configuration tab"
    262262msgstr ""
    263263
    264 #: image-zoom.php:591
     264#: image-zoom.php:594
    265265#@ imagezoom
    266266msgid "For instance, you may exclude page with URL like %s by setting this option to portfolio. Please add one regular expressions by line."
    267267msgstr ""
    268268
    269 #: image-zoom.php:592
     269#: image-zoom.php:595
    270270#@ imagezoom
    271271msgid "You may also exclude this same page by setting this option to %s."
    272272msgstr ""
    273273
    274 #: image-zoom.php:593
     274#: image-zoom.php:596
    275275#@ imagezoom
    276276msgid "In addition, you may set this option to %s and to %s to exclude the home page."
    277277msgstr ""
    278278
    279 #: image-zoom.php:594
     279#: image-zoom.php:597
    280280#@ imagezoom
    281281msgid "Exclude a page"
    282282msgstr ""
    283283
    284 #: image-zoom.php:596
     284#: image-zoom.php:599
    285285#@ imagezoom
    286286msgid "One of the most probable reason that the plugin does not work is that there is a conflict with your theme of one of your plugins."
    287287msgstr ""
    288288
    289 #: image-zoom.php:597
     289#: image-zoom.php:600
    290290#@ imagezoom
    291291msgid "Before contacting me, please test deactivating each plugin one by one to see if it solve the problem and change the theme by the default one."
    292292msgstr ""
    293293
    294 #: image-zoom.php:598
     294#: image-zoom.php:601
    295295#@ imagezoom
    296296msgid "Indeed, most of the time the %s library is not loaded correctly."
    297297msgstr ""
    298298
    299 #: image-zoom.php:599
     299#: image-zoom.php:602
    300300#@ imagezoom
    301301msgid "I cannot give you a simple way to correct it!"
    302302msgstr ""
    303303
    304 #: image-zoom.php:600
     304#: image-zoom.php:603
    305305#@ imagezoom
    306306msgid "The plugin does not work"
    307307msgstr ""
    308308
    309 #: image-zoom.php:606
     309#: image-zoom.php:609
    310310#@ imagezoom
    311311msgid "How To"
    312312msgstr ""
    313313
    314 #: image-zoom.php:612
     314#: image-zoom.php:615
    315315#@ imagezoom
    316316msgid "Manage translations"
    317317msgstr ""
    318318
    319 #: image-zoom.php:618
     319#: image-zoom.php:621
    320320#@ imagezoom
    321321msgid "Give feedback"
    322322msgstr ""
    323323
    324 #: image-zoom.php:623
     324#: image-zoom.php:626
    325325#@ imagezoom
    326326msgid "Other plugins"
  • image-zoom/trunk/readme.txt

    r1170913 r1174533  
    8686== Changelog ==
    8787
     88= 1.8.4 - 1.8.7 =
     89* BUG: various version to overcome a bug in PHP 5.2
     90
    8891= 1.8.3 =
    8992* BUG: remove the e modifier for preg_replace (deprecated in 5.5)
     
    209212 
    210213 
    211 InfoVersion:a87fac306ca6f172db1c60c133538d006944b708
     214InfoVersion:442fd52d7eb365b5ec925e54de5e944da36c0e34
Note: See TracChangeset for help on using the changeset viewer.