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

You appear to be a bot. Output may be restricted

Description

Returns an array of the names of all registered dynamic block types.

Usage

$array = get_dynamic_block_names();

Parameters

Returns

array Array of dynamic block names.

Source

File name: wordpress/wp-includes/blocks.php
Lines: 1 to 12 of 12

function get_dynamic_block_names() {
  $dynamic_block_names = array();

  $block_types = WP_Block_Type_Registry::get_instance()->get_all_registered();
  foreach ( $block_types as $block_type ) {
    if ( $block_type->is_dynamic() ) {
      $dynamic_block_names[] = $block_type->name;
    }
  }

  return $dynamic_block_names;
}
 

 View on GitHub View on Trac

Published: 7th December 2018 | Last updated: 7th December 2018

Information

Function name: get_dynamic_block_names
Plugin ref: WordPress
Version: 5.0.3
Sourcefile: wp-includes/blocks.php
File ref: wp-includes/blocks.php
Deprecated?: No
API Letters: B,D,G,N

  • Plugins
  • Themes
  • Shortcodes
  • APIs
  • Files
  • Hooks
  • Classes
  • Sites
  • Sitemap
  • Blog
oik-plugins Easy Digital Downloads a2z
Easy Digital Downloads a2z

Site:  edd.wp-a2z.org
© Copyright oik-plugins 2014-2019. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins