You are here

function panels_plugin_get_function in Panels 5.2

Same name and namespace in other branches
  1. 6.3 includes/ \panels_plugin_get_function()
  2. 6.2 includes/ \panels_plugin_get_function()
  3. 7.3 includes/ \panels_plugin_get_function()

Get a function from a plugin, if it exists.


$plugin: The type of plugin

$which: Either the loaded plugin object (or the same data in array form) or a string with the name of the desired the specific plugin.

$function_name: The identifier of the function. For example, 'settings form'.

Return value

The actual name of the function to call, or NULL if the function does not exist.

21 calls to panels_plugin_get_function()
panels_ajax_cache_settings in includes/
Handle the cache settings form
panels_argument_choose_display in includes/
Pick which display an argument wants to use
panels_argument_get_context in includes/
Get a context from an argument
panels_clear_cached_content in includes/
Clear all cached content for a display.
panels_content_config_form_submit in includes/
FAPI submit handler for panels_content_config_form().

... See full list


includes/, line 1293


function panels_plugin_get_function($plugin, $which, $function_name) {
  if (is_object($which) || is_array($which)) {
    $plugin_data = $which;
  else {
    $hook = "panels_{$plugin}";
    $plugin_data = panels_get_plugins($plugin, $hook, $which);
  if (isset($plugin_data[$function_name]) && function_exists($plugin_data[$function_name])) {
    return $plugin_data[$function_name];