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
.fa.fa-twitter{ | |
font-family:sans-serif; | |
} | |
.fa.fa-twitter::before{ | |
content:"𝕏"; | |
font-size:1.2em; | |
} |
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 | |
/** | |
* Enqueue block editor assets. | |
* | |
* @return void | |
*/ | |
function enqueue_custom_block_editor_modifications() { | |
$asset_file = include PLUGIN_PATH . '/build/editor-modifications/index.asset.php'; | |
wp_enqueue_script( |
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 | |
/** | |
* Register block styles. | |
* | |
* @return void | |
*/ | |
function prefix_register_block_styles() { | |
$site_icon = get_site_icon_url(); | |
if ( $site_icon ) { |
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 | |
/** | |
* Grab the url of a publicly embeddable video hosted on vimeo | |
* @param str $video_url The "embed" url of a video | |
* @return str The url of the thumbnail, or false if there's an error | |
*/ | |
function grab_vimeo_thumbnail($vimeo_url){ | |
if( !$vimeo_url ) return false; | |
$data = json_decode( file_get_contents( 'http://vimeo.com/api/oembed.json?url=' . $vimeo_url ) ); |
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 | |
/** | |
* Render columns block with extra class | |
* | |
* @param string $block_content The block content about to be rendered. | |
* @param array $block The full block, including name and attributes. | |
* @return string | |
*/ | |
function render_columns_block_class( $block_content, $block ) { |
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 | |
/** | |
* Custom login page design | |
*/ | |
function custom_login_page_design() { | |
$colors = wp_get_global_styles( array( 'color' ) ); | |
$variables = wp_get_global_stylesheet( array( 'variables' ) ); | |
?> | |
<style type="text/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
<script type="text/javascript"> | |
document.querySelectorAll('.consent-link').forEach(el => { | |
el.addEventListener('click', event => { | |
if(! Osano) { | |
return | |
} | |
event.preventDefault(); | |
Osano.cm.showDrawer(); | |
}) | |
}) |
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 { useSelect } from '@wordpress/data'; | |
/** | |
* AttachmentImage | |
* | |
* This component is used to display an image from the media library. | |
* It's meant as a JS companion to the PHP function `wp_get_attachment_image()`. | |
* | |
* @link https://www.briancoords.com/getting-wordpress-media-library-images-in-javascript/ |
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 | |
/** | |
* Plugin Name: Block Pattern Preview | |
* Description: Allows you to preview block patterns on the frontend of your website. | |
* Author: Brian Coords | |
* Author URI: https://www.briancoords.com | |
* Version: 0.0.1 | |
* License: GPL v2 or later | |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html | |
* |
NewerOlder