PluginProbe
wpForo Forum / 3.1.6
wpForo Forum v3.1.6
3.1.6 3.1.5 3.1.4 3.1.2 3.1.1 3.1.0 3.0.9 3.0.8 3.0.7 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.2.0 1.3.0 1.3.1 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 All 138 releases
← All changes | classes/AIWordPressIndexer.php +9 -0 3.1.13.1.6 View file →
@@ -583,8 +583,12 @@
583 583 $query = new \WP_Query( $args );
584 584 $posts = [];
585 585
586 586 foreach ( $query->posts as $post ) {
587 + // Skip password-protected posts - their content should not be searchable
588 + if ( ! empty( $post->post_password ) ) {
589 + continue;
590 + }
587 591 $posts[] = $this->format_post_for_indexing( $post );
588 592 }
589 593
590 594 return [
@@ -953,8 +957,13 @@
953 957
954 958 foreach ( $post_ids as $post_id ) {
955 959 $post = get_post( $post_id );
956 960 if ( $post && $post->post_status === 'publish' ) {
961 + // Skip password-protected posts - their content should not be searchable
962 + if ( ! empty( $post->post_password ) ) {
963 + $skipped++;
964 + continue;
965 + }
957 966 // Skip posts with non-indexable content (shortcodes only, binary, too short)
958 967 if ( ! $this->is_content_indexable( $post ) ) {
959 968 $skipped++;
960 969 continue;