Plugin Directory

Changeset 732771


Ignore:
Timestamp:
06/27/2013 10:38:01 AM (13 years ago)
Author:
wp-maverick
Message:

v0.9.6 release

Location:
wp-parallax-content-slider/trunk
Files:
12 added
3 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • wp-parallax-content-slider/trunk/README.txt

    r702369 r732771  
    55Tags: slider, parallax, animation, jquery, responsive
    66Requires at least: 3.0
    7 Tested up to: 3.5.1
     7Tested up to: 3.5.2
    88Stable tag: trunk
    99
     
    3535Roadmap:
    3636
     37* Static slides in a new dedicated custom_post_type;
     38* Better shortcodes;
     39* Add a parameter to use an external CSS file to customize CSS styles;
    3740* Add extra parameters to the admin panel (Sizes, colors,...);
    3841* Better touch support;
    39 * A new custom post type to manage static slides in the Wordpress admin panel
    4042* and many more...
    4143
     
    4648* Russian (ru_RU): [Temur Danelia](http://wordpress.org/support/profile/temur-danelia)
    4749* Georgian (ka_GE): [Temur Danelia](http://wordpress.org/support/profile/temur-danelia)
     50* Polish (pl_PL): [snecz](http://wordpress.org/support/profile/snecz)
     51* Turkish (tr_TR): Batuhan Büyükgüzel (Partial translation: 65%)
     52* Dutch (nl_NL): Marieke_Louise
     53* German (de_DE): Jan Holthuis
    4854* other languages (xx_XX): Translators needed ;) See the FAQ
    4955
     
    6470
    6571== Frequently Asked Questions ==
    66 
    6772= How may I contribute to this awesome project? =
    6873
     
    8186= How do I add/edit slides in static mode? =
    8287
    83 In static display mode, the plugin simply use the 4 slides which are in the file `static-slides-sample.php`. So if you want to add/edit slides, youll have to edit manually this file! (I recommand to copy the sample file and rename it, then change the inclusion in `wp-parallax-content-slider.php`:
     88In static display mode, the plugin simply use the 4 slides which are in the file `static-slides-sample.php`. So if you want to add/edit slides, you’ll have to edit manually this file! (I recommand to copy the sample file and rename it, then change the inclusion in `wp-parallax-content-slider.php`:
    8489`include('static-slides-sample.php');`
    8590to
     
    118123== Changelog ==
    119124
     125To see the current development version, come and have a look to the project [GitHub repository](https://github.com/jlethuau/wp-parallax-content-slider)
     126
     127= 0.9.6 =
     128* Serious PHP code refactoring
     129* Added some filter hooks: prlx_slide_title, prlx_slide_content, prlx_pre_get_posts
     130* New swipe JS plugin [touchswipe.js](http://labs.skinkers.com/touchSwipe/)
     131* Use first image in content if there is no thumbnail image
     132* Fixed notice from wordpress with register_uninstall_hook
     133* Added several new translation files
     134
    120135= 0.9.5 =
    121 
    122136* Fixed a bug : Some debug code forgotten in the main PHP file
    123137
    124138= 0.9.4 =
    125 
    126139* Support for a new shortcode parameter to filter on one or more categories
    127140
    128141= 0.9.3 =
    129 
    130142* New translations (Georgian and Russian) thanks to Temur Danelia
    131143* New parameter: Choose to display content or excerpt (Warning: displaying full content will certainly cause CSS bugs you'll have to fix yourself)
  • wp-parallax-content-slider/trunk/locale/wp-parallax-content-slider-fr_FR.po

    r681519 r732771  
    44"Report-Msgid-Bugs-To: \n"
    55"POT-Creation-Date: 2013-03-13 22:43+0100\n"
    6 "PO-Revision-Date: 2013-03-13 22:45+0100\n"
    7 "Last-Translator: Julien LE THUAUT <julien.le.thuaut@gmail.com>\n"
     6"PO-Revision-Date: 2013-06-27 12:25+0100\n"
     7"Last-Translator: MBA Multimedia <mbamultimedia@gmail.com>\n"
    88"Language-Team: \n"
    99"Language: fr_FR\n"
  • wp-parallax-content-slider/trunk/locale/wp-parallax-content-slider-ka_GE.po

    r681342 r732771  
    44"Report-Msgid-Bugs-To: \n"
    55"POT-Creation-Date: 2013-03-10 23:06+0100\n"
    6 "PO-Revision-Date: 2013-03-11 22:09+0100\n"
    7 "Last-Translator: Julien LE THUAUT <julien.le.thuaut@gmail.com>\n"
     6"PO-Revision-Date: 2013-06-27 12:26+0100\n"
     7"Last-Translator: MBA Multimedia <mbamultimedia@gmail.com>\n"
    88"Language-Team: BizWebmaster <temur@danelia.info>\n"
    99"Language: ka_GE\n"
  • wp-parallax-content-slider/trunk/locale/wp-parallax-content-slider-ru_RU.po

    r681342 r732771  
    44"Report-Msgid-Bugs-To: \n"
    55"POT-Creation-Date: 2013-03-10 23:06+0100\n"
    6 "PO-Revision-Date: 2013-03-11 22:09+0100\n"
    7 "Last-Translator: Julien LE THUAUT <julien.le.thuaut@gmail.com>\n"
     6"PO-Revision-Date: 2013-06-27 12:26+0100\n"
     7"Last-Translator: MBA Multimedia <mbamultimedia@gmail.com>\n"
    88"Language-Team: BizWebmaster <temur@danelia.info>\n"
    99"Language: ru\n"
  • wp-parallax-content-slider/trunk/locale/wp-parallax-content-slider.pot

    r681519 r732771  
    33"Project-Id-Version: wp-parallax-content-slider\n"
    44"Report-Msgid-Bugs-To: \n"
    5 "POT-Creation-Date: 2013-03-13 22:43+0100\n"
    6 "PO-Revision-Date: 2013-03-13 22:44+0100\n"
    7 "Last-Translator: Julien LE THUAUT <julien.le.thuaut@gmail.com>\n"
     5"POT-Creation-Date: 2013-03-19 18:40+0100\n"
     6"PO-Revision-Date: 2013-03-19 18:40+0100\n"
     7"Last-Translator: MBA Multimedia <mbamultimedia@gmail.com>\n"
    88"Language-Team: \n"
    99"MIME-Version: 1.0\n"
     
    1111"Content-Transfer-Encoding: 8bit\n"
    1212"X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
    13 "X-Poedit-Basepath: .\n"
     13"X-Poedit-Basepath: ../\n"
    1414"X-Poedit-SourceCharset: UTF-8\n"
    1515"X-Generator: Poedit 1.5.5\n"
    16 "X-Poedit-SearchPath-0: C:\\Program Files (x86)\\EasyPHP-12.1\\www\\wordpress"
    17 "\\wp-content\\plugins\\wp-parallax-content-slider\n"
    18 "X-Poedit-SearchPath-1: ..\n"
    19 
    20 #: C:\Program Files
    21 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/static-slides-sample.php:16
    22 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:304
    23 #: ../static-slides-sample.php:16 ../wp-parallax-content-slider.php:304
     16"X-Poedit-SearchPath-0: .\n"
     17
     18#: static-slides-sample.php:16 wp-parallax-content-slider.php:307
    2419msgid "Read more"
    2520msgstr ""
    2621
    27 #: C:\Program Files
    28 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:315
    29 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:316
    30 #: ../wp-parallax-content-slider.php:315 ../wp-parallax-content-slider.php:316
     22#: wp-parallax-content-slider.php:318 wp-parallax-content-slider.php:319
    3123msgid "WP Parallax Content Slider"
    3224msgstr ""
    3325
    34 #: C:\Program Files
    35 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:330
    36 #: ../wp-parallax-content-slider.php:330
     26#: wp-parallax-content-slider.php:333
    3727msgid "No access"
    3828msgstr ""
    3929
    40 #: C:\Program Files
    41 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:343
    42 #: ../wp-parallax-content-slider.php:343
     30#: wp-parallax-content-slider.php:346
    4331msgid "Incorrect slider mode"
    4432msgstr ""
    4533
    46 #: C:\Program Files
    47 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:348
    48 #: ../wp-parallax-content-slider.php:348
     34#: wp-parallax-content-slider.php:351
    4935msgid "Incorrect slider theme"
    5036msgstr ""
    5137
    52 #: C:\Program Files
    53 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:353
    54 #: ../wp-parallax-content-slider.php:353
     38#: wp-parallax-content-slider.php:356
    5539msgid "Incorrect background increment pixel size"
    5640msgstr ""
    5741
    58 #: C:\Program Files
    59 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:358
    60 #: ../wp-parallax-content-slider.php:358
     42#: wp-parallax-content-slider.php:361
    6143msgid "Incorrect time interval"
    6244msgstr ""
    6345
    64 #: C:\Program Files
    65 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:364
    66 #: ../wp-parallax-content-slider.php:364
     46#: wp-parallax-content-slider.php:367
    6747msgid "Incorrect first slide number"
    6848msgstr ""
    6949
    70 #: C:\Program Files
    71 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:371
    72 #: ../wp-parallax-content-slider.php:371
     50#: wp-parallax-content-slider.php:374
    7351msgid "Incorrect maximum slide number"
    7452msgstr ""
    7553
    76 #: C:\Program Files
    77 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:376
    78 #: ../wp-parallax-content-slider.php:376
     54#: wp-parallax-content-slider.php:379
    7955msgid "Incorrect maximum title length"
    8056msgstr ""
    8157
    82 #: C:\Program Files
    83 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:381
    84 #: ../wp-parallax-content-slider.php:381
     58#: wp-parallax-content-slider.php:384
    8559msgid "Incorrect default image"
    8660msgstr ""
    8761
    88 #: C:\Program Files
    89 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:416
    90 #: ../wp-parallax-content-slider.php:416
     62#: wp-parallax-content-slider.php:419
    9163msgid "Settings updated"
    9264msgstr ""
    9365
    94 #: C:\Program Files
    95 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:420
    96 #: ../wp-parallax-content-slider.php:420
     66#: wp-parallax-content-slider.php:423
    9767msgid "Settings update failed:"
    9868msgstr ""
    9969
    100 #: C:\Program Files
    101 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:452
    102 #: ../wp-parallax-content-slider.php:452
     70#: wp-parallax-content-slider.php:455
    10371msgid "WP Parallax Content Slider Settings"
    10472msgstr ""
    10573
    106 #: C:\Program Files
    107 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:456
    108 #: ../wp-parallax-content-slider.php:456
     74#: wp-parallax-content-slider.php:459
    10975msgid ""
    11076"This plugin is continuing to evolve because of contributions from Wordpress "
     
    11379msgstr ""
    11480
    115 #: C:\Program Files
    116 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:458
    117 #: ../wp-parallax-content-slider.php:458
     81#: wp-parallax-content-slider.php:461
    11882msgid "donation"
    11983msgstr ""
    12084
    121 #: C:\Program Files
    122 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:460
    123 #: ../wp-parallax-content-slider.php:460
     85#: wp-parallax-content-slider.php:463
    12486msgid ""
    12587"Your support helps me to spend more time on development and provide better "
     
    12789msgstr ""
    12890
    129 #: C:\Program Files
    130 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:464
    131 #: ../wp-parallax-content-slider.php:464
     91#: wp-parallax-content-slider.php:467
    13292msgid "Alternatively, if you like this plugin, don't hesitate to "
    13393msgstr ""
    13494
    135 #: C:\Program Files
    136 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:466
    137 #: ../wp-parallax-content-slider.php:466
     95#: wp-parallax-content-slider.php:469
    13896msgid "spread the word"
    13997msgstr ""
    14098
    141 #: C:\Program Files
    142 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:468
    143 #: ../wp-parallax-content-slider.php:468
     99#: wp-parallax-content-slider.php:471
    144100msgid "about it on Twitter, on Facebook,on your own blog,"
    145101msgstr ""
    146102
    147 #: C:\Program Files
    148 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:470
    149 #: ../wp-parallax-content-slider.php:470
     103#: wp-parallax-content-slider.php:473
    150104msgid "rate it"
    151105msgstr ""
    152106
    153 #: C:\Program Files
    154 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:472
    155 #: ../wp-parallax-content-slider.php:472
     107#: wp-parallax-content-slider.php:475
    156108msgid "on Wordpress.org, thanks!"
    157109msgstr ""
    158110
    159 #: C:\Program Files
    160 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:477
    161 #: ../wp-parallax-content-slider.php:477
     111#: wp-parallax-content-slider.php:480
    162112msgid "Code to insert"
    163113msgstr ""
    164114
    165 #: C:\Program Files
    166 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:478
    167 #: ../wp-parallax-content-slider.php:478
     115#: wp-parallax-content-slider.php:481
    168116msgid ""
    169117"The code below must be inserted in a Wordpress file, where you want to "
     
    171119msgstr ""
    172120
    173 #: C:\Program Files
    174 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:484
    175 #: ../wp-parallax-content-slider.php:484
     121#: wp-parallax-content-slider.php:487
    176122msgid ""
    177123"Since v0.9, an alternative is to call the plugin with a shortcode. Doing "
     
    180126msgstr ""
    181127
    182 #: C:\Program Files
    183 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:497
    184 #: ../wp-parallax-content-slider.php:497
     128#: wp-parallax-content-slider.php:500
    185129msgid "General Display Options"
    186130msgstr ""
    187131
    188 #: C:\Program Files
    189 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:501
    190 #: ../wp-parallax-content-slider.php:501
     132#: wp-parallax-content-slider.php:504
    191133msgid "Slider display mode"
    192134msgstr ""
    193135
    194 #: C:\Program Files
    195 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:504
    196 #: ../wp-parallax-content-slider.php:504
     136#: wp-parallax-content-slider.php:507
    197137msgid "Dynamic : display last posts"
    198138msgstr ""
    199139
    200 #: C:\Program Files
    201 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:505
    202 #: ../wp-parallax-content-slider.php:505
     140#: wp-parallax-content-slider.php:508
    203141msgid "Static : display static HTML content"
    204142msgstr ""
    205143
    206 #: C:\Program Files
    207 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:511
    208 #: ../wp-parallax-content-slider.php:511
     144#: wp-parallax-content-slider.php:514
    209145msgid "Number of pixels for background increment"
    210146msgstr ""
    211147
    212 #: C:\Program Files
    213 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:514
    214 #: ../wp-parallax-content-slider.php:514
     148#: wp-parallax-content-slider.php:517
    215149msgid "A negative value will invert the parallax effect"
    216150msgstr ""
    217151
    218 #: C:\Program Files
    219 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:519
    220 #: ../wp-parallax-content-slider.php:519
     152#: wp-parallax-content-slider.php:522
    221153msgid "Auto-play mode"
    222154msgstr ""
    223155
    224 #: C:\Program Files
    225 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:522
    226 #: ../wp-parallax-content-slider.php:522
     156#: wp-parallax-content-slider.php:525
    227157msgid "Activate auto-play"
    228158msgstr ""
    229159
    230 #: C:\Program Files
    231 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:527
    232 #: ../wp-parallax-content-slider.php:527
     160#: wp-parallax-content-slider.php:530
    233161msgid "Time between each slide (in ms)"
    234162msgstr ""
    235163
    236 #: C:\Program Files
    237 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:534
    238 #: ../wp-parallax-content-slider.php:534
     164#: wp-parallax-content-slider.php:537
    239165msgid "Slider theme"
    240166msgstr ""
    241167
    242 #: C:\Program Files
    243 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:537
    244 #: ../wp-parallax-content-slider.php:537
     168#: wp-parallax-content-slider.php:540
    245169msgid "Default : Yellow waves"
    246170msgstr ""
    247171
    248 #: C:\Program Files
    249 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:538
    250 #: ../wp-parallax-content-slider.php:538
     172#: wp-parallax-content-slider.php:541
    251173msgid "Dark"
    252174msgstr ""
    253175
    254 #: C:\Program Files
    255 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:539
    256 #: ../wp-parallax-content-slider.php:539
     176#: wp-parallax-content-slider.php:542
    257177msgid "Retro Red"
    258178msgstr ""
    259179
    260 #: C:\Program Files
    261 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:540
    262 #: ../wp-parallax-content-slider.php:540
     180#: wp-parallax-content-slider.php:543
    263181msgid "Silver"
    264182msgstr ""
    265183
    266 #: C:\Program Files
    267 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:550
    268 #: ../wp-parallax-content-slider.php:550
     184#: wp-parallax-content-slider.php:553
    269185msgid "Static Mode Display Options"
    270186msgstr ""
    271187
    272 #: C:\Program Files
    273 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:554
    274 #: ../wp-parallax-content-slider.php:554
     188#: wp-parallax-content-slider.php:557
    275189msgid "Index of the first slide to display"
    276190msgstr ""
    277191
    278 #: C:\Program Files
    279 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:565
    280 #: ../wp-parallax-content-slider.php:565
     192#: wp-parallax-content-slider.php:568
    281193msgid "Dynamic Mode Display Options"
    282194msgstr ""
    283195
    284 #: C:\Program Files
    285 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:569
    286 #: ../wp-parallax-content-slider.php:569
     196#: wp-parallax-content-slider.php:572
    287197msgid "Content type"
    288198msgstr ""
    289199
    290 #: C:\Program Files
    291 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:572
    292 #: ../wp-parallax-content-slider.php:572
     200#: wp-parallax-content-slider.php:575
    293201msgid "Posts"
    294202msgstr ""
    295203
    296 #: C:\Program Files
    297 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:573
    298 #: ../wp-parallax-content-slider.php:573
     204#: wp-parallax-content-slider.php:576
    299205msgid "Pages"
    300206msgstr ""
    301207
    302 #: C:\Program Files
    303 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:574
    304 #: ../wp-parallax-content-slider.php:574
     208#: wp-parallax-content-slider.php:577
    305209msgid "Post and pages"
    306210msgstr ""
    307211
    308 #: C:\Program Files
    309 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:576
    310 #: ../wp-parallax-content-slider.php:576
     212#: wp-parallax-content-slider.php:579
    311213msgid "Choose what type of content you want to see in the slider"
    312214msgstr ""
    313215
    314 #: C:\Program Files
    315 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:581
    316 #: ../wp-parallax-content-slider.php:581
     216#: wp-parallax-content-slider.php:584
    317217msgid "Number of articles to display"
    318218msgstr ""
    319219
    320 #: C:\Program Files
    321 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:584
    322 #: ../wp-parallax-content-slider.php:584
     220#: wp-parallax-content-slider.php:587
    323221msgid "Maximum number of articles to display in the dynamic slider"
    324222msgstr ""
    325223
    326 #: C:\Program Files
    327 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:589
    328 #: ../wp-parallax-content-slider.php:589
     224#: wp-parallax-content-slider.php:592
    329225msgid "Sort posts by"
    330226msgstr ""
    331227
    332 #: C:\Program Files
    333 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:592
    334 #: ../wp-parallax-content-slider.php:592
     228#: wp-parallax-content-slider.php:595
    335229msgid "Date"
    336230msgstr ""
    337231
    338 #: C:\Program Files
    339 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:593
    340 #: ../wp-parallax-content-slider.php:593
     232#: wp-parallax-content-slider.php:596
    341233msgid "Random"
    342234msgstr ""
    343235
    344 #: C:\Program Files
    345 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:594
    346 #: ../wp-parallax-content-slider.php:594
     236#: wp-parallax-content-slider.php:597
    347237msgid "Title"
    348238msgstr ""
    349239
    350 #: C:\Program Files
    351 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:595
    352 #: ../wp-parallax-content-slider.php:595
     240#: wp-parallax-content-slider.php:598
    353241msgid "Author"
    354242msgstr ""
    355243
    356 #: C:\Program Files
    357 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:596
    358 #: ../wp-parallax-content-slider.php:596
     244#: wp-parallax-content-slider.php:599
    359245msgid "Number of comments"
    360246msgstr ""
    361247
    362 #: C:\Program Files
    363 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:597
    364 #: ../wp-parallax-content-slider.php:597
     248#: wp-parallax-content-slider.php:600
    365249msgid "Last modified date"
    366250msgstr ""
    367251
    368 #: C:\Program Files
    369 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:599
    370 #: ../wp-parallax-content-slider.php:599
     252#: wp-parallax-content-slider.php:602
    371253msgid "Choose how do you want to sort the posts in the slider"
    372254msgstr ""
    373255
    374 #: C:\Program Files
    375 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:604
    376 #: ../wp-parallax-content-slider.php:604
     256#: wp-parallax-content-slider.php:607
    377257msgid "Sort order"
    378258msgstr ""
    379259
    380 #: C:\Program Files
    381 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:607
    382 #: ../wp-parallax-content-slider.php:607
     260#: wp-parallax-content-slider.php:610
    383261msgid "Ascending"
    384262msgstr ""
    385263
    386 #: C:\Program Files
    387 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:608
    388 #: ../wp-parallax-content-slider.php:608
     264#: wp-parallax-content-slider.php:611
    389265msgid "Descending"
    390266msgstr ""
    391267
    392 #: C:\Program Files
    393 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:610
    394 #: ../wp-parallax-content-slider.php:610
     268#: wp-parallax-content-slider.php:613
    395269msgid "Choose how do you want to order the posts in the slider"
    396270msgstr ""
    397271
    398 #: C:\Program Files
    399 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:615
    400 #: ../wp-parallax-content-slider.php:615
     272#: wp-parallax-content-slider.php:618
    401273msgid "Category filter"
    402274msgstr ""
    403275
    404 #: C:\Program Files
    405 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:618
    406 #: ../wp-parallax-content-slider.php:618
     276#: wp-parallax-content-slider.php:621
    407277msgid "Only display posts of chosen categories"
    408278msgstr ""
    409279
    410 #: C:\Program Files
    411 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:623
    412 #: ../wp-parallax-content-slider.php:623
     280#: wp-parallax-content-slider.php:626
    413281msgid "Categories to display"
    414282msgstr ""
    415283
    416 #: C:\Program Files
    417 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:646
    418 #: ../wp-parallax-content-slider.php:646
     284#: wp-parallax-content-slider.php:649
    419285msgid ""
    420286"Categories to display (multiple selection). Empty selection will display all "
     
    422288msgstr ""
    423289
    424 #: C:\Program Files
    425 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:651
    426 #: ../wp-parallax-content-slider.php:651
     290#: wp-parallax-content-slider.php:654
    427291msgid "Slide title max length"
    428292msgstr ""
    429293
    430 #: C:\Program Files
    431 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:654
    432 #: ../wp-parallax-content-slider.php:654
     294#: wp-parallax-content-slider.php:657
    433295msgid "Maximum number of characters to display in a dynamic slide title"
    434296msgstr ""
    435297
    436 #: C:\Program Files
    437 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:659
    438 #: ../wp-parallax-content-slider.php:659
     298#: wp-parallax-content-slider.php:662
    439299msgid "Default image"
    440300msgstr ""
    441301
    442 #: C:\Program Files
    443 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:662
    444 #: ../wp-parallax-content-slider.php:662
     302#: wp-parallax-content-slider.php:665
    445303msgid "Name of the default image to display for posts without thumbnail"
    446304msgstr ""
    447305
    448 #: C:\Program Files
    449 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:666
    450 #: ../wp-parallax-content-slider.php:666
     306#: wp-parallax-content-slider.php:669
    451307msgid "Displayed text"
    452308msgstr ""
    453309
    454 #: C:\Program Files
    455 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:669
    456 #: ../wp-parallax-content-slider.php:669
     310#: wp-parallax-content-slider.php:672
    457311msgid "Content"
    458312msgstr ""
    459313
    460 #: C:\Program Files
    461 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:670
    462 #: ../wp-parallax-content-slider.php:670
     314#: wp-parallax-content-slider.php:673
    463315msgid "Excerpt"
    464316msgstr ""
    465317
    466 #: C:\Program Files
    467 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:672
    468 #: ../wp-parallax-content-slider.php:672
     318#: wp-parallax-content-slider.php:675
    469319msgid ""
    470320"Choose if you want to display the full content or the excerpt in the slider"
    471321msgstr ""
    472322
    473 #: C:\Program Files
    474 #: (x86)\EasyPHP-12.1\www\wordpress\wp-content\plugins\wp-parallax-content-slider/wp-parallax-content-slider.php:679
    475 #: ../wp-parallax-content-slider.php:679
     323#: wp-parallax-content-slider.php:682
    476324msgid "Save Changes"
    477325msgstr ""
  • wp-parallax-content-slider/trunk/wp-parallax-content-slider.php

    r702369 r732771  
    66 * Author URI: http://jltweb.info/
    77 * Author: Julien Le Thuaut (MBA Multimedia)
    8  * Version: 0.9.5
     8 * Version: 0.9.6
    99 * Licence: GPLv2
    10 */
     10 *
     11 */
     12
     13include_once plugin_dir_path( __FILE__ ) .'includes/content_functions.php';
     14
    1115class WpParallaxContentSlider
    1216{
     17    public $pluginUrl = '';
     18
    1319    /**
    1420     * Constructor: Initializes the plugin
     
    1824        load_plugin_textdomain( 'wp-parallax-content-slider', false, basename( dirname( __FILE__ ) ) . '/locale' );
    1925
    20         // Javascript init
    21         wp_enqueue_script('jquery');
    22         wp_enqueue_script( 'wp-parallax-content-slider-modernizr', plugins_url( 'js/modernizr.custom-2.6.2.js', __FILE__ ) );
    23         wp_enqueue_script( 'wp-parallax-content-slider-jgestures', plugins_url( 'js/jgestures.min.js', __FILE__ ) );
    24         wp_enqueue_script( 'wp-parallax-content-slider-jswipe', plugins_url( 'js/jquery.jswipe.js', __FILE__ ) );
    25         wp_enqueue_script( 'wp-parallax-content-slider-cslider', plugins_url( 'js/jquery.cslider.js', __FILE__ ) );
    26 
    27         // CSS Init
    28         wp_enqueue_style( 'wp-parallax-content-slider-css', plugins_url( 'css/style.css', __FILE__ ) );
     26        // Set abs path
     27        $this->pluginUrl = plugins_url('', __FILE__);
     28
     29        // Only load scripts when it's needed (front-end)
     30        if ( !is_admin() ) {
     31            add_action( 'wp_enqueue_scripts', array( &$this, 'enqueue_scripts' ) );
     32        }
    2933
    3034        // Register hooks that are fired when the plugin is activated, deactivated, and uninstalled, respectively.
    3135        register_activation_hook( __FILE__, array( $this, 'activate' ) );
    3236        //register_deactivation_hook( __FILE__, array( $this, 'uninstall' ) ); // TODO: Doing this on deactivation should require an extra parameter (user choice)
    33         register_uninstall_hook( __FILE__, array( $this, 'uninstall' ) );
     37        register_uninstall_hook( __FILE__, array( __CLASS__, 'uninstall' ) );
    3438
    3539        // Parallax slider plugin specific actions
     
    3741        add_shortcode( 'parallaxcontentslider', array( $this, 'parallaxcontentslider_shortcode_call' ) );
    3842    } // end constructor
     43
     44    /**
     45     * Fired on WordPress script enqueue action.
     46     */
     47    public function enqueue_scripts()
     48    {
     49        // Javascript init
     50        wp_register_script(
     51            'wp-parallax-content-slider-modernizr',
     52            $this->pluginUrl . '/js/modernizr.custom-2.6.2.js',
     53            array(),
     54            false,
     55            true
     56        );
     57        wp_register_script(
     58            'wp-parallax-content-slider-touchSwipe',
     59            $this->pluginUrl . '/js/jquery.touchSwipe.min.js',
     60            array( 'jquery' ),
     61            false,
     62            true
     63        );
     64        wp_register_script(
     65            'wp-parallax-content-slider-cslider',
     66            $this->pluginUrl . '/js/jquery.cslider.js',
     67            array( 'jquery' ),
     68            false,
     69            true
     70        );
     71        wp_register_script(
     72            'wp-parallax-content-slider-core',
     73            $this->pluginUrl . '/js/core.js',
     74            array( 'jquery' ),
     75            false,
     76            true
     77        );
     78
     79        // CSS Init
     80        wp_enqueue_style( 'wp-parallax-content-slider-css', $this->pluginUrl . '/css/style.css' );
     81    }
    3982
    4083    /**
     
    5093         */
    5194        $prlx_slider_settings = array(
    52                 'mode' => 'static',                 // Slider display mode (static / dynamic)
    53                 'theme' => 'silver',                // default / silver / retro / dark
    54                 'bgincrement' => 50,                // increment the background position (i.e. parallax effect) when sliding (in px)
    55                 'autoplay' => 0,                    // slideshow auto switch ON (1) / OFF (0)
    56                 'interval' => 4000,                 // Time between transitions (ms)
    57                 'first_slide' => 1,                 // index of first slide to display (in static mode)
    58                 'nb_articles' => 5,                 // Max number of articles to query in the blog database
     95                'mode'            => 'static',      // Slider display mode (static / dynamic)
     96                'theme'           => 'silver',      // default / silver / retro / dark
     97                'bgincrement'     => 50,            // increment the background position (i.e. parallax effect) when sliding (in px)
     98                'autoplay'        => 0,             // slideshow auto switch ON (1) / OFF (0)
     99                'interval'        => 4000,          // Time between transitions (ms)
     100                'first_slide'     => 1,             // index of first slide to display (in static mode)
     101                'nb_articles'     => 5,             // Max number of articles to query in the blog database
    59102                'title_max_chars' => 30,            // Max number of characters to display for a slide title
    60                 'sort_by' => 'date',                // Default field for post sorting
    61                 'order_by' => 'desc',               // Default type of ordering
    62                 'default_image' => 'default.png',   // Default image to display in dynamic mode for posts without thumbnails
     103                'sort_by'         => 'date',        // Default field for post sorting
     104                'order_by'        => 'desc',        // Default type of ordering
     105                'default_image'   => 'default.png', // Default image to display in dynamic mode for posts without thumbnails
    63106                'category_filter' => 0,             // Category filtering ON (1) / OFF (0)
    64                 'categories' => '',                 // Default is all (empty)
    65                 'text_content' => 'excerpt',        // Full content (content) or excerpt (excerpt)
    66                 'content_type' => 'post'            // Slider content type (post / page / both)
     107                'categories'      => '',            // Default is all (empty)
     108                'text_content'    => 'excerpt',     // Full content (content) or excerpt (excerpt)
     109                'content_type'    => 'post'         // Slider content type (post / page / both)
    67110        );
    68111
     
    72115        if( get_option( 'prlx_slider_mode' ) ) {
    73116            // Keep old values
    74             $prlx_slider_settings['mode']           = get_option( 'prlx_slider_mode' );
    75             $prlx_slider_settings['theme']          = get_option( 'prlx_slider_theme' );
    76             $prlx_slider_settings['bgincrement']    = get_option( 'prlx_slider_bgincrement' );
    77             $prlx_slider_settings['autoplay']       = get_option( 'prlx_slider_autoplay' );
    78             $prlx_slider_settings['interval']       = get_option( 'prlx_slider_interval' );
    79             $prlx_slider_settings['first_slide']    = get_option( 'prlx_slider_first_slide' );
    80             $prlx_slider_settings['nb_articles']    = get_option( 'prlx_slider_nb_articles' );
     117            $prlx_slider_settings['mode']            = get_option( 'prlx_slider_mode' );
     118            $prlx_slider_settings['theme']           = get_option( 'prlx_slider_theme' );
     119            $prlx_slider_settings['bgincrement']     = get_option( 'prlx_slider_bgincrement' );
     120            $prlx_slider_settings['autoplay']        = get_option( 'prlx_slider_autoplay' );
     121            $prlx_slider_settings['interval']        = get_option( 'prlx_slider_interval' );
     122            $prlx_slider_settings['first_slide']     = get_option( 'prlx_slider_first_slide' );
     123            $prlx_slider_settings['nb_articles']     = get_option( 'prlx_slider_nb_articles' );
    81124            $prlx_slider_settings['title_max_chars'] = get_option( 'prlx_title_max_chars' );
    82             $prlx_slider_settings['sort_by']        = get_option( 'prlx_slider_sort_by' );
    83             $prlx_slider_settings['order_by']       = get_option( 'prlx_slider_order_by' );
    84             $prlx_slider_settings['default_image']  = get_option( 'prlx_default_image' );
     125            $prlx_slider_settings['sort_by']         = get_option( 'prlx_slider_sort_by' );
     126            $prlx_slider_settings['order_by']        = get_option( 'prlx_slider_order_by' );
     127            $prlx_slider_settings['default_image']   = get_option( 'prlx_default_image' );
    85128            $prlx_slider_settings['category_filter'] = get_option( 'prlx_slider_category_filter' );
    86             $prlx_slider_settings['categories']     = get_option( 'prlx_slider_categories' );
    87             $prlx_slider_settings['text_content']   = get_option( 'prlx_text_content' );
    88             $prlx_slider_settings['content_type']   = get_option( 'prlx_slider_content_type' );
     129            $prlx_slider_settings['categories']      = get_option( 'prlx_slider_categories' );
     130            $prlx_slider_settings['text_content']    = get_option( 'prlx_text_content' );
     131            $prlx_slider_settings['content_type']    = get_option( 'prlx_slider_content_type' );
    89132
    90133            // Deletes obsolete DB entries
     
    127170     * Enable shortcodes :
    128171     * [parallaxcontentslider]
    129      * [parallaxcontentslider categ="2"]
    130      * [parallaxcontentslider categ="2,5"]
     172     * [parallaxcontentslider cat="2"]
     173     * [parallaxcontentslider cat="2,5"]
    131174     */
    132175    public function parallaxcontentslider_shortcode_call( $atts ){
     
    144187    public function get_parallax_content_slider( $category = '' )
    145188    {
    146 
     189        // Enqueue scripts
     190        wp_enqueue_script( 'wp-parallax-content-slider-modernizr' );
     191        wp_enqueue_script( 'wp-parallax-content-slider-touchSwipe' );
     192        wp_enqueue_script( 'wp-parallax-content-slider-cslider' );
    147193
    148194        // Retrieving plugin parameters (user choices or default values)
    149         $prlx_slider_settings = get_option( 'prlx_slider_settings' );
    150 
     195        $prlx_slider_settings = get_option( 'prlx_slider_settings');
    151196        $prlx_slider_mode               = $prlx_slider_settings['mode'];
    152197        $prlx_slider_theme              = $prlx_slider_settings['theme'];
     
    167212        $prlx_text_content              = $prlx_slider_settings['text_content'];
    168213
     214        // Get some javascript values from database
     215        wp_localize_script(
     216            'wp-parallax-content-slider-core', // Script handle,
     217            'prlx', // Name of global js object
     218            array(
     219                'bgincrement'   => $prlx_slider_bgincrement,
     220                'autoplay'      => $prlx_slider_autoplay,
     221                'interval'      => $prlx_slider_interval,
     222                'current'       => $prlx_slider_first_slide - 1
     223            ) // Values of global js object
     224        );
     225        // Then enqueue modified script
     226        wp_enqueue_script( 'wp-parallax-content-slider-core' );
     227
    169228        switch( $prlx_slider_theme )
    170229        {
     
    182241
    183242        $typ = '';
    184         switch ( $prlx_slider_content_type ) {
     243        switch ($prlx_slider_content_type) {
    185244            case "both":
    186                 $typ = array('post', 'page');
     245                $typ = array( 'post', 'page' );
    187246                break;
    188247            case "page":
    189                 $typ = array('page');
     248                $typ = array( 'page' );
    190249                break;
    191250            default:
    192                 $typ = array('post');
     251                $typ = array( 'post' );
    193252        }
    194253
     
    209268                       'orderby' => $prlx_sort,
    210269                       'order' => $prlx_order,
    211                        'numberposts' =>  $prlx_slider_nb_articles,
     270                       'posts_per_page' =>  $prlx_slider_nb_articles,
    212271                       'cat' => $cat,
    213                        'suppress_filters'=>0 ); // Added for WPML support
    214 
    215         $myposts = get_posts( $args );
     272                       'suppress_filters'=>0, // Added for WPML support
     273        );
     274
     275        $myposts = new WP_Query( apply_filters( 'prlx_pre_get_posts', $args ) );
    216276
    217277        // --------------------------------------------------------
     
    219279
    220280        // TODO: remove this code in production mode
    221         // echo $debug  = "cat : " . $cat . " | " . $category . "<br/>";
     281        //echo $debug  = "prlx_slider_content_type : " . $prlx_slider_content_type . "<br/>";
     282
     283        $plugin_abs_path = $this->pluginUrl;
     284        $default_slide_image = $plugin_abs_path . '/images/' . $prlx_default_image;
    222285
    223286        $outputDynamic = "<div id='da-slider' class='da-slider'>\n";
    224287
    225         foreach( $myposts as $post ) :  setup_postdata($post);
     288        while ( $myposts->have_posts() ) : $myposts->the_post();
    226289
    227290            // $custom = get_post_custom($post->ID);
    228             $plugin_abs_path = plugins_url( '', __FILE__ );
    229             $default_slide_image = $plugin_abs_path."/images/".$prlx_default_image;
    230291
    231292            // Display the post thumbnail if there is one (Thank you John)
    232293            if ( has_post_thumbnail() ) {
    233                 $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'medium' );
     294                $thumb = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'medium' );
    234295                $url = $thumb['0'];
    235296                $default_slide_image = $url;
     297            }
     298            else if ( has_content_image( ) != '' ){
     299            //  echo get_content_image_urls( get_the_content() );
     300                $temp = get_content_image_urls( );
     301                $default_slide_image = $temp[0];
    236302            }
    237303
     
    241307                                                            get_permalink(),
    242308                                                            $default_slide_image,
    243                                                             $prlx_title_max_chars)."\n";
     309                                                            $prlx_title_max_chars )."\n";
    244310            } else {
    245311                $outputDynamic .= $this->get_article_slide( get_the_title(),
     
    247313                                                            get_permalink(),
    248314                                                            $default_slide_image,
    249                                                             $prlx_title_max_chars)."\n";
    250             }
    251 
    252         endforeach; wp_reset_postdata();
    253 
    254         // TODO: Améliorer le code ici (Utiliser l'output buffer ? ob_start, ob_get_clean...)
     315                                                            $prlx_title_max_chars )."\n";
     316            }
     317
     318        endwhile; wp_reset_postdata();
    255319
    256320$outputDynamic .= <<<DYNAMICOUTPUT
     
    262326DYNAMICOUTPUT;
    263327
    264 $outputScript = <<<SCRIPTOUTPUT
    265 <script type="text/javascript">
    266     jQuery(function() {
    267         jQuery('#da-slider').cslider({
    268             bgincrement : $prlx_slider_bgincrement,
    269             autoplay    : $prlx_slider_autoplay,
    270             interval    : $prlx_slider_interval,
    271             current     : $prlx_slider_first_slide-1
    272         });
    273 
    274         jQuery('#da-slider').swipe({
    275              swipeLeft:  function() { jQuery('#da-slider').find('span.da-arrows-next').click() },
    276              swipeRight: function() { jQuery('#da-slider').find('span.da-arrows-prev').click() },
    277         })
    278 
    279         /* FIXME
    280         jQuery('#da-slider').bind('swipeleft',function(){
    281             console.log('Swipe event detected > left');
    282             jQuery('#da-slider').find('span.da-arrows-next').click();
    283         });
    284         jQuery('#da-slider').bind('swiperight',function(){
    285             console.log('Swipe event detected > right');
    286             jQuery('#da-slider').find('span.da-arrows-prev').click();
    287         });
    288         */
    289     });
    290 </script>
    291 SCRIPTOUTPUT;
    292 
    293328        // New in v0.3
    294329        // You can modify the slides in the php file : static-slides-sample.php
    295330        // Note : you should copy the sample file and include the new file here
    296331        // Doing this will prevent you to lose your changes when you will update the plugin automatically
    297         include('static-slides-sample.php');
    298         if ($prlx_slider_mode === 'dynamic')
     332        if ( $prlx_slider_mode === 'dynamic' )
    299333        {
    300             print $outputDynamic.$outputScript;
     334            echo $outputDynamic;
    301335        }
    302336        else
    303337        {
    304             print $outputStatic.$outputScript;
     338            $outputStatic = '';
     339            include( 'static-slides-sample.php' );
     340            echo $outputStatic;
    305341        }
    306342
     
    312348     * Generate HTML output for an article slide
    313349     */
    314     function get_article_slide($title, $excerpt, $link_article, $url_image, $title_length, $alt_image = 'Alternative text')
     350    function get_article_slide( $title, $excerpt, $link_article, $url_image, $title_length, $alt_image = 'Alternative text' )
    315351    {
    316352        // Parameters
    317         if (strlen($title) > $title_length) $title = mb_substr($title, 0, $title_length)."...";
     353        if ( strlen( $title ) > $title_length ) $title = mb_substr( $title, 0, $title_length ) . "...";
     354
     355        $title = apply_filters( 'prlx_slide_title', $title, get_the_title() );
    318356
    319357        // Slide output
     
    324362        $outputSlide .= "<div class='da-img'><img src='".$url_image."' alt='".$alt_image."' /></div>"."\n";
    325363        $outputSlide .= "</div>"."\n";
     364
     365        $outputSlide = apply_filters( 'prlx_slide_content', $outputSlide, $this );
     366
    326367        return $outputSlide;
    327368    }
     
    357398            $error = "<ul>";
    358399            // General parameters
    359             if ( empty($_POST['prlx_slider_mode']) )
     400            if ( empty( $_POST['prlx_slider_mode'] ) )
    360401            {
    361402                $validation = false;
    362                 $error .= "<li>".__( 'Incorrect slider mode', 'wp-parallax-content-slider' )."</li>";
    363             }
    364             if ( empty($_POST['prlx_slider_theme']) )
     403                $error .= "<li>" . __( 'Incorrect slider mode', 'wp-parallax-content-slider' )."</li>";
     404            }
     405            if ( empty( $_POST['prlx_slider_theme'] ) )
    365406            {
    366407                $validation = false;
    367                 $error .= "<li>".__( 'Incorrect slider theme', 'wp-parallax-content-slider' )."</li>";
    368             }
    369             if ( empty($_POST['prlx_slider_bgincrement']) )
     408                $error .= "<li>" . __( 'Incorrect slider theme', 'wp-parallax-content-slider' )."</li>";
     409            }
     410            if ( empty( $_POST['prlx_slider_bgincrement'] ) )
    370411            {
    371412                $validation = false;
    372                 $error .= "<li>".__( 'Incorrect background increment pixel size', 'wp-parallax-content-slider' )."</li>";
    373             }
    374             if ( empty($_POST['prlx_slider_interval']) )
     413                $error .= "<li>" . __( 'Incorrect background increment pixel size', 'wp-parallax-content-slider' )."</li>";
     414            }
     415            if ( empty( $_POST['prlx_slider_interval'] ) )
    375416            {
    376417                $validation = false;
    377                 $error .= "<li>".__( 'Incorrect time interval', 'wp-parallax-content-slider' )."</li>";
     418                $error .= "<li>" . __( 'Incorrect time interval', 'wp-parallax-content-slider' )."</li>";
    378419            }
    379420            // Static parameters
    380             if ( empty($_POST['prlx_slider_first_slide']) )
     421            if ( empty( $_POST['prlx_slider_first_slide'] ) )
    381422            {
    382423                $validation = false;
    383                 $error .= "<li>".__( 'Incorrect first slide number', 'wp-parallax-content-slider' )."</li>";
     424                $error .= "<li>" . __( 'Incorrect first slide number', 'wp-parallax-content-slider' )."</li>";
    384425            }
    385426            $error .= "</ul>";
    386427            // Dynamic parameters
    387             if ( empty($_POST['prlx_slider_nb_articles']) )
     428            if ( empty( $_POST['prlx_slider_nb_articles'] ) )
    388429            {
    389430                $validation = false;
    390                 $error .= "<li>".__( 'Incorrect maximum slide number', 'wp-parallax-content-slider' )."</li>";
    391             }
    392             if ( empty($_POST['prlx_title_max_chars']) )
     431                $error .= "<li>" . __( 'Incorrect maximum slide number', 'wp-parallax-content-slider' )."</li>";
     432            }
     433            if ( empty( $_POST['prlx_title_max_chars'] ) )
    393434            {
    394435                $validation = false;
    395                 $error .= "<li>".__( 'Incorrect maximum title length', 'wp-parallax-content-slider' )."</li>";
    396             }
    397             if ( empty($_POST['prlx_default_image']) )
     436                $error .= "<li>" . __( 'Incorrect maximum title length', 'wp-parallax-content-slider' )."</li>";
     437            }
     438            if ( empty( $_POST['prlx_default_image'] ) )
    398439            {
    399440                $validation = false;
    400                 $error .= "<li>".__( 'Incorrect default image', 'wp-parallax-content-slider' )."</li>";
     441                $error .= "<li>" . __( 'Incorrect default image', 'wp-parallax-content-slider' )."</li>";
    401442            }
    402443
     
    404445            {
    405446                // categories (multiple selection)
    406                 if ($_POST['prlx_slider_category_filter'] && !empty($_POST['prlx_slider_categories'])) {
     447                if ( $_POST['prlx_slider_category_filter'] && !empty( $_POST['prlx_slider_categories'] ) ) {
    407448                    $categories_selected_values = '';
    408                     foreach($_POST['prlx_slider_categories'] as $selected_categorie){
    409                         $categories_selected_values.=$selected_categorie.',';
     449                    foreach( $_POST['prlx_slider_categories'] as $selected_categorie ){
     450                        $categories_selected_values .= $selected_categorie.',';
    410451                    }
    411452                }
     
    427468                        'categories'            => $categories_selected_values,
    428469                        'text_content'          => $_POST['prlx_text_content'],
    429                         'content_type'          => $_POST['prlx_slider_content_type']
     470                        'content_type'          => $_POST['prlx_slider_content_type'],
    430471                );
    431472
    432473                // Update options in database
    433                 update_option( 'prlx_slider_settings', $prlx_slider_settings);
    434 
    435                 echo "<div class='updated fade'><p>" . __( 'Settings updated', 'wp-parallax-content-slider' ) ."</p></div>".$debug;
     474                update_option( 'prlx_slider_settings', $prlx_slider_settings );
     475
     476                echo "<div class='updated fade'><p>" . __( 'Settings updated', 'wp-parallax-content-slider' ) ."</p></div>" . $debug;
    436477            }
    437478            else
    438479            {
    439                 echo "<div class='error fade'><p>" . __( 'Settings update failed:', 'wp-parallax-content-slider' ) . $error . "</p></div>".$debug;
     480                echo "<div class='error fade'><p>" . __( 'Settings update failed:', 'wp-parallax-content-slider' ) . $error . "</p></div>" . $debug;
    440481            }
    441482        }
    442483
    443484        // Retrieve settings from database
    444         $prlx_slider_settings = get_option( 'prlx_slider_settings');
     485        $prlx_slider_settings = get_option( 'prlx_slider_settings' );
    445486
    446487        ?>
     
    471512    <h2><?php _e( 'WP Parallax Content Slider Settings', 'wp-parallax-content-slider' ); ?></h2>
    472513
    473     <div style="margin-top:1em; border: 1px solid #FFCC99; width: 96,5%; padding: 5px 15px; -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px;">
     514    <div style="margin-top:1em; border: 1px solid #FFCC99; width: 96.5%; padding: 5px 15px; -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px;">
    474515        <p><?php
    475516            _e( 'This plugin is continuing to evolve because of contributions from Wordpress users like you. Thank you. If you found this plugin useful, especially if you use it for commercial purposes, feel free to make a', 'wp-parallax-content-slider' );
Note: See TracChangeset for help on using the changeset viewer.