Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/therobiulislam12/r-simple-slider-wp
https://github.com/therobiulislam12/r-simple-slider-wp
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/therobiulislam12/r-simple-slider-wp
- Owner: therobiulislam12
- Created: 2024-08-11T18:49:23.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-12T19:51:10.000Z (5 months ago)
- Last Synced: 2024-08-12T22:46:23.282Z (5 months ago)
- Language: PHP
- Size: 1.49 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple Slider Plugin with Setting Options
## Facing Problem
1. Seeding data when activation
2. Save data in options## Solve problem
1. I learned more about how to seed data without creating a table.
2. Learned localize data for display in our JavaScript file.
3. first time learned wp_localize_script hookI learned more things while doing this project. I didn't know how to pass data to a JavaScript file for setting up a slider. Also, I wasn't sure which was the best option for saving settings data. I experimented with two methods: one was creating a table and storing data, and the other was using the **update_option()** method. For this project, the update option method worked best for me, so I used it.
The second problem I faced was trying to pass data to my JavaScript file, but I couldn't do it initially. Then I learned more about the **wp_localize_script()** method, which turned out to be very useful for me.
Now my project is done, but I learned even more things along the way.
## Next Plan
1. Improve feature - 2 feature added 1. Meta field and 2. thumbnail show
2. Make it with full OOP - without composer work
3. More readable - create some comment for read