register_sidebar_widget [ WordPress Function ]
| Parameters: |
|
| See: | |
| Defined at: |
|
Register widget for sidebar with backwards compatibility.
Allows $name to be an array that accepts either three elements to grab the first element and the third for the name or just uses the first element of the array for the name.
Passes to {@link wp_register_sidebar_widget()} after argument list and backwards compatibility is complete.
Source
<?php
function register_sidebar_widget($name, $output_callback, $classname = '') {
_deprecated_function( __FUNCTION__, '2.8', 'wp_register_sidebar_widget()' );
// Compat
if ( is_array($name) ) {
if ( count($name) == 3 )
$name = sprintf($name[0], $name[2]);
else
$name = $name[0];
}
$id = sanitize_title($name);
$options = array();
if ( !empty($classname) && is_string($classname) )
$options['classname'] = $classname;
$params = array_slice(func_get_args(), 2);
$args = array($id, $name, $output_callback, $options);
if ( !empty($params) )
$args = array_merge($args, $params);
call_user_func_array('wp_register_sidebar_widget', $args);
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/register sidebar widget « WordPress Codex
This function has been deprecated. That means it has been replaced by a new function or is no longer supported, and may be removed from future versions.
codex.wordpress.org - WordPress › Support » Replacing register_sidebar_widget with ...
Replacing register_sidebar_widget with wp_register_sidebar_widget() (3 posts). shalzers ... Notice: register_sidebar_widget is deprecated since version 2.8!
wordpress.org - Product Theme: register_sidebar_widget is deprecated since version ...
Installed Product Theme on testing server using debugging mode. Running WordPress 3.0.1 Multisite with no plugins or widgets yet activated.
premium.wpmudev.org - *deprecated* register_sidebar_widget | NewStatPress
The deprecated function used for register the widget may produce some errors depending by the used theme in WordPress: *Notice*: load_plugin_textdomain ...
newstatpress.altervista.org
Gebruikersdiscussies [ wordpress.org ]
- Gurpreet.singh697 on "register_sidebar_widget can i use this function in loop"
- Gurpreet.singh697 on "register_sidebar_widget can i use this function in loop"
- Gurpreet.singh697 on "register_sidebar_widget can i use this function in loop"
- Gurpreet.singh697 on "register_sidebar_widget can i use this function in loop"
- M on "Usage of deprecated functions in functions.php"
- esmi on "Usage of deprecated functions in functions.php"
- M on "Usage of deprecated functions in functions.php"
- shalzers on "Replacing register_sidebar_widget with wp_register_sidebar_widget()"
- Otto on "Replacing register_sidebar_widget with wp_register_sidebar_widget()"
- shalzers on "Replacing register_sidebar_widget with wp_register_sidebar_widget()"