wp_render_widget_control() – Calls the control callback of a widget and returns the output.

You appear to be a bot. Output may be restricted

Description

Calls the control callback of a widget and returns the output.

Usage

$string|null = wp_render_widget_control( $id );

Parameters

$id
( string ) required – Widget ID.

Returns

string|null

Source

File name: wordpress/wp-includes/widgets.php
Lines:

1 to 18 of 18
function wp_render_widget_control( $id ) {
  global $wp_registered_widget_controls;

  if ( ! isset( $wp_registered_widget_controls[ $id ]['callback'] ) ) {
    return null;
  }

  $callback = $wp_registered_widget_controls[ $id ]['callback'];
  $params   = $wp_registered_widget_controls[ $id ]['params'];

  ob_start();

  if ( is_callable( $callback ) ) {
    call_user_func_array( $callback, $params );
  }

  return ob_get_clean();
}
 

 View on GitHub View on Trac