mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-07-20 15:03:29 +09:00
Chnage block registration (still REST 404)
This commit is contained in:
@@ -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 ) {
|
||||
|
||||
Reference in New Issue
Block a user