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/loader.php +9 -0 27.628.5 View file →
@@ -162,12 +162,21 @@
162 162
163 163 /**
164 164 * Loads all registered commands.
165 165 *
166 + * Commands that opt in to conditional loading by implementing
167 + * Loadable_Interface are skipped when their conditionals are not met.
168 + *
166 169 * @return void
167 170 */
168 171 protected function load_commands() {
169 172 foreach ( $this->commands as $class ) {
173 + if ( \is_subclass_of( $class, Loadable_Interface::class )
174 + && ! $this->conditionals_are_met( $class )
175 + ) {
176 + continue;
177 + }
178 +
170 179 $command = $this->get_class( $class );
171 180
172 181 if ( $command === null ) {
173 182 continue;