Skip to content

Commit 1a9d3d6

Browse files
committed
TMS-980: Add redipress_include_search to components
1 parent f2bd8a2 commit 1a9d3d6

File tree

5 files changed

+30
-20
lines changed

5 files changed

+30
-20
lines changed

CHANGELOG.MD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
- TMS-980: Add redipress_include_search to include component contents in search results
11+
1012
## [1.8.8] - 2023-12-04
1113

1214
- TMS-939:

lib/ACF/Fields/CallToActionFields.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ protected function sub_fields() : array {
8282
$key = $this->get_key();
8383

8484
$rows_field = ( new Field\Repeater( $strings['rows']['label'] ) )
85-
->set_key( "${key}_rows" )
85+
->set_key( "{$key}_rows" )
8686
->set_name( 'rows' )
8787
->set_min( 1 )
8888
->set_max( 6 )
@@ -91,33 +91,35 @@ protected function sub_fields() : array {
9191
->set_instructions( $strings['rows']['instructions'] );
9292

9393
$image_field = ( new Field\Image( $strings['image']['label'] ) )
94-
->set_key( "${key}_numbers" )
94+
->set_key( "{$key}_numbers" )
9595
->set_name( 'image' )
9696
->set_wrapper_width( 50 )
9797
->set_instructions( $strings['image']['instructions'] );
9898

9999
$title_field = ( new Field\Text( $strings['title']['label'] ) )
100-
->set_key( "${key}_title" )
100+
->set_key( "{$key}_title" )
101101
->set_name( 'title' )
102102
->set_wrapper_width( 50 )
103+
->redipress_include_search()
103104
->set_instructions( $strings['title']['instructions'] );
104105

105106
$description_field = ( new Field\Textarea( $strings['description']['label'] ) )
106-
->set_key( "${key}_description" )
107+
->set_key( "{$key}_description" )
107108
->set_name( 'description' )
108109
->set_rows( 4 )
109110
->set_new_lines( 'wpautop' )
110111
->set_wrapper_width( 50 )
112+
->redipress_include_search()
111113
->set_instructions( $strings['description']['instructions'] );
112114

113115
$link_field = ( new Field\Link( $strings['link']['label'] ) )
114-
->set_key( "${key}_link" )
116+
->set_key( "{$key}_link" )
115117
->set_name( 'link' )
116118
->set_wrapper_width( 50 )
117119
->set_instructions( $strings['link']['instructions'] );
118120

119121
$layout_field = ( new Field\Radio( $strings['layout']['label'] ) )
120-
->set_key( "${key}_layout" )
122+
->set_key( "{$key}_layout" )
121123
->set_name( 'layout' )
122124
->set_choices( [
123125
'is-image-first' => 'Kuva ensin',
@@ -127,7 +129,7 @@ protected function sub_fields() : array {
127129
->set_instructions( $strings['layout']['instructions'] );
128130

129131
$display_artist_field = ( new Field\TrueFalse( $strings['display_artist']['label'] ) )
130-
->set_key( "${key}_display_artist" )
132+
->set_key( "{$key}_display_artist" )
131133
->set_name( 'display_artist' )
132134
->set_wrapper_width( 50 )
133135
->use_ui()
@@ -136,7 +138,7 @@ protected function sub_fields() : array {
136138
->set_instructions( $strings['display_artist']['instructions'] );
137139

138140
$background_color_field = ( new Field\Select( $strings['background_color']['label'] ) )
139-
->set_key( "${key}_background_color" )
141+
->set_key( "{$key}_background_color" )
140142
->set_name( 'background_color' )
141143
->set_choices( [
142144
'primary-light' => 'Vaalea',

lib/ACF/Fields/ContentColumnsFields.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ protected function sub_fields() : array {
7878
$key = $this->get_key();
7979

8080
$rows_field = ( new Field\Repeater( $strings['rows']['label'] ) )
81-
->set_key( "${key}_rows" )
81+
->set_key( "{$key}_rows" )
8282
->set_name( 'rows' )
8383
->set_min( 1 )
8484
->set_max( 6 )
@@ -87,27 +87,29 @@ protected function sub_fields() : array {
8787
->set_instructions( $strings['rows']['instructions'] );
8888

8989
$title_field = ( new Field\Text( $strings['title']['label'] ) )
90-
->set_key( "${key}_title" )
90+
->set_key( "{$key}_title" )
9191
->set_name( 'title' )
9292
->set_wrapper_width( 100 )
93+
->redipress_include_search()
9394
->set_instructions( $strings['title']['instructions'] );
9495

9596
$image_field = ( new Field\Image( $strings['image']['label'] ) )
96-
->set_key( "${key}_image" )
97+
->set_key( "{$key}_image" )
9798
->set_name( 'image' )
9899
->set_wrapper_width( 45 )
99100
->set_instructions( $strings['image']['instructions'] );
100101

101102
$description_field = ( new Field\Textarea( $strings['description']['label'] ) )
102-
->set_key( "${key}_description" )
103+
->set_key( "{$key}_description" )
103104
->set_name( 'description' )
104105
->set_rows( 4 )
105106
->set_new_lines( 'wpautop' )
106107
->set_wrapper_width( 55 )
108+
->redipress_include_search()
107109
->set_instructions( $strings['description']['instructions'] );
108110

109111
$layout_field = ( new Field\Radio( $strings['layout']['label'] ) )
110-
->set_key( "${key}_layout" )
112+
->set_key( "{$key}_layout" )
111113
->set_name( 'layout' )
112114
->set_choices( [
113115
'is-image-first' => 'Kuva ensin',
@@ -117,7 +119,7 @@ protected function sub_fields() : array {
117119
->set_instructions( $strings['layout']['instructions'] );
118120

119121
$aspect_ratio_field = ( new Field\Radio( $strings['aspect_ratio']['label'] ) )
120-
->set_key( "${key}_aspect_ratio" )
122+
->set_key( "{$key}_aspect_ratio" )
121123
->set_name( 'aspect_ratio' )
122124
->set_choices( [
123125
'50-50' => '50/50',
@@ -128,7 +130,7 @@ protected function sub_fields() : array {
128130
->set_instructions( $strings['aspect_ratio']['instructions'] );
129131

130132
$display_artist_field = ( new Field\TrueFalse( $strings['display_artist']['label'] ) )
131-
->set_key( "${key}_display_artist" )
133+
->set_key( "{$key}_display_artist" )
132134
->set_name( 'display_artist' )
133135
->set_wrapper_width( 33 )
134136
->use_ui()

lib/ACF/Fields/GridFields.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ protected function grid_item_type_custom_fields() : Field\Group {
186186
->set_key( $this->get_key() . '_title' )
187187
->set_name( 'title' )
188188
->set_wrapper_width( 50 )
189+
->redipress_include_search()
189190
->set_instructions( $this->strings['title']['instructions'] );
190191

191192
$link_field = ( new Field\Link( $this->strings['link']['label'] ) )
@@ -199,6 +200,7 @@ protected function grid_item_type_custom_fields() : Field\Group {
199200
->set_name( 'description' )
200201
->set_maxlength( 200 )
201202
->set_wrapper_width( 50 )
203+
->redipress_include_search()
202204
->set_instructions( $this->strings['description']['instructions'] );
203205

204206
$image_field = ( new Field\Image( $this->strings['image']['label'] ) )

lib/ACF/Fields/TextBlockFields.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,26 +68,28 @@ protected function sub_fields() : array {
6868
$key = $this->get_key();
6969

7070
$title_field = ( new Field\Text( $strings['title']['label'] ) )
71-
->set_key( "${key}_title" )
71+
->set_key( "{$key}_title" )
7272
->set_name( 'title' )
7373
->set_wrapper_width( 50 )
74+
->redipress_include_search()
7475
->set_instructions( $strings['title']['instructions'] );
7576

7677
$link_field = ( new Field\Link( $strings['link']['label'] ) )
77-
->set_key( "${key}_link" )
78+
->set_key( "{$key}_link" )
7879
->set_name( 'link' )
7980
->set_wrapper_width( 50 )
8081
->set_instructions( $strings['link']['instructions'] );
8182

8283
$text_field = ( new TextEditor( $strings['text']['label'] ) )
83-
->set_key( "${key}_text" )
84+
->set_key( "{$key}_text" )
8485
->set_name( 'text' )
8586
->set_required()
8687
->set_height( 300 )
88+
->redipress_include_search()
8789
->set_instructions( $strings['text']['instructions'] );
8890

8991
$background_color_field = ( new Field\Radio( $strings['background_color']['label'] ) )
90-
->set_key( "${key}_background_color" )
92+
->set_key( "{$key}_background_color" )
9193
->set_name( 'background_color' )
9294
->set_wrapper_width( 50 )
9395
->set_layout( 'horizontal' )
@@ -99,7 +101,7 @@ protected function sub_fields() : array {
99101
->set_instructions( $strings['background_color']['instructions'] );
100102

101103
$width_field = ( new Field\Radio( $strings['width']['label'] ) )
102-
->set_key( "${key}_width" )
104+
->set_key( "{$key}_width" )
103105
->set_name( 'width' )
104106
->set_wrapper_width( 50 )
105107
->set_layout( 'horizontal' )

0 commit comments

Comments
 (0)