PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.3
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.3
28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 19.1 All 128 releases
wordpress-seo / src / integrations / third-party / bbpress.php

bbpress.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 28.3, at src/integrations/third-party/bbpress.php

63 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Yoast\WP\SEO\Integrations\Third_Party;
4
5 use Yoast\WP\SEO\Conditionals\Front_End_Conditional;
6 use Yoast\WP\SEO\Helpers\Options_Helper;
7 use Yoast\WP\SEO\Integrations\Integration_Interface;
8
9 /**
10 * BbPress integration.
11 */
12 class BbPress implements Integration_Interface {
13
14 /**
15 * The options helper.
16 *
17 * @var Options_Helper
18 */
19 private $options;
20
21 /**
22 * Returns the conditionals based in which this loadable should be active.
23 *
24 * @return array
25 */
26 public static function get_conditionals() {
27 return [ Front_End_Conditional::class ];
28 }
29
30 /**
31 * BbPress constructor.
32 *
33 * @codeCoverageIgnore It only sets dependencies.
34 *
35 * @param Options_Helper $options The options helper.
36 */
37 public function __construct( Options_Helper $options ) {
38 $this->options = $options;
39 }
40
41 /**
42 * Initializes the integration.
43 *
44 * This is the place to register hooks and filters.
45 *
46 * @return void
47 */
48 public function register_hooks() {
49 if ( $this->options->get( 'breadcrumbs-enable' ) !== true ) {
50 return;
51 }
52
53 /**
54 * If breadcrumbs are active (which they supposedly are if the users has enabled this settings,
55 * there's no reason to have bbPress breadcrumbs as well.
56 *
57 * {@internal The class itself is only loaded when the template tag is encountered
58 * via the template tag function in the wpseo-functions.php file.}}
59 */
60 \add_filter( 'bbp_get_breadcrumb', '__return_false' );
61 }
62 }
63