47 lines
1.3 KiB
PHP
47 lines
1.3 KiB
PHP
<?php
|
|
/**
|
|
* Plugin Name: Image Filters
|
|
* Description: Add Instagram-style CSS filters to images in the block editor.
|
|
* Version: 0.1.0
|
|
* Requires at least: 6.4
|
|
* Requires PHP: 7.4
|
|
* Author: ksolo
|
|
* License: GPL-2.0-or-later
|
|
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
|
* Text Domain: image-filters
|
|
* Domain Path: /languages
|
|
*
|
|
* @package ImageFilters
|
|
*/
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit;
|
|
}
|
|
|
|
define( 'IMAGE_FILTERS_VERSION', '0.1.0' );
|
|
define( 'IMAGE_FILTERS_FILE', __FILE__ );
|
|
define( 'IMAGE_FILTERS_DIR', plugin_dir_path( __FILE__ ) );
|
|
define( 'IMAGE_FILTERS_URL', plugin_dir_url( __FILE__ ) );
|
|
|
|
/**
|
|
* Bootstrap the plugin.
|
|
*
|
|
* Block registration is wired in a follow-up task. This function exists so the
|
|
* activation hook can be added without needing a global-side-effect pattern.
|
|
*
|
|
* @return void
|
|
*/
|
|
function image_filters_bootstrap(): void {
|
|
// Block registration will be added in Task 5.
|
|
}
|
|
add_action( 'plugins_loaded', 'image_filters_bootstrap' );
|
|
|
|
/**
|
|
* Load plugin textdomain for translations.
|
|
*
|
|
* @return void
|
|
*/
|
|
function image_filters_load_textdomain(): void {
|
|
load_plugin_textdomain( 'image-filters', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
|
|
}
|
|
add_action( 'init', 'image_filters_load_textdomain' ); |