=== AddonLogic PhotoGrid WP ===
Contributors: snehalpancholi
Tags: photo gallery, gallery, lightbox, masonry, custom post type
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Lightweight, self-hosted photo gallery with a custom CPT, albums taxonomy, AJAX load more, built-in lightbox, and masonry layout. Zero external dependencies.

== Description ==

PhotoGrid WP stores every photo as a custom post type (`photogrid_photo`) attached to album taxonomy terms. Galleries are rendered via a single shortcode and survive theme switches because content lives in the database — not in post content.

**Key features:**

* Custom post type with album taxonomy
* Drag-and-drop display order (menu_order)
* `[photo_gallery]` shortcode with eight attributes
* AJAX Load More — no page reloads
* Built-in lightbox with swipe gesture and keyboard navigation
* Masonry layout via CSS Grid (no JavaScript library)
* Four hover effects: zoom, dark overlay, slide-up caption, none
* Responsive: graceful column reduction on small screens
* Admin list table with photo thumbnail column
* Settings page with shortcode reference
* No jQuery, no third-party libraries

== Installation ==

1. Upload the `photo-grid-wp` folder to `/wp-content/plugins/`.
2. Activate **AddonLogic PhotoGrid WP** in the Plugins screen.
3. Go to **PhotoGrid → Albums** and create your first album.
4. Go to **PhotoGrid → Add Photo**, set the Featured Image as the photo, add a title, and assign an album.
5. Embed a gallery with `[photo_gallery]` on any page or post.

== Shortcode Usage ==

`[photo_gallery]`

Full attribute list:

| Attribute | Values | Default | Description |
|-----------|--------|---------|-------------|
| album | album-slug | (all) | Filter by album |
| columns | 2–6 | 3 | Number of columns |
| count | number | 12 | Photos per load |
| orderby | date / title / menu_order / rand | menu_order | Sort order |
| size | thumbnail / medium / large / full | large | Image size |
| lightbox | true / false | true | Enable lightbox |
| masonry | true / false | false | Masonry layout |
| hover | none / zoom / overlay / slide | zoom | Hover effect |

Examples:

`[photo_gallery album="nature" columns="4" count="8" lightbox="true"]`

`[photo_gallery masonry="true" hover="slide" orderby="date"]`

`[photo_gallery album="portraits" columns="2" lightbox="false"]`

== Frequently Asked Questions ==

= Will my galleries break if I change themes? =
No. Photos are stored as a custom post type in the WordPress database. Theme changes do not affect your gallery data.

= Does the lightbox use jQuery? =
No. The lightbox and all other JavaScript is vanilla ES6 — no jQuery, no external libraries.

= How do I control the order of photos? =
Edit any photo and set a number in the **Display Order** metabox. Lower numbers appear first when using `orderby="menu_order"`.

= Can I show photos from multiple albums? =
Yes, leave the `album` attribute empty to show photos from all albums, or embed multiple shortcodes with different album slugs.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.

== Screenshots ==

1. Admin list table with photo thumbnail column and album filter.
2. Settings page with shortcode reference table.
3. Gallery shortcode output — uniform grid with zoom hover effect.
4. Masonry layout with slide-up caption hover.
5. Built-in lightbox with navigation arrows and swipe support.
