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

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

01/27/20 16:41:54->MKP Contacts: Selecting Contacts without children where region=[] area=[] community=[]
01/27/20 16:41:54->MKP Contacts: Deleting transient files
01/27/20 16:41:54->MKP Contacts: Reloading Contacts
01/27/20 16:41:55->MKP Contacts: Found 333 Contacts
01/27/20 16:41:55->MKP Contacts: Region, Area and Community are all empty
01/27/20 16:41:55->MKP Plugins: Getting name=[show_diagnostics] code=[show_diagnostics] value=[true]
01/27/20 16:41:55->MKP Plugins: Getting name=[clear_diagnostics] code=[clear_diagnostics] value=[true]
01/27/20 16:41:55->MKP Plugins: Doing code=[show_diagnostics] name=[show_diagnostics] value=[true]