createElement( 'span' ); $screen_reader->setAttribute( 'class', 'screen-reader-text' ); $post_id = $object->context['postId'] ?? ''; $post_title = get_the_title( $post_id ); if ( ! $post_title ) { $post_title = __( 'this post', 'blockify' ); } $screen_reader->textContent = __( ' about ', 'blockify' ) . ( $post_title ); $more_link->appendChild( $screen_reader ); $block_content = $dom->saveHTML(); } } return $block_content; } add_filter( 'excerpt_more', NS . 'remove_brackets_from_excerpt' ); /** * Removes brackets from excerpt more string. * * @param string $more Read more text. * * @since 0.0.1 * * @return string */ function remove_brackets_from_excerpt( string $more ): string { return str_replace( [ '[', ']' ], '', $more ); }