From d681de4fde6289ba6a6fb71218e572546bf870ed Mon Sep 17 00:00:00 2001 From: Tetrakern <26898880+Tetrakern@users.noreply.github.com> Date: Thu, 3 Aug 2023 20:39:31 +0200 Subject: [PATCH] Update some doc comments Going for an unified style. --- includes/functions/hooks/_general_hooks.php | 34 +++++++++---------- .../functions/hooks/_mobile_menu_hooks.php | 9 ++--- partials/_navigation.php | 8 ++--- partials/_site-header.php | 8 ++--- 4 files changed, 30 insertions(+), 29 deletions(-) diff --git a/includes/functions/hooks/_general_hooks.php b/includes/functions/hooks/_general_hooks.php index 3d4d123c..bf6a262a 100644 --- a/includes/functions/hooks/_general_hooks.php +++ b/includes/functions/hooks/_general_hooks.php @@ -46,9 +46,9 @@ if ( ! function_exists( 'fictioneer_breadcrumbs' ) ) { * * @since Fictioneer 5.0 * - * @param array $args['breadcrumbs'] Breadcrumb tuples with label (0) and link (1). - * @param string $args['post_type'] Optional. Post type of the current page. - * @param int $args['post_id'] Optional. Post ID of the current page. + * @param int|null $args['post_id'] Optional. Post ID of the current page. + * @param string|null $args['post_type'] Optional. Post type of the current page. + * @param array $args['breadcrumbs'] Breadcrumb tuples with label (0) and link (1). */ function fictioneer_breadcrumbs( $args ) { @@ -115,8 +115,8 @@ if ( ! function_exists( 'fictioneer_output_modals' ) ) { * * @since Fictioneer 5.0.0 * - * @param int|null $args['post_id'] Current post ID or null. - * @param string|null $args['post_type'] Current post type or null. + * @param int|null $args['post_id'] Optional. Current post ID. + * @param string|null $args['post_type'] Optional. Current post type. * @param array $args['breadcrumbs'] Array of breadcrumb tuples with label (0) and link (1). */ @@ -180,10 +180,10 @@ if ( ! function_exists( 'fictioneer_navigation_bar' ) ) { * * @since Fictioneer 5.0 * - * @param int|null $args['post_id'] Current post ID or null. - * @param int|null $args['story_id'] Current story ID (if chapter) or null. - * @param string|boolean $args['header_image_url'] URL of the filtered header image or false. - * @param array $args['header_args'] Arguments passed to the header.php partial. + * @param int|null $args['post_id'] Optional. Current post ID. + * @param int|null $args['story_id'] Optional. Current story ID (if chapter). + * @param string|boolean $args['header_image_url'] URL of the filtered header image or false. + * @param array $args['header_args'] Arguments passed to the header.php partial. */ function fictioneer_navigation_bar( $args ) { @@ -202,10 +202,10 @@ if ( ! function_exists( 'fictioneer_site_header' ) ) { * * @since Fictioneer 5.0 * - * @param int|null $args['post_id'] Current post ID or null. - * @param int|null $args['story_id'] Current story ID (if chapter) or null. - * @param string|boolean $args['header_image_url'] URL of the filtered header image or false. - * @param array $args['header_args'] Arguments passed to the header.php partial. + * @param int|null $args['post_id'] Optional. Current post ID. + * @param int|null $args['story_id'] Optional. Current story ID (if chapter). + * @param string|boolean $args['header_image_url'] URL of the filtered header image or false. + * @param array $args['header_args'] Arguments passed to the header.php partial. */ function fictioneer_site_header( $args ) { @@ -225,10 +225,10 @@ if ( ! function_exists( 'fictioneer_header_background' ) ) { * * @since Fictioneer 5.0 * - * @param int|null $args['post_id'] Current post ID or null. - * @param int|null $args['story_id'] Current story ID (if chapter) or null. - * @param string|boolean $args['header_image_url'] URL of the filtered header image or false. - * @param array $args['header_args'] Arguments passed to the header.php partial. + * @param int|null $args['post_id'] Optional. Current post ID. + * @param int|null $args['story_id'] Optional. Current story ID (if chapter). + * @param string|boolean $args['header_image_url'] URL of the filtered header image or false. + * @param array $args['header_args'] Arguments passed to the header.php partial. */ function fictioneer_header_background( $args ) { diff --git a/includes/functions/hooks/_mobile_menu_hooks.php b/includes/functions/hooks/_mobile_menu_hooks.php index 2476ace5..abbc60f6 100644 --- a/includes/functions/hooks/_mobile_menu_hooks.php +++ b/includes/functions/hooks/_mobile_menu_hooks.php @@ -14,10 +14,10 @@ if ( ! function_exists( 'fictioneer_output_mobile_menu' ) ) { * * @since Fictioneer 5.0 * - * @param int|null $args['post_id'] Current post ID or null. - * @param int|null $args['story_id'] Current story ID (if chapter) or null. - * @param string|boolean $args['header_image_url'] URL of the filtered header image or false. - * @param array $args['header_args'] Arguments passed to the header.php partial. + * @param int|null $args['post_id'] Optional. Current post ID. + * @param int|null $args['story_id'] Optional. Current story ID (if chapter). + * @param string|boolean $args['header_image_url'] URL of the filtered header image or false. + * @param array $args['header_args'] Arguments passed to the header.php partial. */ function fictioneer_output_mobile_menu( $args ) { @@ -72,6 +72,7 @@ if ( ! function_exists( 'fictioneer_mobile_quick_buttons' ) ) { $output = []; // Build + ob_start(); // Start HTML ---> ?> diff --git a/partials/_navigation.php b/partials/_navigation.php index 3e4723ee..3f416710 100644 --- a/partials/_navigation.php +++ b/partials/_navigation.php @@ -8,10 +8,10 @@ * @subpackage Fictioneer * @since 5.0 * - * @internal $args['post_id'] Current post ID or null. - * @internal $args['story_id'] Current story ID (if chapter) or null. - * @internal $args['header_image_url'] URL of the filtered header image or false. - * @internal $args['header_args'] Arguments passed to the header.php partial. + * @internal $args['post_id'] Optional. Current post ID. + * @internal $args['story_id'] Optional. Current story ID (if chapter). + * @internal $args['header_image_url'] URL of the filtered header image or false. + * @internal $args['header_args'] Arguments passed to the header.php partial. */ ?> diff --git a/partials/_site-header.php b/partials/_site-header.php index cc6d9fbc..29e1f8a8 100644 --- a/partials/_site-header.php +++ b/partials/_site-header.php @@ -8,10 +8,10 @@ * @subpackage Fictioneer * @since 5.0 * - * @internal $args['post_id'] Current post ID or null. - * @internal $args['story_id'] Current story ID (if chapter) or null. - * @internal $args['header_image_url'] URL of the filtered header image or false. - * @internal $args['header_args'] Arguments passed to the header.php partial. + * @internal $args['post_id'] Optional. Current post ID. + * @internal $args['story_id'] Optional. Current story ID (if chapter). + * @internal $args['header_image_url'] URL of the filtered header image or false. + * @internal $args['header_args'] Arguments passed to the header.php partial. */ ?>