Skip to content

Instantly share code, notes, and snippets.

@andreiglingeanu
Last active July 13, 2022 16:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreiglingeanu/d2c556350e60f7c906f7550cd4849c38 to your computer and use it in GitHub Desktop.
Save andreiglingeanu/d2c556350e60f7c906f7550cd4849c38 to your computer and use it in GitHub Desktop.
<?php
add_action('blocksy:pro:content-blocks:pre-output', function ($id) {
if (has_block('affiliate-booster/ab-advance-button', $id)) {
wp_enqueue_style(
'affiliate-block-ab-button_blocks-cgb-style-css',
AFB_URL . 'assets/blocks/ab-btn/style.css'
);
}
if (has_block('affiliate-booster/ab-callto-action', $id)) {
wp_enqueue_style(
'affiliate-block-ab-cta_blocks-cgb-style-css',
AFB_URL . 'assets/blocks/ab-cta/style.css'
);
}
if (has_block('affiliate-booster/ab-notice-box', $id)) {
wp_enqueue_style(
'affiliate-block-ab-notice_blocks-cgb-style-css',
AFB_URL . 'assets/blocks/ab-notice/style.css'
);
}
if (has_block('affiliate-booster/ab-notification-box', $id)) {
wp_enqueue_style(
'affiliate-block-ab-notification_blocks-cgb-style-css',
AFB_URL . 'assets/blocks/ab-notification/style.css'
);
}
if (has_block('affiliate-booster/ab-single-product', $id)) {
wp_enqueue_style(
'affiliate-block-ab-single-product_blocks-cgb-style-css',
AFB_URL . 'assets/blocks/ab-single-product/style.css'
);
}
if (has_block('affiliate-booster/ab-star-rating', $id)) {
wp_enqueue_style(
'affiliate-block-ab-star-rating_blocks-cgb-style-css',
AFB_URL . 'assets/blocks/ab-star-rating/style.css'
);
}
if (has_block('affiliate-booster/propsandcons', $id)) {
wp_enqueue_style(
'affiliate-block-propsandcons_blocks-cgb-style-css',
AFB_URL . 'assets/blocks/propsandcons/style.css'
);
}
if (has_block('affiliate-booster/ab-coupon2', $id)) {
wp_enqueue_style(
'affiliate-block-ab-coupon2_blocks-cgb-style-css',
AFB_URL . 'assets/blocks/ab-coupon2/style.css'
);
}
if (has_block('affiliate-booster/ab-icon-list', $id)) {
wp_enqueue_style(
'affiliate-block-ab-icon-list_blocks-cgb-style-css',
AFB_URL . 'assets/blocks/ab-icon-list/style.css'
);
}
if (has_block('affiliate-booster/ab-coupon4', $id)) {
wp_enqueue_style(
'affiliate-block-ab-coupon4_blocks-cgb-style-css',
AFB_URL . 'assets/blocks/ab-coupon4/style.css'
);
}
// Load the FontAwesome icon library
wp_enqueue_style(
'affiliate-block-fontawesome',
AFB_URL . 'dist/assets/fontawesome/css/all.min.css'
);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment