Skip to content

Commit

Permalink
Add helpful text explaining the different intricate parts of a WP query.
Browse files Browse the repository at this point in the history
The goal is to introduce users to some of the more obscure concepts
that come with WordPress, making the Query block a paving stone
for more advanced usage of the software.
  • Loading branch information
mtias authored and ntsekouras committed Jun 16, 2021
1 parent 3966b00 commit 23dd6df
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ export default function QueryInspectorControls( {
<InspectorControls>
<PanelBody title={ __( 'Settings' ) }>
<ToggleControl
label={ __( 'Inherit query from URL' ) }
label={ __( 'Inherit query from template' ) }
help={ __(
'Disable the option to customize the query arguments. Leave enabled to inherit the global query depending on the URL.'
'Toggle to use the global query context that is set with the current template, such as an archive or search. Disable to customize the settings independently.'
) }
checked={ !! inherit }
onChange={ ( value ) => setQuery( { inherit: !! value } ) }
Expand All @@ -191,6 +191,9 @@ export default function QueryInspectorControls( {
value={ postType }
label={ __( 'Post Type' ) }
onChange={ onPostTypeChange }
help={ __(
'WordPress contains different types of content and they are divided into collections called "Post Types". By default there are a few different ones such as blog posts and pages, but plugins could add more.'
) }
/>
) }
{ displayLayout?.type === 'flex' && (
Expand Down Expand Up @@ -230,6 +233,9 @@ export default function QueryInspectorControls( {
options={ stickyOptions }
value={ sticky }
onChange={ ( value ) => setQuery( { sticky: value } ) }
help={ __(
'Blog posts can be "stickied", a feature that places them at the top of the front page of posts, keeping it there until new sticky posts are published.'
) }
/>
) }
</PanelBody>
Expand Down

0 comments on commit 23dd6df

Please sign in to comment.