PluginProbe
Gutenberg / trunk
Gutenberg vtrunk
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
← All changes | build/scripts/block-library/breadcrumbs.php +8 -6 23.3.2 → trunk View file →
@@ -182,12 +182,14 @@
182 182 if ( empty( $breadcrumb_items ) ) {
183 183 return '';
184 184 }
185 185
186 + $separator_attr = $attributes['separator'] ?? null;
187 + $separator = is_string( $separator_attr ) ? addcslashes( $separator_attr, '\\"' ) : '';
186 188 $wrapper_attributes = get_block_wrapper_attributes(
187 189 array(
188 - 'style' => '--separator: "' . addcslashes( $attributes['separator'], '\\"' ) . '";',
189 - 'aria-label' => __( 'Breadcrumbs' ),
190 + 'style' => '--separator: "' . $separator . '";',
191 + 'aria-label' => _x( 'Breadcrumbs', 'area label' ),
190 192 )
191 193 );
192 194
193 195 $breadcrumb_html = sprintf(
@@ -260,10 +262,10 @@
260 262 * Otherwise, creates a span marked as the current page.
261 263 *
262 264 * @since 7.0.0
263 265 *
264 - * @param string $text The text content.
265 - * @param bool $is_paged Whether we're on a paginated view.
266 + * @param string $text The text content.
267 + * @param bool $is_paged Whether we're on a paginated view.
266 268 *
267 269 * @return array The breadcrumb item data.
268 270 */
269 271 function gutenberg_block_core_breadcrumbs_create_item( $text, $is_paged = false ) {
@@ -295,9 +297,9 @@
295 297 * Generates breadcrumb items from hierarchical post type ancestors.
296 298 *
297 299 * @since 7.0.0
298 300 *
299 - * @param int $post_id The post ID.
301 + * @param int $post_id The post ID.
300 302 *
301 303 * @return array Array of breadcrumb item data.
302 304 */
303 305 function gutenberg_block_core_breadcrumbs_get_hierarchical_post_type_breadcrumbs( $post_id ) {
@@ -521,9 +523,9 @@
521 523 * assigned to multiple terms within a taxonomy.
522 524 *
523 525 * @since 7.0.0
524 526 *
525 - * @param array $settings {
527 + * @param array $settings {
526 528 * Array of breadcrumb settings. Default empty array.
527 529 *
528 530 * @type string $taxonomy Optional. Taxonomy slug to use for breadcrumbs.
529 531 * The taxonomy must be registered for the post type and have