MB Blocks 1.8.0 stops enqueueing assets on frontend

Support MB Blocks MB Blocks 1.8.0 stops enqueueing assets on frontend

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #49846
    Johannes GrossJohannes Gross
    Participant

    Hello,

    After the recent MB Block 1.8.0 update, the CSS file enqueued through enqueue_assets is not anymore loaded on the frontend. Downgrading back to MB Block 1.7.6 fixes it. Can you take a look? Here is my markup:

    $meta_boxes[] = array(
    		'id'              => 'twt-modules',
    		'title'           => 'TWT Modules',
    		'type'            => 'block',
    		'icon'            => 'editor-table',
    		'category'        => 'layout',
    		'context'         => 'normal',
    		'render_template' => get_stylesheet_directory() . '/blocks/twt-modules.php',
    		'enqueue_assets' => function() {
    			wp_enqueue_style('twt-modules', get_stylesheet_directory_uri().'/blocks/twt-modules.css', array(), filemtime(get_stylesheet_directory()."/blocks/twt-modules.css"));
    		},
    		'supports'        => array(
    			'anchor'          => true,
    			'customClassName' => true
    		),
    		'fields'          => array(
    			array(
    				'name'          => '',
    				'id'            => 'modules',
    				'type'          => 'group',
    				'clone'         => true,
    				'sort_clone'    => true,
    				'collapsible'   => true,
    				'default_state' => 'collapsed',
    				'group_title'   => '{label}',
    				'fields'        => array(
    					array(
    						'name' => 'Label',
    						'id'   => 'label',
    						'type' => 'text',
    					),
    					array(
    						'name' => 'URL',
    						'id'   => 'url',
    						'type' => 'text',
    					),
    					array(
    						'name' => 'Image',
    						'id'   => 'img',
    						'type' => 'single_image',
    					)
    				)
    			)
    		)
    	);
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.