adding some docblock stuff

This commit is contained in:
Brian 2022-09-30 15:03:33 -06:00
parent 947a78b03a
commit 97c06c18a4
Signed by: brian
GPG Key ID: DE1A5390A3B84CD8

View File

@ -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<string, string> $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 );
}