From 97c06c18a431a13cb901b3853d8011e763f38a92 Mon Sep 17 00:00:00 2001 From: Brian Rogers Date: Fri, 30 Sep 2022 15:03:33 -0600 Subject: [PATCH] adding some docblock stuff --- includes/front/class-custompage.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/includes/front/class-custompage.php b/includes/front/class-custompage.php index d2969e4..9b7c48f 100644 --- a/includes/front/class-custompage.php +++ b/includes/front/class-custompage.php @@ -11,6 +11,7 @@ class CustomPage { /** * Class constructor. * + * @package PluginNamespace\Front\CustomPage * @since 1.0.0 * * @return void @@ -22,6 +23,7 @@ class CustomPage { /** * Register and enqueue stylesheets and javascript files. * + * @package PluginNamespace\Front\CustomPage * @since 1.0.0 * * @return void @@ -42,14 +44,15 @@ class CustomPage { /** * Display a page in place of a shortcode. * + * @package PluginNamespace\Front\CustomPage * @since 1.0.0 * - * @param array $attributes Array of attributes on the shortcode string in the post body. - * @param string $content (optional) Text content that is between opening and closing shortcodes. + * @param array $attributes Array of attributes on the shortcode string in the post body. + * @param string|null $content (optional) Text content that is between opening and closing shortcodes. * * @return string */ - public function display_custom_page( array $attributes = array(), $content = null ) { + public function display_custom_page( array $attributes = array(), ?string $content = null ): string { $data = array( 'shortcode' => array( 'attributes' => $attributes, @@ -58,7 +61,9 @@ class CustomPage { ); ob_start(); + // phpcs:disable echo nmsp_plugin_app()->blade->run( 'front.custom-page', $data ); + // phpcs:enable $output = ob_get_clean(); return wp_kses_post( $output ); }