Skip to content

Commit

Permalink
Fixed some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Bravo committed Oct 18, 2021
1 parent e1824c7 commit 4d53bf0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions packages/block-library/src/post-comment-author/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ import { InspectorControls, useBlockProps } from '@wordpress/block-editor';
import { store as coreStore } from '@wordpress/core-data';
import { PanelBody, ToggleControl } from '@wordpress/components';

/**
* Renders the `core/post-comment-author` block on the editor.
*
* @param {Object} props React props.
* @param {Object} props.setAttributes Callback for updating block attributes.
* @param {Object} props.attributes Block attributes.
* @param {Object} props.context Inherited context.
*
* @return {JSX.Element} React element.
*/
export default function Edit( { attributes, context, setAttributes } ) {
const { className, isLink, linkTarget } = attributes;
const { commentId } = context;
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/post-comment-author/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* @param array $attributes Block attributes.
* @param string $content Block default content.
* @param WP_Block $block Block instance.
* @return string Return the post comment's content.
* @return string Return the post comment's author.
*/
function render_block_core_post_comment_author( $attributes, $content, $block ) {
if ( ! isset( $block->context['commentId'] ) ) {
Expand Down

0 comments on commit 4d53bf0

Please sign in to comment.