| 1 |
<?php |
| 2 |
/** |
| 3 |
Plugin Name: Blocks – Reusable Content, Shortcodes & Site Variables |
| 4 |
Plugin URI: https://renzojohnson.com/contributions/blocks |
| 5 |
Description: Simple and flexible content management block with a [shortcode]. |
| 6 |
Author: Renzo Johnson |
| 7 |
Author URI: https://renzojohnson.com/ |
| 8 |
Text Domain: blocks |
| 9 |
Domain Path: /languages |
| 10 |
License: GPLv2 or later |
| 11 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| 12 |
Version: 26.09.03.15 |
| 13 |
Requires at least: 6.2 |
| 14 |
Requires PHP: 8.1 |
| 15 |
* |
| 16 |
* @package Blocks |
| 17 |
*/ |
| 18 |
|
| 19 |
/** |
| 20 |
* This file is part of Blocks |
| 21 |
* |
| 22 |
* Copyright (C) 2010-2026, Renzo Johnson (email: renzo.johnson at gmail.com) |
| 23 |
* |
| 24 |
* For the full copyright and license information, please view the LICENSE |
| 25 |
* file that was distributed with this source code, or visit: |
| 26 |
* https://www.gnu.org/licenses/gpl-2.0.html |
| 27 |
*/ |
| 28 |
|
| 29 |
defined( 'ABSPATH' ) || exit; |
| 30 |
|
| 31 |
define( 'BLOCKS_REQUIRED_PHP_VERSION', '8.1' ); |
| 32 |
|
| 33 |
if ( version_compare( PHP_VERSION, BLOCKS_REQUIRED_PHP_VERSION, '<' ) ) { |
| 34 |
return; |
| 35 |
} |
| 36 |
|
| 37 |
define( 'BLOCKS_VERSION', '26.09.03.15' ); |
| 38 |
define( 'BLOCKS_REQUIRED_WP_VERSION', '6.1' ); |
| 39 |
define( 'BLOCKS_PLUGIN', __FILE__ ); |
| 40 |
define( 'BLOCKS_PLUGIN_BASENAME', plugin_basename( BLOCKS_PLUGIN ) ); |
| 41 |
define( 'BLOCKS_PLUGIN_NAME', trim( dirname( BLOCKS_PLUGIN_BASENAME ), '/' ) ); |
| 42 |
define( 'BLOCKS_PLUGIN_DIR', untrailingslashit( dirname( BLOCKS_PLUGIN ) ) ); |
| 43 |
define( 'BLOCKS_ADMIN_READ_CAPABILITY', 'read' ); |
| 44 |
define( 'BLOCKS_ADMIN_READ_WRITE_CAPABILITY', 'edit_pages' ); |
| 45 |
|
| 46 |
|
| 47 |
require_once BLOCKS_PLUGIN_DIR . '/includes/class-blocks-autoloader.php'; |
| 48 |
Blocks_Autoloader::register(); |
| 49 |
|
| 50 |
|
| 51 |
require_once BLOCKS_PLUGIN_DIR . '/includes/functions.php'; |
| 52 |
|
| 53 |
|
| 54 |
if ( is_admin() ) { |
| 55 |
require_once BLOCKS_PLUGIN_DIR . '/includes/admin/blocks-admin.php'; |
| 56 |
require_once BLOCKS_PLUGIN_DIR . '/includes/admin/blocks-admin-actions.php'; |
| 57 |
require_once BLOCKS_PLUGIN_DIR . '/includes/admin/blocks-admin-views.php'; |
| 58 |
} |
| 59 |
|
| 60 |
|
| 61 |
register_activation_hook( BLOCKS_PLUGIN, array( 'Blocks_Installer', 'activate' ) ); |
| 62 |
register_deactivation_hook( BLOCKS_PLUGIN, array( 'Blocks_Installer', 'deactivate' ) ); |
| 63 |
|
| 64 |
|
| 65 |
require_once BLOCKS_PLUGIN_DIR . '/includes/bootstrap.php'; |
| 66 |
|