adding some docblock stuff
This commit is contained in:
parent
947a78b03a
commit
97c06c18a4
@ -11,6 +11,7 @@ class CustomPage {
|
|||||||
/**
|
/**
|
||||||
* Class constructor.
|
* Class constructor.
|
||||||
*
|
*
|
||||||
|
* @package PluginNamespace\Front\CustomPage
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
@ -22,6 +23,7 @@ class CustomPage {
|
|||||||
/**
|
/**
|
||||||
* Register and enqueue stylesheets and javascript files.
|
* Register and enqueue stylesheets and javascript files.
|
||||||
*
|
*
|
||||||
|
* @package PluginNamespace\Front\CustomPage
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
@ -42,14 +44,15 @@ class CustomPage {
|
|||||||
/**
|
/**
|
||||||
* Display a page in place of a shortcode.
|
* Display a page in place of a shortcode.
|
||||||
*
|
*
|
||||||
|
* @package PluginNamespace\Front\CustomPage
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*
|
*
|
||||||
* @param array $attributes Array of attributes on the shortcode string in the post body.
|
* @param array<string, string> $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 string|null $content (optional) Text content that is between opening and closing shortcodes.
|
||||||
*
|
*
|
||||||
* @return string
|
* @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(
|
$data = array(
|
||||||
'shortcode' => array(
|
'shortcode' => array(
|
||||||
'attributes' => $attributes,
|
'attributes' => $attributes,
|
||||||
@ -58,7 +61,9 @@ class CustomPage {
|
|||||||
);
|
);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
// phpcs:disable
|
||||||
echo nmsp_plugin_app()->blade->run( 'front.custom-page', $data );
|
echo nmsp_plugin_app()->blade->run( 'front.custom-page', $data );
|
||||||
|
// phpcs:enable
|
||||||
$output = ob_get_clean();
|
$output = ob_get_clean();
|
||||||
return wp_kses_post( $output );
|
return wp_kses_post( $output );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user