This commit is contained in:
Javier Casares 2026-11-04 14:37:18 +00:00
commit 7379505d20

View file

@ -182,9 +182,14 @@ class Frontend_Profile {
* @return void
*/
public function maybe_enqueue_assets(): void {
/**
* Current post. Typed for PHPStan level max.
*
* @var \WP_Post|string|null $post
*/
global $post;
if ( ! is_a( $post, 'WP_Post' ) || ! has_shortcode( $post->post_content, 'robotstxt_2fa_profile' ) ) {
if ( ! $post instanceof \WP_Post || ! has_shortcode( $post->post_content, 'robotstxt_2fa_profile' ) ) {
return;
}