MKP Base Argument Tester

Shortcode arguments can take multiple forms:

  • As a single value
  • As code=value
  • As a list of code-value pairs ‘option=verbose,log_file+’my.log’

Single Value

Single values like “verbose” have an implied value of “true”; so ‘verbose’ is treated as ‘verbose=true’. All action codes are expressed as a single value (e.g. list or class=”mkp_u”>clear_diagnostics).


When a code requires a value like the message code, it must be expressed as message=”some message”

List of Code/Value pairs

There is one particularly complex code that processes multiple sets of code=value pairs in a single code. That is the option shortcode. Here is an example of it:

mkp_base option=show_all_igroups+false,function+’my_handler’ set_option show_options

Same as:
mkp_base option=show_all_igroups+false set_option
mkp_base option=function+’my_handler’ set_option show_options

In this example, we set the ‘show_all_igroups’ option to false and the handler function value to ‘my_handler’.


Diagnostic file /nas/content/live/mkpusaws/wp-content/MKP Plugins_29.log not found
Diagnostic file /nas/content/live/mkpusaws/wp-content/MKP Plugins_29.log not found
MKP Base Options:

  • enabled = true
  • verbose = false
  • do_backtrace = 0
  • logfile = MKP Plugins.log
  • handler = handler
    • class = MKP_Base
    • method = file_logger
  • show_all_igroups = false
  • show_loggedin_igroups = false
  • source = MKP Plugins:
  • autoload = autoload
    • communities = false
    • contacts = false
    • igroups = false
    • mapper = false
  • table_name_prefix = mkpusa_
  • options_name_prefix = mkpusa_29_
  • google_api_key_name = mkp_google_api_key
  • google_api_key_value = AIzaSyBMOdb-1zpWcCjLIjMo_CC2gdfvl7wyw1Q_w
  • loaded =
  • retain_notifications = false
  • notifications_demo = false
  • option = verbose

MKP Plugins: Options reset to their defualt values

MKP Plugins: Setting Option option = [verbose]