wpseek.com
A WordPress-centric search engine for devs and theme authors
_register_widget_update_callback › WordPress Function
Since2.8.0
Deprecatedn/a
› _register_widget_update_callback ( $id_base, $update_callback, $options = array(), $params )
Parameters: (4) |
|
Defined at: |
|
Codex: | |
Change Log: |
|
Registers the update callback for a widget.
Source
function _register_widget_update_callback( $id_base, $update_callback, $options = array(), ...$params ) { global $wp_registered_widget_updates; if ( isset( $wp_registered_widget_updates[ $id_base ] ) ) { if ( empty( $update_callback ) ) { unset( $wp_registered_widget_updates[ $id_base ] ); } return; } $widget = array( 'callback' => $update_callback, 'params' => $params, ); $widget = array_merge( $widget, $options ); $wp_registered_widget_updates[ $id_base ] = $widget; }