bp_get_directory_title

Filters the directory title for a component.

Description

apply_filters( 'bp_get_directory_title', (string) $title, (string) $component ); 

Parameters (2)

0. $title (string)
Text to be used in tag.</dd><dt> <span class="index">1.</span> <span class="param"> $component </span> <span class="type">(string)</span></dt><dd> Current componet being displayed.</dd></dl> </section><hr /> <section id="usage"><h2>Usage</h2><dl><dt>To run the hook, copy the example below.</dt><dd><pre><ol><li><div><span class="param">$title</span> = apply_filters( <span class="tag">'bp_get_directory_title'</span>, <span class="param">$title</span>, <span class="param">$component</span> ); </div></li><li><div>  </div></li><li><div>if ( !empty( <span class="param">$title</span> ) ) { </div></li><li><div>  </div></li><li><div> <span class="comment">// everything has led up to this point...</span> </div></li><li><div>  </div></li><li><div>} </div></li><li><div>  </div></li></ol></pre></dd><dt>The following example is for adding a hook callback.</dt><dd><pre><ol><li><div><span class="comment">// define the bp_get_directory_title callback</span> </div></li><li><div>function <span class="func">filter_bp_get_directory_title</span>( <span class="param">$title</span>, <span class="param">$component</span> ) { </div></li><li><div> <span class="comment">// make filter magic happen here...</span> </div></li><li><div> return <span class="param">$title</span>; </div></li><li><div>}; </div></li><li><div>  </div></li><li><div><span class="comment">// add the filter</span> </div></li><li><div>add_filter( <span class="param">'bp_get_directory_title'</span>, <span class="func">'filter_bp_get_directory_title'</span>, <span class="priority">10</span>, <span class="params">2</span> ); </div></li></ol></pre></dd><dt>To remove a hook callback, use the example below.</dt><dd><pre><ol><li><div><span class="comment">// remove the filter</span> </div></li><li><div>remove_filter( <span class="param">'bp_get_directory_title'</span>, <span class="func">'filter_bp_get_directory_title'</span>, <span class="priority">10</span>, <span class="params">2</span> ); </div></li></ol></pre></dd></dl> </section><hr /> <section id="defined" class="source"><h2>Defined <span class="count">(1)</span></h2><p>The filter is defined in the following location(s).</p><dl><dt><strong><a href="http://hookr.io/plugins/buddypress/2.8.2/files/bp-core-bp-core-template/" class="file">/bp-core/bp-core-template.php <span> </span></a></strong></dt><dd><pre><ol data-line="157" class="liner" start="157"><li><div>return apply_filters( 'bp_get_directory_title', $title, $component ); </div></li></ol></pre></dd></dl> </section> </article></div><div id="sidebar"><ul class="widgets"><li> <a href="http://hookr.io/plugin/"><img src="http://hookr.io/wp-content/themes/hookr/assets/images/plugin-download.jpg" /></a></li><li id="versions"><dl><dt>Version(s)</dt><dd><dl><dt>Since</dt><dd> 2.0.0</dd><dt>Others</dt><dd><ul><li><a href="http://hookr.io/plugins/buddypress/2.8.2/filters/bp_get_directory_title/" class="active">2.8.2</a></li><li><a href="http://hookr.io/plugins/buddypress/2.8.1/filters/bp_get_directory_title/" class="">2.8.1</a></li><li><a href="http://hookr.io/plugins/buddypress/2.8.0/filters/bp_get_directory_title/" class="">2.8.0</a></li><li><a href="http://hookr.io/plugins/buddypress/2.7.5/filters/bp_get_directory_title/" class="">2.7.5</a></li><li><a href="http://hookr.io/plugins/buddypress/2.7.4/filters/bp_get_directory_title/" class="">2.7.4</a></li></ul></dd></dl></dd></dl></li><li id="tags"><dl><dt>Tags</dt><dd><ul><li><span></span>plugin</li><li><span></span>filter</li><li><span></span>apply_filters</li><li><span></span>hook</li><li><span></span>BuddyPress</li><li><span></span>2.8.2</li></ul></dd></dl></li></ul></div></div></div><script>Hookr.View.init();Hookr.Single.init();</script><footer><div><ul id="nav-social" class="pivot" role="navigation"><li id="twitter"><a href="http://twitter.com/hookr_io" title="Follow me!"></a></li></ul><div> © 2018 hookr.io <strong>(beta)</strong> | <a href="http://hookr.io/privacy/" title="Privacy">Privacy</a> | Proudly Powered by WordPress</div></div> </footer><script type="text/javascript" src="http://hookr.io/wp-content/cache/minify/000000/M9EvL9BNzU1KTdHLzcwDAA.js"></script><script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create','UA-49583310-1','hookr.io');ga('send','pageview');</script></body></html>