PHP code example of humanmade / block-supports-extended
1. Go to this page and download the library: Download humanmade/block-supports-extended library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
humanmade / block-supports-extended example snippets
Block_Supports_Extended\register( 'color', 'quoteMarks', [
'label' => __( 'Quote Marks' ),
// Properties are translated to what the setting value is applied to,
// for example, text will give ".selector { color: value }". This is
// the same as the options available for the "color" block.json.
'property' => 'text',
// %s is replaced with a generated class name applied to the block.
'selector' => '.%1$s blockquote::before, .%1$s blockquote::after',
// Optional list of default blocks to add support for. This can
// also be done via a block's block.json "supports" property, or
// later using the Block_Supports_Extended\add_support() function.
'blocks' => [
'core/pullquote',
],
] );
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.