This file contains hidden or 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 | |
// Hide 'assets' directory from theme file editor. | |
add_filter( 'theme_scandir_exclusions', static function ( array $exclusions ): array { | |
global $current_screen; | |
if ( ! $current_screen || ! in_array( $current_screen->id, [ 'theme-editor-network', 'theme-editor' ] ) ) { | |
return $exclusions; | |
} |
This file contains hidden or 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
@media (prefers-color-scheme: dark) { | |
body { | |
--wp--custom--color--body: #fff; | |
} | |
} |
This file contains hidden or 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
const Splide = window.Splide; | |
const initSlider = () => { | |
const divs = document.getElementsByClassName( 'wp-block-blockify-slider' ) as HTMLCollectionOf<HTMLDivElement>; | |
for ( let i = 0; i < divs.length; i++ ) { | |
const div = divs[ i ] as HTMLDivElement; | |
const type = div?.getAttribute( 'data-type' ) ?? 'slider'; | |
const perPage = parseInt( div?.getAttribute( 'data-per-page' ) || '3' ); |
This file contains hidden or 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( 'wp_theme_json_data_theme', function ( $theme_json ) { | |
$theme_json->update_with( array_merge( | |
$theme_json->get_data(), | |
[ | |
'settings' => [ | |
'color' => [ | |
'link' => true, | |
], |
This file contains hidden or 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; | |
} |
This file contains hidden or 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; |
This file contains hidden or 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 |
This file contains hidden or 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; |
This file contains hidden or 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; |
This file contains hidden or 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; | |
} |
NewerOlder