• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Yoast / wordpress-seo / ff7fbe548e11c03015095d039b28d1168b751857

16 Feb 2026 01:09AM UTC coverage: 52.986%. Remained the same
ff7fbe548e11c03015095d039b28d1168b751857

push

github

web-flow
Merge pull request #22987 from Yoast/JRF/modernize-use-trailing-commas-in-function-calls

Modernize: use trailing comma in multi-line function call

8482 of 15955 branches covered (53.16%)

Branch coverage included in aggregate %.

396 of 875 new or added lines in 311 files covered. (45.26%)

21 existing lines in 12 files now uncovered.

32462 of 61318 relevant lines covered (52.94%)

48791.32 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/admin/views/tabs/network/integrations.php
1
<?php
2
/**
3
 * WPSEO plugin file.
4
 *
5
 * @package WPSEO\Admin\Views
6
 *
7
 * @uses Yoast_Form $yform Form object.
8
 */
9

10
use Yoast\WP\SEO\Presenters\Admin\Badge_Presenter;
11
use Yoast\WP\SEO\Presenters\Admin\Premium_Badge_Presenter;
12

13
if ( ! defined( 'WPSEO_VERSION' ) ) {
×
14
        header( 'Status: 403 Forbidden' );
×
15
        header( 'HTTP/1.1 403 Forbidden' );
×
16
        exit();
×
17
}
18

19
$integration_toggles = Yoast_Integration_Toggles::instance()->get_all();
×
20

21
?>
22
        <h2><?php esc_html_e( 'Integrations', 'wordpress-seo' ); ?></h2>
×
23
        <div class="yoast-measure">
24
                <?php
25
                printf(
×
26
                /* translators: %1$s expands to Yoast SEO */
27
                        esc_html__( 'This tab allows you to selectively disable %1$s integrations with third-party products for all sites in the network. By default all integrations are enabled, which allows site admins to choose for themselves if they want to toggle an integration on or off for their site. When you disable an integration here, site admins will not be able to use that integration at all.', 'wordpress-seo' ),
×
NEW
28
                        'Yoast SEO',
×
29
                );
×
30

31
                foreach ( $integration_toggles as $integration ) {
×
32
                        $help_text = esc_html( $integration->label );
×
33

34
                        if ( ! empty( $integration->extra ) ) {
×
35
                                $help_text .= ' ' . $integration->extra;
×
36
                        }
37

38
                        if ( ! empty( $integration->read_more_label ) ) {
×
39
                                $help_text .= ' ';
×
40
                                $help_text .= sprintf(
×
41
                                        '<a href="%1$s" target="_blank" rel="noopener noreferrer">%2$s</a>',
×
42
                                        esc_url( WPSEO_Shortlinker::get( $integration->read_more_url ) ),
×
NEW
43
                                        esc_html( $integration->read_more_label ),
×
44
                                );
×
45
                        }
46

47
                        $feature_help = new WPSEO_Admin_Help_Panel(
×
48
                                WPSEO_Option::ALLOW_KEY_PREFIX . $integration->setting,
×
49
                                /* translators: Hidden accessibility text; %s expands to an integration's name. */
50
                                sprintf( esc_html__( 'Help on: %s', 'wordpress-seo' ), esc_html( $integration->name ) ),
×
NEW
51
                                $help_text,
×
52
                        );
×
53

54
                        $name = $integration->name;
×
55
                        if ( ! empty( $integration->premium ) && $integration->premium === true ) {
×
56
                                $name .= ' ' . new Premium_Badge_Presenter( $integration->name );
×
57
                        }
58

59
                        if ( ! empty( $integration->new ) && $integration->new === true ) {
×
60
                                $name .= ' ' . new Badge_Presenter( $integration->name );
×
61
                        }
62

63
                        $disabled            = $integration->disabled;
×
64
                        $show_premium_upsell = false;
×
65
                        $premium_upsell_url  = '';
×
66

67
                        if ( $integration->premium === true && YoastSEO()->helpers->product->is_premium() === false ) {
×
68
                                $disabled            = true;
×
69
                                $show_premium_upsell = true;
×
70
                                $premium_upsell_url  = WPSEO_Shortlinker::get( $integration->premium_upsell_url );
×
71
                        }
72

73
                        $preserve_disabled_value = false;
×
74
                        if ( $disabled ) {
×
75
                                $preserve_disabled_value = true;
×
76
                        }
77

78
                        $yform->toggle_switch(
×
79
                                WPSEO_Option::ALLOW_KEY_PREFIX . $integration->setting,
×
80
                                [
×
81
                                        'on'  => __( 'Allow Control', 'wordpress-seo' ),
×
82
                                        'off' => __( 'Disable', 'wordpress-seo' ),
×
83
                                ],
×
84
                                $name,
×
85
                                $feature_help->get_button_html() . $feature_help->get_panel_html(),
×
86
                                [
×
87
                                        'disabled'                => $disabled,
×
88
                                        'preserve_disabled_value' => $preserve_disabled_value,
×
89
                                        'show_premium_upsell'     => $show_premium_upsell,
×
90
                                        'premium_upsell_url'      => $premium_upsell_url,
×
NEW
91
                                ],
×
92
                        );
×
93

94
                        do_action( 'Yoast\WP\SEO\admin_network_integration_after', $integration );
×
95
                }
96
                ?>
97
        </div>
×
98
<?php
×
99
/*
100
 * Required to prevent our settings framework from saving the default because the field isn't
101
 * explicitly set when saving the Dashboard page.
102
 */
103
$yform->hidden( 'show_onboarding_notice', 'wpseo_show_onboarding_notice' );
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc