Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I got this in my theme:

register_sidebar_widget(array('Sidebar Login', 'widgets'), 'widget_sidebarLogin');

i want to change this to the updated Command aka

wp_register_sidebar_widget

But i seem to miss something cuz the widget doesent load after the change..

I tried this:

wp_register_sidebar_widget(
'SidebarLoginId',        // your unique widget id
'Sidebar Login',          // widget name
'widget_sidebarLogin',  // callback function
array(                  // options
    'description' => 'Some description'
)

What am i missing? is that "widgets" in the original 'register_sidebar_widget' array has a meaning othere then description ?

share|improve this question
    
You're Missing This Function "widget_sidebarLogin" –  Mohit Bumb Oct 8 '11 at 10:18

1 Answer 1

up vote 0 down vote accepted
function widget_sidebarLogin() {
    echo "Content of Your Widget";
}

wp_register_sidebar_widget(
    'sidebarLoginId',        // your unique widget id
    'SidebarLogin',          // widget name
    'widget_sidebarLogin',  // callback function
    array(                  // options
        'description' => 'Some Descriptions'
    )
);
share|improve this answer
    
10x man but ofcourse i got the functions... just didnt think i need to paste it here.. its rather long.. Thanks anyhow.. its wirking now so i guess i had a typo or some unexplained something (like its somethimes happens).. –  Sagive SEO Oct 8 '11 at 17:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.