BP_Forums_Component::setup_title()

Sets up the title for pages and </p> </section> <section class="description"> <h2 id="ref-description" class="ref-context">Description<span id="ref-description-link" class="ref-context-link"></span></h2> </section> <section class="source-content"> <h3 id="ref-source" class="ref-context">Source<span id="ref-source-link" class="ref-context-link"></span></h3> <p> File: <a href="https://www.buddyboss.com/resources/reference/files/bp-forums/classes/class-bp-forums-component.php/">bp-forums/classes/class-bp-forums-component.php</a> </p> <div class="source-code-container"> <pre class="brush: php; toolbar: false; first-line: 323"> public function setup_title() { $bp = buddypress(); // Adjust title based on view if ( bp_is_forums_component() ) { if ( bp_is_my_profile() ) { $bp->bp_options_title = __( 'Forums', 'buddyboss' ); } elseif ( bp_is_user() ) { $bp->bp_options_avatar = bp_core_fetch_avatar( array( 'item_id' => bp_displayed_user_id(), 'type' => 'thumb' ) ); $bp->bp_options_title = bp_get_displayed_user_fullname(); } } parent::setup_title(); } </pre> </div> <p class="source-code-links"> <span> <a href="#" class="show-complete-source">Expand full source code</a> <a href="#" class="less-complete-source">Collapse full source code</a> </span> </p> </section> <section class="changelog"> <h3 id="ref-changelog" class="ref-context">Changelog<span id="ref-changelog-link" class="ref-context-link"></span></h3> <table> <caption class="screen-reader-text">Changelog</caption> <thead> <tr> <th class="changelog-version">Version</th> <th class="changelog-desc">Description</th> </tr> </thead> <tbody> <tr> <td><a href="https://www.buddyboss.com/resources/reference/since/bbpress.r3552/" alt="WordPress bbPress (r3552)">bbPress (r3552)</a></td> <td>Introduced.</td> </tr> </tbody> </table> </section> <section class="related"> <h2 id="ref-related" class="ref-context">Related<span id="ref-related-link" class="ref-context-link"></span></h2> <article class="uses"> <h3>Uses</h3> <table id="uses-table"> <caption class="screen-reader-text">Uses</caption> <thead> <tr> <th>Uses</th> <th class="related-desc">Description</th> </tr> </thead> <tbody> <tr> <td> <span>bp-loader.php:</span> <a href="https://www.buddyboss.com/resources/reference/functions/buddypress/">buddypress()</a> </td> <td class="related-desc"> <p>The main function responsible for returning the one true BuddyBoss Instance to functions everywhere.</p> </td> </tr> <tr> <td> <span>bp-members/bp-members-template.php:</span> <a href="https://www.buddyboss.com/resources/reference/functions/bp_get_displayed_user_fullname/">bp_get_displayed_user_fullname()</a> </td> <td class="related-desc"> <p>Get the displayed user’s display name.</p> </td> </tr> <tr> <td> <span>bp-core/bp-core-template.php:</span> <a href="https://www.buddyboss.com/resources/reference/functions/bp_is_user/">bp_is_user()</a> </td> <td class="related-desc"> <p>Is the current page a user page?</p> </td> </tr> <tr> <td> <span>bp-core/bp-core-template.php:</span> <a href="https://www.buddyboss.com/resources/reference/functions/bp_is_my_profile/">bp_is_my_profile()</a> </td> <td class="related-desc"> <p>Is the current page part of the profile of the logged-in user?</p> </td> </tr> <tr> <td> <span>bp-core/bp-core-template.php:</span> <a href="https://www.buddyboss.com/resources/reference/functions/bp_is_forums_component/">bp_is_forums_component()</a> </td> <td class="related-desc"> <p>Check whether the current page is part of the Forums component.</p> </td> </tr> <tr> <td> <span>bp-core/bp-core-template.php:</span> <a href="https://www.buddyboss.com/resources/reference/functions/bp_displayed_user_id/">bp_displayed_user_id()</a> </td> <td class="related-desc"> <p>Get the ID of the currently displayed user.</p> </td> </tr> <tr> <td> <span>bp-core/classes/class-bp-component.php:</span> <a href="https://www.buddyboss.com/resources/reference/classes/bp_component/setup_title/">BP_Component::setup_title()</a> </td> <td class="related-desc"> <p>Set up the component title.</p> </td> </tr> <tr> <td> <span>bp-core/bp-core-avatars.php:</span> <a href="https://www.buddyboss.com/resources/reference/functions/bp_core_fetch_avatar/">bp_core_fetch_avatar()</a> </td> <td class="related-desc"> <p>Get an avatar for a BuddyPress object.</p> </td> </tr> <tbody> </table> <a href="#" class="show-more">Show 3 more uses</a> <a href="#" class="hide-more">Hide more uses</a> </article> </section> <section class="ref-feedback-wrap"> <h3>Questions?</h3> <p>We're always happy to help with code or other questions you might have! Search our <a href="https://www.buddyboss.com/resources/reference/">developer docs</a>, <a href="https://www.buddyboss.com/my-account/?tab=helpscouttickets">contact support</a>, or connect with our <a href="https://www.buddyboss.com/buddypress-developers/">sales team</a>. </p> </section> </div> </div> </div> </div> </article> </main><!-- #main --> </div><!-- #primary --> </div><!-- #primary --> </div><!-- .bb-grid --> </div><!-- .container --> </div><!-- #content --> <footer class="footer-bottom bb-footer style-1"> <div class="container flex"> <div class="footer-bottom-left"> <div class="copyright">© 2024 • BuddyBoss</div> </div><div class="footer-bottom-right push-right"></div> </div> </footer> </div><!-- #page --> <!-- HFCM by 99 Robots - Snippet # 1: Facebook Pixel Code - 617688858328656 verified --> <!-- Facebook Pixel Code --> <script> !function(f,b,e,v,n,t,s) {if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)}; if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t,s)}(window, document,'script', 'https://connect.facebook.net/en_US/fbevents.js'); fbq('init', '617688858328656'); fbq('track', 'PageView'); </script> <noscript><img height="1" width="1" style="display:none"src="https://www.facebook.com/tr?id=617688858328656&ev=PageView&noscript=1"/></noscript> <!-- End Facebook Pixel Code --> <!-- /end HFCM by 99 Robots --> <!-- HFCM by 99 Robots - Snippet # 3: Google Tag Manager MKT - Body - 2 March 2020 --> <!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NB2BV5J" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) --> <!-- /end HFCM by 99 Robots --> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/plugins/buddyboss-docs/assets/js/anchor.min.js?ver=1.4.8" id="bbdocs-anchorjs-js"></script> <script type="text/javascript" id="bbdocs-scripts-js-extra"> /* <![CDATA[ */ var bbDocs_Vars = {"ajaxurl":"https:\/\/www.buddyboss.com\/resources\/wp-admin\/admin-ajax.php","nonce":"e11d0939d4","style":"https:\/\/www.buddyboss.com\/resources\/wp-content\/plugins\/buddyboss-docs\/assets\/css\/print.css","powered":"\u00a9 BuddyBoss Resources, 2024. Powered by bbDocs<br>https:\/\/www.buddyboss.com\/resources"}; /* ]]> */ </script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/plugins/buddyboss-docs/assets/js/frontend.min.js?ver=1.4.8" id="bbdocs-scripts-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-includes/js/dist/vendor/moment.min.js?ver=2.29.4" id="moment-js"></script> <script type="text/javascript" id="moment-js-after"> /* <![CDATA[ */ moment.updateLocale( 'en_US', {"months":["January","February","March","April","May","June","July","August","September","October","November","December"],"monthsShort":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"weekdaysShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"week":{"dow":1},"longDateFormat":{"LT":"g:i a","LTS":null,"L":null,"LL":"F j, Y","LLL":"F j, Y g:i a","LLLL":null}} ); moment.updateLocale( 'en_US', {"relativeTime":{"future":"in %s","past":"%s ago","s":"second","ss":"%d seconds","m":"a minute","mm":"%d minutes","h":"an hour","hh":"%d hours","d":"a day","dd":"%d days","w":"a week","ww":"%d weeks","M":"a month","MM":"%d months","y":"a year","yy":"%d years"}} ); /* ]]> */ </script> <script type="text/javascript" id="bp-livestamp-js-extra"> /* <![CDATA[ */ var bb_livestamp = {"year_in_seconds":"31536000","day_in_seconds":"86400","week_in_seconds":"604800","hour_in_seconds":"3600","minute_in_seconds":"60","chunks":[31536000,5256000,2592000,604800,86400,3600,60,1],"unknown_text":"sometime","right_now_text":"Just now","ago_text":"%s ago","second_text":"a second","seconds_text":"seconds","minute_text":"a minute","minutes_text":"minutes","hour_text":"an hour","hours_text":"hours","day_text":"a day","days_text":"days","week_text":"a week","weeks_text":"weeks","month_text":"a month","months_text":"months","year_text":"a year","years_text":"years"}; /* ]]> */ </script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/plugins/buddyboss-platform/bp-core/js/livestamp.min.js?ver=2.7.10" id="bp-livestamp-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-includes/js/underscore.min.js?ver=1.13.4" id="underscore-js"></script> <script type="text/javascript" id="wp-util-js-extra"> /* <![CDATA[ */ var _wpUtilSettings = {"ajax":{"url":"\/resources\/wp-admin\/admin-ajax.php"}}; /* ]]> */ </script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-includes/js/wp-util.min.js?ver=6.6.2" id="wp-util-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-includes/js/dist/hooks.min.js?ver=2810c76e705dd1a53b18" id="wp-hooks-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-includes/js/dist/i18n.min.js?ver=5e580eb46a90c2b997e6" id="wp-i18n-js"></script> <script type="text/javascript" id="wp-i18n-js-after"> /* <![CDATA[ */ wp.i18n.setLocaleData( { 'text direction\u0004ltr': [ 'ltr' ] } ); /* ]]> */ </script> <script type="text/javascript" id="bp-nouveau-js-extra"> /* <![CDATA[ */ var BP_Nouveau = {"ajaxurl":"https:\/\/www.buddyboss.com\/resources\/wp-admin\/admin-ajax.php","only_admin_notice":"As you are the only organizer of this group, you cannot leave it. You can either delete the group or promote another member to be an organizer first and then leave the group.","is_friend_confirm":"Are you sure you want to remove your connection with this member?","confirm":"Are you sure?","confirm_delete_set":"Are you sure you want to delete this set? This cannot be undone.","show_x_comments":"View more comments","unsaved_changes":"Your profile has unsaved changes. If you leave the page, the changes will be lost.","object_nav_parent":"#buddypress","anchorPlaceholderText":"Paste or type a link","empty_field":"New Field","close":"Close","parent_group_leave_confirm":"By leaving this main group you will automatically be removed and unsubscribed to any subgroups relating to this group.","group_leave_confirm":"<p>Are you sure you want to leave <span class=\"bb-group-name\"><\/span>?<\/p>","wpTime":"2024-11-14 22:44:42","wpTimezone":"America\/Los_Angeles","objects":{"1":"members","4":"xprofile","12":"search"},"nonces":{"members":"018437d9ed","xprofile":"f5d86967cc","search":"e1e409846a"},"is_send_ajax_request":"1"}; var BB_Nouveau_Presence = {"heartbeat_enabled":"1","presence_interval":"60","presence_default_interval":"60","presence_time_span":"20","idle_inactive_span":"180","rest_nonce":"ea29331cfd","native_presence":"1","native_presence_url":"https:\/\/www.buddyboss.com\/resources\/wp-content\/plugins\/buddyboss-platform\/bp-core\/bb-core-native-presence.php","presence_rest_url":"https:\/\/www.buddyboss.com\/resources\/wp-json\/buddyboss\/v1\/members\/presence"}; /* ]]> */ </script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/plugins/buddyboss-platform/bp-templates/bp-nouveau/js/buddypress-nouveau.min.js?ver=2.7.10" id="bp-nouveau-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/plugins/buddyboss-platform/bp-templates/bp-nouveau/js/jquery.guillotine.min.js?ver=2.7.10" id="guillotine-js-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-includes/js/comment-reply.min.js?ver=6.6.2" id="comment-reply-js" async="async" data-wp-strategy="async"></script> <script type="text/javascript" id="heartbeat-js-extra"> /* <![CDATA[ */ var heartbeatSettings = {"ajaxurl":"\/resources\/wp-admin\/admin-ajax.php"}; /* ]]> */ </script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-includes/js/heartbeat.min.js?ver=6.6.2" id="heartbeat-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-includes/js/jquery/ui/core.min.js?ver=1.13.3" id="jquery-ui-core-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-includes/js/jquery/ui/menu.min.js?ver=1.13.3" id="jquery-ui-menu-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-includes/js/dist/dom-ready.min.js?ver=f77871ff7694fffea381" id="wp-dom-ready-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-includes/js/dist/a11y.min.js?ver=d90eebea464f6c09bfd5" id="wp-a11y-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-includes/js/jquery/ui/autocomplete.min.js?ver=1.13.3" id="jquery-ui-autocomplete-js"></script> <script type="text/javascript" id="bp-nouveau-search-js-extra"> /* <![CDATA[ */ var BP_SEARCH = {"nonce":"8add6bb278","action":"bp_search_ajax","debug":"1","ajaxurl":"https:\/\/www.buddyboss.com\/resources\/wp-admin\/admin-ajax.php","loading_msg":"Loading suggestions...","enable_ajax_search":"1","per_page":"5","autocomplete_selector":".header-search-wrap .search-form","form_selector":".widget_search .search-form","forums_autocomplete":""}; /* ]]> */ </script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/plugins/buddyboss-platform/bp-templates/bp-nouveau/js/buddypress-search.min.js?ver=2.7.10" id="bp-nouveau-search-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme-resources/js/navigation.js?ver=20220422" id="wporg-developer-navigation-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme-resources/js/skip-link-focus-fix.js?ver=20130115" id="wporg-developer-skip-link-focus-fix-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme-resources/js/search.js?ver=20220422" id="wporg-developer-search-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme-resources/js/menu.js?ver=20220422" id="wporg-developer-menu-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme-resources/js/awesomplete.min.js?ver=20160322" id="awesomplete-js"></script> <script type="text/javascript" id="autocomplete-js-extra"> /* <![CDATA[ */ var autocomplete = {"ajaxurl":"https:\/\/www.buddyboss.com\/resources\/wp-admin\/admin-ajax.php","nonce":"42a46e87ce"}; /* ]]> */ </script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme-resources/js/autocomplete.js?ver=20160524" id="autocomplete-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme-resources/js/function-reference.js?ver=20180724" id="wporg-developer-function-reference-js"></script> <script type="text/javascript" id="quicktags-js-extra"> /* <![CDATA[ */ var quicktagsL10n = {"closeAllOpenTags":"Close all open tags","closeTags":"close tags","enterURL":"Enter the URL","enterImageURL":"Enter the URL of the image","enterImageDescription":"Enter a description of the image","textdirection":"text direction","toggleTextdirection":"Toggle Editor Text Direction","dfw":"Distraction-free writing mode","strong":"Bold","strongClose":"Close bold tag","em":"Italic","emClose":"Close italic tag","link":"Insert link","blockquote":"Blockquote","blockquoteClose":"Close blockquote tag","del":"Deleted text (strikethrough)","delClose":"Close deleted text tag","ins":"Inserted text","insClose":"Close inserted text tag","image":"Insert image","ul":"Bulleted list","ulClose":"Close bulleted list tag","ol":"Numbered list","olClose":"Close numbered list tag","li":"List item","liClose":"Close list item tag","code":"Code","codeClose":"Close code tag","more":"Insert Read More tag"}; /* ]]> */ </script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-includes/js/quicktags.min.js?ver=6.6.2" id="quicktags-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme-resources/js/user-notes.js?ver=20181019" id="wporg-developer-user-notes-js"></script> <script type="text/javascript" id="wporg-developer-user-notes-feedback-js-extra"> /* <![CDATA[ */ var wporg_note_feedback = {"show":"Show Feedback","hide":"Hide Feedback"}; /* ]]> */ </script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme-resources/js/user-notes-feedback.js?ver=20181023" id="wporg-developer-user-notes-feedback-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme-resources/js/tabs.js?ver=20160824" id="wporg-developer-tabs-js"></script> <script type="text/javascript" id="font-cheatsheet-js-extra"> /* <![CDATA[ */ var font_cheatsheet = {"icon_pack_type":"bb-2"}; /* ]]> */ </script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme-resources/js/font-cheatsheet.js?ver=20160824" id="font-cheatsheet-js"></script> <script type="text/javascript" id="wporg-developer-preview-js-extra"> /* <![CDATA[ */ var wporg_note_preview = {"ajaxurl":"https:\/\/www.buddyboss.com\/resources\/wp-admin\/admin-ajax.php","nonce":"0c4bab9681","preview":"preview note","preview_empty":"Nothing to preview","is_admin":""}; /* ]]> */ </script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme-resources/js/user-notes-preview.js?ver=20181019" id="wporg-developer-preview-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-includes/js/imagesloaded.min.js?ver=5.0.0" id="imagesloaded-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-includes/js/masonry.min.js?ver=4.2.2" id="masonry-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme/assets/js/vendors/menu.js?ver=2.7.00" id="boss-menu-js-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme/assets/js/vendors/fitvids.js?ver=2.7.00" id="boss-fitvids-js-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme/assets/js/vendors/slick.min.js?ver=2.7.00" id="boss-slick-js-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme/assets/js/vendors/panelslider.min.js?ver=2.7.00" id="boss-panelslider-js-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme/assets/js/vendors/sticky-kit.js?ver=2.7.00" id="boss-sticky-js-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme/assets/js/vendors/jssocials.min.js?ver=2.7.00" id="boss-jssocials-js-js"></script> <script type="text/javascript" id="buddyboss-theme-main-js-js-extra"> /* <![CDATA[ */ var bs_data = {"jm_ajax":"https:\/\/www.buddyboss.com\/resources\/jm-ajax\/","ajaxurl":"https:\/\/www.buddyboss.com\/resources\/wp-admin\/admin-ajax.php","show_notifications":"1","show_messages":"1","facebook_label":"Share on Facebook","twitter_label":"Post","more_menu_title":"Menu Items","translation":{"comment_posted":"Your comment has been posted.","comment_btn_loading":"Please Wait...","choose_a_file_label":"Choose a file","email_validation":"Please enter a valid email address."},"gamipress_badge_label":"Badge","nonce_list_grid":"7f6b29216f"}; /* ]]> */ </script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme/assets/js/main.js?ver=2.7.00" id="buddyboss-theme-main-js-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme/assets/js/vendors/validate.min.js?ver=2.7.00" id="boss-validate-js-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/plugins/buddyboss-platform/bp-core/js/vendor/magnific-popup.js?ver=2.7.10" id="bp-nouveau-magnific-popup-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme/assets/js/vendors/select2.full.min.js?ver=2.7.00" id="select2-js-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme/assets/js/vendors/progressbar.min.js?ver=2.7.00" id="progressbar-js-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme/assets/js/vendors/mousewheel.min.js?ver=2.7.00" id="mousewheel-js-js"></script> <script type="text/javascript" src="https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme-resources/assets/js/scripts.min.js?ver=6.6.2" id="resources-scripts-js-js"></script> </body> </html>