Support » Plugins » Hacks » sprintf directive with sidebar widgets [upgrade safe?]

  • Hello,

    In order to do some themeing i am doing for a new wordpress site i am building i had to add a line to widgets.php:

    $params[0]['after_widget'] = sprintf($params[0]['after_widget'], $id, $classname_);

    I added it right after the existing line:
    $params[0]['before_widget'] = sprintf($params[0]['before_widget'], $id, $classname_);

    It works great for what i want to do. Basicly it applies the same sprintf directive to the after_widget in functions.php, converting %1$s to the correct ID tag.

    My worry is that if my client ever hits the upgrade button in wordpress it will wipe out my modifaction to the widgets.php file.

    Is there any way to avoid this from happening? could i acomplish this same thing with a different method that doesn’t have to edit any of the core files?

  • The topic ‘sprintf directive with sidebar widgets [upgrade safe?]’ is closed to new replies.