MKP Contacts Reload

Contact data can be reloaded easily using the reload modifier as shown here:

mkp_contacts verbose reload list

Using the “verbose” modifier will cause the diagnostic data to be written to the log.
Note without specifying a collection type (region, area, community), the data will be reloaded, but no further action will be taken.

It is a good practice to clear the log file first. This code will do that for you:

mkp_base clear_diagnostics


If you want to see the results of any action, this simple code will show all diagnostics and clear the file:

mkp_base show_diagnostics clear_diagnostics


Diagnostic Logfile Contents

Logfile: /nas/content/live/mkpusaws/wp-content/MKP Plugins_29.log

10/27/20 05:32:17->MKP Plugins: Logfile [/nas/content/live/mkpusaws/wp-content/MKP Plugins_29.log] cleared
10/27/20 05:32:17->MKP Contacts: Processing MKP Contacts
Shortcode: reload,list
10/27/20 05:32:17->MKP Contacts: Getting name=[reload] code=[reload] value=[true]
10/27/20 05:32:17->MKP Contacts: Getting name=[list] code=[list] value=[true]
10/27/20 05:32:17->MKP Contacts:

10/27/20 05:32:17->MKP Contacts: Selecting Contacts without children where region=[] area=[] community=[]
10/27/20 05:32:17->MKP Contacts: Deleting transient files
10/27/20 05:32:18->MKP Contacts: Reloading Contacts
10/27/20 05:32:18->MKP Contacts: Found 22 Contacts
10/27/20 05:32:18->MKP Contacts: Region, Area and Community are all empty
10/27/20 05:32:18->MKP Plugins: Getting name=[show_diagnostics] code=[show_diagnostics] value=[true]
10/27/20 05:32:18->MKP Plugins: Getting name=[clear_diagnostics] code=[clear_diagnostics] value=[true]
10/27/20 05:32:18->MKP Plugins: Doing code=[show_diagnostics] name=[show_diagnostics] value=[true]