Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Yohan Park](https://uploads.teamtreehouse.com/production/profile-photos/9956602/micro_QxrEcQh.jpg)
Yohan Park
7,148 PointsWhy tie apply_filters to a value?
when using apply filter we echo out a value that is equal to apply filters. at 1:25
echo $value = apply_filters( …)
why do that instead of
echo apply_filters()
what's the importance?
Ryan Dainton
17,164 PointsRyan Dainton
17,164 PointsHi Yohan
My understanding is that you will not always want to echo out the results of your apply_filters() method, and so it's best to save it as a variable which can then be echo'd when required.
For example, looking at the 'wp_title' Hook, the filter is applied, but the result is only echoed to the screen if $display === true.