Chnage block registration (still REST 404)

This commit is contained in:
Robin Cornett
2019-06-21 08:45:18 -04:00
parent 784a41e1d7
commit 51ae95ce28
3 changed files with 64 additions and 69 deletions
@@ -139,13 +139,17 @@ class DisplayFeaturedImageGenesisBlocks {
public function localize() {
$args = array();
foreach ( $this->blocks() as $block => $data ) {
$args['blocks'][ $block ] = $this->get_localization_data( $block, $data );
$args[ $block ] = $this->get_localization_data( $block, $data );
}
wp_localize_script( 'displayfeaturedimagegenesis-block', 'DisplayFeaturedImageGenesisBlock', $args );
}
/**
* Get the data for localizing everything.
*
* @param $block
* @param $data
*
* @return array
*/
protected function get_localization_data( $block, $data ) {