we are in the process of building custom widgets based on the documentation while creating widgets we can use HTML, CSS, jQuery. Additionally we can trigger PHP functions. Now in order to use create and integrate these PHP functions what is the mechanism.
My idea is since there is no direct provision to use REST APIs within the widgets. So we can create PHP functions and call rest apis and use these functions within the widgets. Just wanted to understand does it make sense.
Another option is jquery ajax call, however in this scenario, I want cutomize the endpoint through attributes and trigger the metadata.
Greetings,
we are in the process of building custom widgets based on the documentation while creating widgets we can use HTML, CSS, jQuery. Additionally we can trigger PHP functions. Now in order to use create and integrate these PHP functions what is the mechanism.
My idea is since there is no direct provision to use REST APIs within the widgets. So we can create PHP functions and call rest apis and use these functions within the widgets. Just wanted to understand does it make sense.
Another option is jquery ajax call, however in this scenario, I want cutomize the endpoint through attributes and trigger the metadata.
HI, we don't have such functionality, like ajax in the widgets, sorry. you can only integrate some php hooks there like do_action and apply_filter