blablablocks-slider-block/blablablocks-slider-block.php
punitverma123 4ea426a491
Some checks failed
Plugin Check / plugin-check (push) Has been cancelled
Sync to Playground / build-and-push-on-push (push) Has been cancelled
chore: bump version to 1.3.0
2026-07-09 14:00:46 +05:30

46 lines
1.3 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* Plugin Name: Slider and Carousel Block Responsive, Accessible
* Description: Slider Block is a WordPress plugin built specifically for the Block Editor, allowing you to create responsive sliders effortlessly.
* Requires at least: 6.6
* Requires PHP: 7.4
* Version: 1.3.0
* Author: Lubus
* License: MIT
* License URI: https://www.gnu.org/licenses/MIT
* Text Domain: blablablocks-slider-block
*
* @package blablablocks-slider-block
*/
if (! defined('ABSPATH')) {
exit; // Exit if accessed directly.
}
/**
* Registers the block using the metadata loaded from the `block.json` file.
* Behind the scenes, it registers also all assets so they can be enqueued
* through the block editor in the corresponding context.
*/
function blabslbl_slider_block_init()
{
register_block_type(__DIR__ . '/build/slider');
register_block_type(__DIR__ . '/build/slide');
}
add_action('init', 'blabslbl_slider_block_init');
/**
* Enqueue editor assets for the slider block.
*/
function blabslbl_slider_enqueue_editor_assets()
{
wp_localize_script(
'blablablocks-slider-editor-script',
'BlablablocksData',
[
'assetsUrl' => plugin_dir_url(__FILE__) . 'assets',
]
);
}
add_action('enqueue_block_editor_assets', 'blabslbl_slider_enqueue_editor_assets');