PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.5
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.5
28.5 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 All 129 releases
← All changes | src/presenters/admin/light-switch-presenter.php +5 -5 18.028.5 View file →
@@ -76,9 +76,9 @@
76 76
77 77 /**
78 78 * Light_Switch_Presenter constructor.
79 79 *
80 - * @param string $var The variable to create the checkbox for.
80 + * @param string $variable The variable to create the checkbox for.
81 81 * @param string $label The visual label text for the toggle.
82 82 * @param array $buttons Array of two visual labels for the buttons (defaults Disabled/Enabled).
83 83 * @param string $name The name of the underlying checkbox.
84 84 * @param string|bool $value The variable current value, to determine the checked attribute.
@@ -88,9 +88,9 @@
88 88 * Starting from Yoast SEO 16.5, the visual label is forced to bold via CSS.
89 89 * @param string $disabled_attribute Optional. The disabled HTML attribute. Default is empty.
90 90 */
91 91 public function __construct(
92 - $var,
92 + $variable,
93 93 $label,
94 94 $buttons,
95 95 $name,
96 96 $value,
@@ -98,9 +98,9 @@
98 98 $help = '',
99 99 $strong = false,
100 100 $disabled_attribute = ''
101 101 ) {
102 - $this->var = $var;
102 + $this->var = $variable;
103 103 $this->label = $label;
104 104 $this->buttons = $buttons;
105 105 $this->name = $name;
106 106 $this->value = $value;
@@ -136,9 +136,9 @@
136 136 '<span class="switch-light-visual-label%1$s" id="%2$s">%3$s</span>%4$s',
137 137 $strong_class, // phpcs:ignore WordPress.Security.EscapeOutput -- Reason: $strong_class output is hardcoded.
138 138 \esc_attr( $this->var . '-label' ),
139 139 \esc_html( $this->label ),
140 - $this->help // phpcs:ignore WordPress.Security.EscapeOutput -- Reason: The help contains HTML.
140 + $this->help, // phpcs:ignore WordPress.Security.EscapeOutput -- Reason: The help contains HTML.
141 141 );
142 142 $output .= '<label class="' . $class . '"><b class="switch-yoast-seo-jaws-a11y">&nbsp;</b>';
143 143 $output .= \sprintf(
144 144 '<input type="checkbox" aria-labelledby="%1$s" id="%2$s" name="%3$s" value="on"%4$s%5$s/>',
@@ -145,9 +145,9 @@
145 145 \esc_attr( $this->var . '-label' ),
146 146 \esc_attr( $this->var ),
147 147 \esc_attr( $this->name ),
148 148 \checked( $this->value, 'on', false ), // phpcs:ignore WordPress.Security.EscapeOutput -- Reason: The output is hardcoded by WordPress.
149 - $this->disabled_attribute // phpcs:ignore WordPress.Security.EscapeOutput -- Reason: $disabled_attribute output is hardcoded.
149 + $this->disabled_attribute, // phpcs:ignore WordPress.Security.EscapeOutput -- Reason: $disabled_attribute output is hardcoded.
150 150 );
151 151 $output .= '<span aria-hidden="true">';
152 152 $output .= '<span>' . \esc_html( $off_button ) . '</span>';
153 153 $output .= '<span>' . \esc_html( $on_button ) . '</span>';