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 | |
function render_block( $attributes ) { | |
do_shortcode( '[playlist type="podcast"]'); | |
} | |
function podcast_playlist( $output, $attributes, $instance ) { | |
if ( 'podcast' !== $attributes['type'] ) { | |
return $output; | |
} |
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
diff --git a/packages/block-editor/src/components/block-styles/index.js b/packages/block-editor/src/components/block-styles/index.js | |
index 2485c73e9..ad77a6965 100644 | |
--- a/packages/block-editor/src/components/block-styles/index.js | |
+++ b/packages/block-editor/src/components/block-styles/index.js | |
@@ -72,6 +72,7 @@ function BlockStyles( { | |
block, | |
onSwitch = noop, | |
onHoverClassName = noop, | |
+ allBlocks, | |
} ) { |
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
var fetchGifs = _.debounce( function fetchGifs( search ) { | |
if ( attributes.fetching ) { | |
return; | |
} | |
props.setAttributes( { | |
fetching: true, | |
} ); | |
$.getJSON( 'https://api.giphy.com/v1/gifs/search?api_key=Fswo3IBHt0TViFMN6zYgbYzSEb3sLx7I&limit=10&offset=0&rating=G&lang=en&q=' + encodeURI( search ) ) |
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 | |
// Can be called whenever. | |
function add_admin_notice( $code, $message, $type = 'error' ) { | |
global $wp_admin_notices; | |
if ( ! isset( $wp_admin_notices ) ) | |
$wp_admin_notices = array(); | |
$wp_admin_notices[] = array( |