Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the library API #5

Open
zulfgani opened this issue Mar 11, 2020 · 2 comments
Open

Change the library API #5

zulfgani opened this issue Mar 11, 2020 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@zulfgani
Copy link
Collaborator

We will urgently need to establish our own templates library in order not to appear to abuse the original plugin's server.

This is not an easy task to pull of but we can use a temporary GitHub based source while we set up a more robust own cloud based API/server for the purpose.

Looking for anyone with the know how on how to pull of a custom remote API server for help and guidance. The GitHub source repo is the easy part and a mock repo is available for testing purposes - it's the own cloud server/API that this issue seeks to address!

@zulfgani zulfgani added enhancement New feature or request help wanted Extra attention is needed labels Mar 11, 2020
@bahiirwa
Copy link

May be a do_action() for classic-elementor can be added in this space to allow for the developers to allow for new url to be provided. It is a much cleaner direction I think.

Follow up on https://forums.classicpress.net/t/fork-of-elementor-rebranding/2193/15

@zulfgani
Copy link
Collaborator Author

As I understand it (not tested) addons already have the ability to extend Elementor\TemplateLibrary\Source_Base class to add in their own templates.

What we need to be doing is serving the builder's own default templates from our own API - see dummy API as an exampled.

I've kinda of replicated the above with the built REST API as below
API: https://library.classicelements.page/wp-json/wp/v2/info/69/
Templates: https://library.classicelements.page/wp-json/wp/v2/library/%d/

Example template endpoint:
https://library.classicelements.page/wp-json/wp/v2/library/201/

The only issue is both the info endpoint and the served template endpoint are done manually i.e. I'd first have to created a template using Classic Elements' CPT then export that template as a JSON file. This is then copied into another JSON CPT and saved as raw json code. Same is true for the info endpoint which is updated manually with the new template's details.

I'm just wondering if both can be done automatically or manual is the only way?

@zulfgani zulfgani pinned this issue Mar 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants