Skip to content

Commit

Permalink
Update READMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
arnowelzel committed Mar 9, 2024
1 parent 38887c4 commit 6a42010
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 22 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ If you want to change any of the scripts or styles you need to update the minifi
The plugin comes with a minifier script using PHP. To run that script use the following command:

```
php build.php
make build
```

You should then see an output like this:
Expand Down
28 changes: 7 additions & 21 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@ Integration of PhotoSwipe (http://photoswipe.com) for WordPress.

== Description ==

This plugin integrates an extended version of PhotoSwipe 4 or the official release of PhotoSwipe 5 to WordPress.
All linked images in a post or page will be displayed using PhotoSwipe, regardless if they are part of a gallery or
single images. Just make sure that you link the image or gallery directly to the media and not the attachment page
(in galleries the option `link=file` should be set).
This plugin integrates PhotoSwipe to WordPress. All linked images in a post or page will be displayed using PhotoSwipe,
regardless if they are part of a gallery or single images. Just make sure that you link the image or gallery directly
to the media and not the attachment page (in galleries the option `link=file` should be set).

More about the original version of PhotoSwipe see here: [http://photoswipe.com](http://photoswipe.com)

The version of PhotoSwipe 4 provided with this plugin comes with a number of modifications and extensions. See the
FAQ for details.
You can also display EXIF data from JPEG and WEBP images.

As of version 4.0.0 this plugin requires at least WordPress 5.3 and PHP 7.0. Older PHP version will cause problems.
In this case you have to upgrade your PHP version or ask your hoster to do so. Please note that WordPress itself also
Expand All @@ -47,15 +45,13 @@ If you want to display an image in it's own lightbox which does not display othe
you can add the attribute `data-lbwps-gid` to the link element with a unique value for this image. This value must
not be a number since numbers are already used internally. For example you could the file name of the image like this:


`<a href="myimage.jpg" data-lbwps-gid="myimage.jpg"><img src="myimage-300x300.jpg" alt="My Image" /></a>`

You can also add the same `data-lbwps-gid` attribute to multiple single images to combine them in the same lightbox.

Note: the parameter was renamed from `data-gallery-id` to `data-lbwps-gid` in version 2.97 to avoid conflicts with
existing themes or plugins!


Starting with release 3.1.14 this is also supported for Elementor image widgets and Elementor image carousel widgets.

= How to disable the plugin in certain pages/posts =
Expand Down Expand Up @@ -116,13 +112,12 @@ add_filter('lbwps_caption_title', 'my_lbwps_caption_title', 10, 2);
PhotoSwipe 5 improves the overall performance and compatibility with newer mobile devices like the iPhone 13. However,
some features are no longer supported by that version:


1) Updating the browser history when opening the lightbox or navigating through images (this is no longer supported by
PhotoSwipe).

2) Customizing the display of image counter and zoom button (this may be added in future updates).

3) All desktop and mobile specific options (some options may return in future updates).
3) All mobile specific options (some options may return in future updates).

4) Sharing options (some options may return in future updates).

Expand All @@ -148,15 +143,6 @@ Lightbox with PhotoSwipe works fine with Gutenberg gallery blocks as well. Howev
should disable the Advanced Gutenberg lightbox in the settings. Disable the option "Open galleries in lightbox" in the
backend configuration of PublishPress Blocks.

= How to use the PhotoSwipe API? =

Note: this only applies for PhotoSwipe 4! Starting with PhotoSwipe 5 there is no API hook yet!

The PhotoSwipe instance for the gallery is available as `window.lbwpsPhotoSwipe` after the gallery was initialized.
Please note, that this variable is `null` if the lightbox is not open! This can be used to build your own extensions
using the PhotoSwipe API. Also see
[https://photoswipe.com/documentation/api.html](https://photoswipe.com/documentation/api.html) how to use the API.

= How to change the order of the images in the lightbox? =

If you want to display the images not in the order in which they are in the source code you can use the attribute
Expand All @@ -182,8 +168,8 @@ To avoid any confusion: this plugin was published with the agreement of Dmytro S

= Notes for developers =

If you change any of the stylesheets or frontend scripts in `src/js` or `src/lib` you need to execute `build.php` once
to generate new frontend assets.
If you change any of the stylesheets or frontend scripts in `src/js` or `src/lib` you need to run `make build`
to generate new compressed frontend assets.

== Screenshots ==

Expand Down

0 comments on commit 6a42010

Please sign in to comment.