View index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { addFilter } from "@wordpress/hooks"; | |
import { createHigherOrderComponent } from "@wordpress/compose"; | |
interface blockProps { | |
attributes: { | |
className: string; | |
}; | |
isSelected: boolean; | |
name: string; | |
} |
View functions.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare( strict_types=1 ); | |
namespace Blockify\Test; | |
use function add_filter; | |
use function explode; | |
use function implode; | |
use function is_singular; |
View index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { __ } from "@wordpress/i18n"; | |
import { InspectorControls } from "@wordpress/block-editor"; | |
import { SelectControl } from "@wordpress/components"; | |
import { registerBlockType } from "@wordpress/blocks"; | |
import { useSelect } from "@wordpress/data"; | |
import { useState } from "@wordpress/element"; | |
interface selectOption { | |
value: string, | |
name: string |
View functions.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare( strict_types=1 ); | |
namespace Company\Project; | |
use function add_filter; | |
use function gmdate; | |
use function str_replace; |
View functions.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare( strict_types=1 ); | |
namespace Blockify; | |
use DOMDocument; | |
use DOMElement; | |
use function add_action; | |
use function add_filter; |
View style.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h1.has-background[class*="-gradient-background"], | |
h1.has-background[style*="-gradient("] { | |
-webkit-background-clip: text !important; | |
color: transparent; | |
padding: 0; | |
} |
View functions.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'theme_json_theme', 'get_parent_theme_style_variation_data' ); | |
/** | |
* Merges parent theme style variation data with active theme.json. | |
* | |
* @since 1.0.0 | |
* | |
* @param mixed $theme_json WP_Theme_JSON_Data | WP_Theme_JSON_Data_Gutenberg. | |
* |
View functions.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
\add_filter( 'render_block_core/heading', __NAMESPACE__ . '\\randomize_h1_heading_block_on_front_page', 10, 2 ); | |
/** | |
* Randomizes content of H1 heading blocks on the front page. | |
* | |
* @since 1.0.0 | |
* | |
* @param string $content Block HTML content. | |
* @param array $block Block data. |
View modulo-benchmark.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$array = [ | |
0 => 'X', | |
1 => 'Y', | |
2 => 'Z', | |
3 => 'X', | |
4 => 'Y', | |
5 => 'Z', | |
6 => 'X', |
View functions.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Do not include opening PHP tag. | |
// Place in child theme functions.php or custom plugin. | |
add_filter( 'blockify', function ( array $defaults ): array { | |
unset( $defaults['darkMode'] ); | |
return $defaults; | |
} ); |
NewerOlder