[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/blocks/ -> navigation-link.php (summary)

Server-side registering and rendering of the `core/navigation-link` block.

File Size: 431 lines (14 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 9 functions

  block_core_navigation_link_build_css_colors()
  block_core_navigation_link_build_css_font_sizes()
  block_core_navigation_link_render_submenu_icon()
  block_core_navigation_link_maybe_urldecode()
  render_block_core_navigation_link()
  build_variation_for_navigation_link()
  block_core_navigation_link_filter_variations()
  block_core_navigation_link_build_variations()
  register_block_core_navigation_link()

Functions
Functions that are not part of a class:

block_core_navigation_link_build_css_colors( $context, $attributes, $is_sub_menu = false )   X-Ref
Build an array with CSS classes and inline styles defining the colors
which will be applied to the navigation markup in the front-end.

param: array $context     Navigation block context.
param: array $attributes  Block attributes.
param: bool  $is_sub_menu Whether the link is part of a sub-menu.
return: array Colors CSS classes and inline styles.

block_core_navigation_link_build_css_font_sizes( $context )   X-Ref
Build an array with CSS classes and inline styles defining the font sizes
which will be applied to the navigation markup in the front-end.

param: array $context Navigation block context.
return: array Font size CSS classes and inline styles.

block_core_navigation_link_render_submenu_icon()   X-Ref
Returns the top-level submenu SVG chevron icon.

return: string

block_core_navigation_link_maybe_urldecode( $url )   X-Ref
Decodes a url if it's encoded, returning the same url if not.

param: string $url The url to decode.
return: string $url Returns the decoded url.

render_block_core_navigation_link( $attributes, $content, $block )   X-Ref
Renders the `core/navigation-link` block.

param: array    $attributes The block attributes.
param: string   $content    The saved content.
param: WP_Block $block      The parsed block.
return: string Returns the post content with the legacy widget added.

build_variation_for_navigation_link( $entity, $kind )   X-Ref
Returns a navigation link variation

param: WP_Taxonomy|WP_Post_Type $entity post type or taxonomy entity.
param: string                   $kind string of value 'taxonomy' or 'post-type'.
return: array

block_core_navigation_link_filter_variations( $variations, $block_type )   X-Ref
Filters the registered variations for a block type.
Returns the dynamically built variations for all post-types and taxonomies.

param: array         $variations Array of registered variations for a block type.
param: WP_Block_Type $block_type The full block type object.

block_core_navigation_link_build_variations()   X-Ref
Returns an array of variations for the navigation link block.

return: array

register_block_core_navigation_link()   X-Ref
Registers the navigation link block.




Generated : Thu Nov 21 08:20:01 2024 Cross-referenced by PHPXref