display_name, $userdata['display_name'] ) || $old_user->display_name !== $userdata['display_name'] ) { self::flush_service_cache(); } } /** * Whether the current page is a Booktics page: a service page, or a post * holding any Booktics shortcode or block. * * @return bool */ public function is_booktics_page(): bool { if ( is_singular( 'booktics-service' ) ) { return true; } // On a blog list or archive get_post() is the first post in the loop, // not the page the visitor is on. if ( ! is_singular() ) { return false; } $post = get_post(); if ( ! $post instanceof \WP_Post ) { return false; } return 1 === preg_match( '/\[booktics_[a-z_]+|