| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: Twentig |
| 4 |
* Plugin URI: https://twentig.com |
| 5 |
* Description: Supercharge the WordPress block editor with enhanced core blocks, hundreds of block patterns, professional starter sites, and portfolio tools. |
| 6 |
* Author: Twentig.com |
| 7 |
* Author URI: https://twentig.com |
| 8 |
* Version: 2.0 |
| 9 |
* Requires at least: 6.8 |
| 10 |
* Requires PHP: 7.4 |
| 11 |
* Text Domain: twentig |
| 12 |
* License: GPLv3 or later |
| 13 |
* |
| 14 |
* @package twentig |
| 15 |
*/ |
| 16 |
|
| 17 |
defined( 'ABSPATH' ) || exit; |
| 18 |
|
| 19 |
/** |
| 20 |
* Setup plugin constants. |
| 21 |
*/ |
| 22 |
define( 'TWENTIG_VERSION', '2.0' ); |
| 23 |
define( 'TWENTIG_PATH', trailingslashit( plugin_dir_path( __FILE__ ) ) ); |
| 24 |
define( 'TWENTIG_URI', trailingslashit( plugin_dir_url( __FILE__ ) ) ); |
| 25 |
define( 'TWENTIG_ASSETS_URI', TWENTIG_URI . 'dist' ); |
| 26 |
define( 'TWENTIG_PLUGIN_BASE', plugin_basename( __FILE__ ) ); |
| 27 |
|
| 28 |
/** |
| 29 |
* Load the Twentig plugin. |
| 30 |
*/ |
| 31 |
require_once TWENTIG_PATH . 'inc/init.php'; |
| 32 |
|
| 33 |
/** |
| 34 |
* Adds a redirect transient during plugin activation. |
| 35 |
* |
| 36 |
* @param bool $network_wide Whether or not the plugin is being network activated. |
| 37 |
*/ |
| 38 |
function twentig_do_activate( $network_wide = false ) { |
| 39 |
// Add transient to trigger redirect to the Welcome screen. |
| 40 |
set_transient( '_twentig_activation_redirect', true, 30 ); |
| 41 |
} |
| 42 |
register_activation_hook( __FILE__, 'twentig_do_activate' ); |
| 43 |
|