wp-includes/blocks.php


Lines:

1 to 100 of 100
<?php

/**
 * Functions related to registering and parsing blocks.
 *
 * @package WordPress
 * @subpackage Blocks
 * @since 5.0.0
 */

/* function remove_block_asset_path_prefix() – Removes the block asset’s path prefix if provided. */

/* function generate_block_asset_handle() – Generates the name for an asset based on the name of the block
and the field name provided. */

/* function register_block_script_handle() – Finds a script handle for the selected block metadata field. It detects
when a path to file was provided and finds a corresponding asset file
with details necessary to register the script under automatically
generated handle name. It returns unprocessed script handle otherwise. */

/* function register_block_style_handle() – Finds a style handle for the block metadata field. It detects when a path
to file was provided and registers the style under automatically
generated handle name. It returns unprocessed style handle otherwise. */

/* function get_block_metadata_i18n_schema() – Gets i18n schema for block’s metadata read from `block.json` file. */

/* function register_block_type_from_metadata() – Registers a block type from the metadata stored in the `block.json` file. */

/* function register_block_type() – Registers a block type. The recommended way is to register a block type using
the metadata stored in the `block.json` file. */

/* function unregister_block_type() – Unregisters a block type. */

/* function has_blocks() – Determine whether a post or content string has blocks. */

/* function has_block() – Determine whether a $post or a string contains a specific block type. */

/* function get_dynamic_block_names() – Returns an array of the names of all registered dynamic block types. */

/* function serialize_block_attributes() – Given an array of attributes, returns a string in the serialized attributes
format prepared for post content. */

/* function strip_core_block_namespace() – Returns the block name to use for serialization. This will remove the default
"core/" namespace from a block name. */

/* function get_comment_delimited_block_content() – Returns the content of a block, including comment delimiters. */

/* function serialize_block() – Returns the content of a block, including comment delimiters, serializing all
attributes from the given parsed block. */

/* function serialize_blocks() – Returns a joined string of the aggregate serialization of the given parsed
blocks. */

/* function filter_block_content() – Filters and sanitizes block content to remove non-allowable HTML from
parsed block attribute values. */

/* function filter_block_kses() – Filters and sanitizes a parsed block to remove non-allowable HTML from block
attribute values. */

/* function filter_block_kses_value() – Filters and sanitizes a parsed block attribute value to remove non-allowable
HTML. */

/* function excerpt_remove_blocks() – Parses blocks out of a content string, and renders those appropriate for the excerpt. */

/* function _excerpt_render_inner_blocks() – Render inner blocks from the allowed wrapper blocks
for generating an excerpt. */

/* function render_block() – Renders a single block into a HTML string. */

/* function parse_blocks() – Parses blocks out of a content string. */

/* function do_blocks() – Parses dynamic blocks out of `post_content` and re-renders them. */

/* function _restore_wpautop_hook() – If do_blocks() needs to remove wpautop() from the `the_content` filter, this re-adds it afterwards,
for subsequent `the_content` usage. */

/* function block_version() – Returns the current version of the block format that the content string is using. */

/* function register_block_style() – Registers a new block style. */

/* function unregister_block_style() – Unregisters a block style. */

/* function block_has_support() – Checks whether the current block type supports the feature requested. */

/* function wp_migrate_old_typography_shape() – Converts typography keys declared under `supports.*` to `supports.typography.*`. */

/* function build_query_vars_from_query_block() – Helper function that constructs a WP_Query args array from
a `Query` block properties. */

/* function get_query_pagination_arrow() – Helper function that returns the proper pagination arrow html for
`QueryPaginationNext` and `QueryPaginationPrevious` blocks based
on the provided `paginationArrow` from `QueryPagination` context. */

/* function _wp_multiple_block_styles() – Allow multiple block styles. */
add_filter( 'block_type_metadata', '_wp_multiple_block_styles' );

/* function build_comment_query_vars_from_block */

/* function get_comments_pagination_arrow */
 

 View on GitHub View on Trac

Called by

    Invoked by

      Calls

      Call hooks

      API Letters: ,,,