Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/colorful-tones/acf-like-button
ACF Block with the Interactivity API
https://github.com/colorful-tones/acf-like-button
acf acf-block acf-field acf-pro block-theme interactivity-api wordpress wordpress-plugin wordpress-site wordpress-theme
Last synced: about 1 month ago
JSON representation
ACF Block with the Interactivity API
- Host: GitHub
- URL: https://github.com/colorful-tones/acf-like-button
- Owner: colorful-tones
- Created: 2024-05-16T03:01:52.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-06-07T21:21:23.000Z (5 months ago)
- Last Synced: 2024-09-26T14:40:53.754Z (about 2 months ago)
- Topics: acf, acf-block, acf-field, acf-pro, block-theme, interactivity-api, wordpress, wordpress-plugin, wordpress-site, wordpress-theme
- Language: PHP
- Homepage: https://acflikebutton.wpenginepowered.com
- Size: 14.6 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ACF Like Button
Final demo site [ACFLikeButton.WPEnginePowered.com](https://acflikebutton.wpenginepowered.com)
This repo contains the source code for a WordPress plugin, which does several things:
1. Registers two post types: movie, song
2. Register ACF Relationship field type and associates it with each user.
3. Includes some CSS and a few other things to allow for [a custom login/register screen](https://acflikebutton.wpenginepowered.com).
4. Registers two custom blocks: Like Button and Like Count. These blocks integrate the [Interactivity API](https://developer.wordpress.org/block-editor/reference-guides/interactivity-api/). When a user clicks the Like Button then it alters the state of the Like Count. Each like is associated with meta information with the user. A user can visit their profile to see a list of all their liked items and edit them as well.📹 Check out [the playback recording from the ACF Chat Friday on YouTube](https://youtu.be/otFjPLOWWsc) to see the foundation for how this was built. 📹
## Installation & Setup
### Requirements
A WordPress site with:
- [ACF PRO](https://www.advancedcustomfields.com/pro/) plugin installed and activated.
- Current repo's [ACF Like plugin](https://github.com/colorful-tones/acf-like-button/tree/main/plugins/acf-likes), which relies on the ACF PRO plugin being active.
- Current repo's [Interact theme](https://github.com/colorful-tones/acf-like-button/tree/main/themes/interact) installed and activated.## Changelog
### June 7, 2024
- Add `aria-pressed` to notify screen readers of current Like button state.