=== AddonLogic User Favorites Bookmarks ===
Contributors: snehalpancholi
Tags: favorites, bookmarks, wishlist, save posts, user bookmarks
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

Let logged-in users bookmark any post type with a heart button and view all saved items on a dedicated favorites page.

== Description ==

**AddonLogic User Favorites Bookmarks** gives every logged-in visitor a personal reading list. A sleek heart-shaped button auto-appends to any post type of your choice. One click saves the post; another removes it — all without a page reload. Guests see a polite login prompt (or the button can be hidden entirely).

**Key Features**

* Heart bookmark button auto-appended to single posts, pages, or custom post types.
* AJAX toggle — saves or removes without reloading the page.
* `[ufb_favorites]` shortcode renders a paginated list of the user's saved items with thumbnail, excerpt, and a remove button.
* `[ufb_button]` shortcode places the button anywhere manually.
* Guest behavior is configurable: show a login prompt or hide the button entirely.
* All labels are editable in the settings panel.
* Stores data in user meta — no custom tables.
* Lightweight, no jQuery.
* Dark mode and mobile-friendly styles included.

== Installation ==

1. Upload the `user-favorites-bookmarks` folder to `/wp-content/plugins/`.
2. Activate the plugin from **Plugins > Installed Plugins**.
3. Go to **Settings > User Favorites** to configure.
4. Create a page and add the `[ufb_favorites]` shortcode to it.

== Shortcodes ==

= [ufb_favorites] =

Displays the current user's saved bookmarks.

Attributes:
* `posts_per_page` — Items per page. Default: `10`.
* `orderby` — `date` | `title` | `menu_order`. Default: `date`.
* `show_thumbnail` — `true` | `false`. Default: `true`.
* `show_excerpt` — `true` | `false`. Default: `true`.
* `show_remove` — `true` | `false`. Default: `true`.

= [ufb_button] =

Renders the bookmark heart button.

Attributes:
* `post_id` — Optional. Defaults to the current post in the loop.

== Frequently Asked Questions ==

= Does it work with custom post types? =
Yes. In Settings > User Favorites you can enable the button for any registered public post type.

= Where is the favorites data stored? =
In the `addlc_ufb_favorites` user meta key. No custom database tables are created.

= What happens to user data on uninstall? =
Plugin settings and transients are removed. User favorites lists are preserved so the data is not lost if the plugin is reinstalled.

= Can I style the button? =
Yes. All styles use CSS custom properties (variables) prefixed with `--ufb-`. Override them in your theme.

== Screenshots ==

1. Heart bookmark button appended to a single post.
2. Favorites page rendered by `[ufb_favorites]` shortcode.
3. Admin Settings > User Favorites page.
4. Responsive favorites list on mobile.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
First public release.
