Hi, @bogdan thanks for the last feedback. Now I have stucked with another issue. All child sites have a function where calculates the folder custom size and saved to the child site database. Now I want to call this function from the main WP dashboard. I can create a rest API and if you guide me how can I call this function. So I can add a custom button on the size listing page or else.
Thanks, @bogdan for your help. But still, I am unable to integrate this feature. Can you give me an example, please?
I need to call a custom function get_database_size();
class FLBuilderCCDiskSpaceReport{
public static function get_database_size() {}
}
So I want to curl call this function. I have used the Postman tool.
So can I do this?
Like the site is :https://www.mistystoyaussies.com/
UserName : Subhankar
Signature is : [confused which can I use here? When I get the $website variable then I can see there are stored 3 different keys , 1. pubkey ; 2. privkey 3. nosslkey] Which can I use in the curl call?
How can I define this type of function in the child site? Can you please give me an example?
Thanks for this feedback. But as we discussed I have already this code. But my requirement is now different. I need to call a child site custom function from the main WP dashboard with the custom trigger.
Give you an example:
I have a custom page in the main WP dashboard. I have added a button on this page name “Sync+Update”. Now I want to trigger a hook by clicking this button and call a child site function.
In the child site function, there was added a code where calculate the custom size value with shell scripting. So when I want to recalculate this value I will click the button “Sync+Update”. And this time my child site function will save the value. and this value passes to the main WP which I have done already.
So please check my requirement once. I need a small difference requirement rather than the above feedback.
yes @bogdan I understand this code so when we sync all sites from the main WP dashboard, call the child function get_database_size(). Is it possible to sync all child site from our custom button?