Skip to content

Commit 044a2e1

Browse files
Follow the WordPress documentation standards in functions.php docblocks (#161)
Adds a blank line after `@since` in every function docblock, describes the two `@return array` values, and uses a third-person verb in the `ipsum_styles()` summary. Only comments change. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: mukeshpanchal27 <mukesh27@git.wordpress.org>
1 parent fd9610b commit 044a2e1

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

‎functions.php‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* Adds style.css and editor-style.css as editor stylesheets.
1515
*
1616
* @since Ipsum 1.0
17+
*
1718
* @return void
1819
*/
1920
function ipsum_editor_style() {
@@ -29,6 +30,7 @@ function ipsum_editor_style() {
2930
* call merges with them.
3031
*
3132
* @since Ipsum 1.0
33+
*
3234
* @return void
3335
*/
3436
function ipsum_theme_support() {
@@ -39,9 +41,10 @@ function ipsum_theme_support() {
3941

4042
if ( ! function_exists( 'ipsum_styles' ) ) :
4143
/**
42-
* Enqueue styles.
44+
* Enqueues styles.
4345
*
4446
* @since Ipsum 1.0
47+
*
4548
* @return void
4649
*/
4750
function ipsum_styles() {
@@ -64,6 +67,7 @@ function ipsum_styles() {
6467
* Returns the comments call to action for the current post.
6568
*
6669
* @since Ipsum 1.0
70+
*
6771
* @param array $source_args Block binding source arguments.
6872
* @param WP_Block $block_instance The block instance.
6973
* @return string The call to action text.
@@ -86,6 +90,7 @@ function ipsum_comments_cta_binding( $source_args, $block_instance ) {
8690
* Registers the comments call-to-action block binding source.
8791
*
8892
* @since Ipsum 1.0
93+
*
8994
* @return void
9095
*/
9196
function ipsum_register_block_bindings() {
@@ -107,8 +112,9 @@ function ipsum_register_block_bindings() {
107112
* listed with proper titles and descriptions in the Site Editor.
108113
*
109114
* @since Ipsum 1.0
115+
*
110116
* @param array $default_template_types The default template types.
111-
* @return array
117+
* @return array The template types, with the sidebar variants added.
112118
*/
113119
function ipsum_sidebar_template_types( $default_template_types ) {
114120
$default_template_types['index-sidebar'] = array(
@@ -129,6 +135,7 @@ function ipsum_sidebar_template_types( $default_template_types ) {
129135
* Registers the pattern categories the theme's patterns use beyond core's.
130136
*
131137
* @since Ipsum 1.0
138+
*
132139
* @return void
133140
*/
134141
function ipsum_pattern_categories() {
@@ -154,8 +161,9 @@ function ipsum_pattern_categories() {
154161
* the patterns set the name.
155162
*
156163
* @since Ipsum 1.0
164+
*
157165
* @param array $metadata Metadata for the block type being registered.
158-
* @return array
166+
* @return array The block metadata, with ARIA label support on the Search block.
159167
*/
160168
function ipsum_search_aria_label_support( $metadata ) {
161169
if ( isset( $metadata['name'] ) && 'core/search' === $metadata['name'] ) {
@@ -174,6 +182,7 @@ function ipsum_search_aria_label_support( $metadata ) {
174182
* so the block reads as a dark slab under every style variation.
175183
*
176184
* @since Ipsum 1.0
185+
*
177186
* @return void
178187
*/
179188
function ipsum_block_styles() {

0 commit comments

Comments
 (0)