_key = $key; add_shortcode($key, array($this, "process_shortcode")); add_action('app-shortcodes-shortcode_help', array($this, "add_shortcode_help")); add_filter('app-shortcodes-shortcode_help-string', array($this, 'get_shortcode_help')); } public function get_shortcode_help ($all='') { $help = ''; $usage = $this->get_usage_info(); $arguments = $this->_defaults_to_help(); if (empty($usage) && empty($arguments)) return $all; $args_help = ''; if (!empty($arguments)) { $args_help .= '
' . $key . '%s', 'appointments'), $this->_key) .
'[' . $this->_key . ']' .
'' . join(', ', $help['allowed_values']) . '';
}
if (!empty($help['example'])) {
$ret[] = __('Example:', 'appointments') . ' [' . $this->_key . ' ... ' . $arg . '="' . $help['example'] . '"]';
}
return join('