WordPress.org

Ready to get started?Download WordPress

Forums

sprintf directive with sidebar widgets [upgrade safe?] (1 post)

  1. deweydb
    Member
    Posted 3 years ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.