kgps
(Mohammad)
December 6, 2023, 9:48am
1
Hi,
I came across this post but a solution wasn’t provided.
Hi there,
I already know the hooks to make custom tokens, but as I want to customize reports with arbitrary data from my child sites, I have the exact same question as planetahuevo here: https://gist.github.com/bogdan-mainwp/95d9b2019c2c3292268097d1f5190f25
Is it possible to get dynamic values for the tokens from the child sites installing another script on the child site that get the info from the database?
I have some data on the child database from a third party plugin, I just need to be …
I’m trying to extract information from my child sites so I can add it via a token in the reports. The data in this case, is the date of the last backup. I use Duplicator on all my sites so it would be handy to add this info in the reports.
Thanks
bojan
(Bojan Katusic)
December 6, 2023, 5:57pm
2
Hi @kgps
You can find detailed information in this reply:
I’d be happy to explain one part of the necessary steps. Unfortunately, the other part is entirely dependent on the information you wish to include in the report, and in this case, it’s somewhat complicated.
This part would need to be inserted into the functions.php file of your child theme, or even better by using our Custom Dashboard extension.
add_filter( 'mainwp_pro_reports_custom_tokens', 'mycustom_mainwp_pro_reports_custom_tokens', 10, 3 );
function mycustom_mainwp_pro_reports_custo…
It was for inserting custom data from iThemes Security, but the logic is identical to your request.
Essentially, one part is easy and entails adding a filter to the Dashboard, but the other part requires coding knowledge on your part.
kgps
(Mohammad)
December 7, 2023, 6:58am
3
Thanks @bojan ,
I think that will help tremendously!
system
(system)
Closed
December 8, 2023, 6:59am
4
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.