So I have a plugin that creates some images like a gallery. I add it to the page with shortcode:
I would like to create an option so that the gallery can be previewed in the wordpress admin area. I have managed to make it work like so:
1.
Normally I add my gallery scripts and styles to the frontend with
Now I need to add them to the backend as well if I want to view the gallery, so I need to run
(This is where scripts and styles for plugin admin are already added, and I need to add my frontend script and styles in here as well)
2.
I run ajax when I want to preview the gallery and in there I call the same function shortcode would call:
(My foo_add_gallery function creates some html and javascript and adds this to the page)
Then I add this response to the page in admin area in a div.
- Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
- Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
- Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.
Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com