| @@ -1,26 +1,27 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * Plugin Name: Twentig |
| 4 | - * Plugin URI: https://wordpress.org/plugins/twentig | |
| 5 | - * Description: From Google Fonts to extra colors to blog options to custom copyright, you've got everything you need to customize the Twenty Twenty theme even more. | |
| 6 | - * Author: Twentig | |
| 7 | - * Version: 0.5 | |
| 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.5 | |
| 9 | + * Requires at least: 6.9 | |
| 10 | + * Requires PHP: 7.4 | |
| 11 | + * Text Domain: twentig | |
| 8 | 12 | * License: GPLv3 or later |
| 9 | 13 | * |
| 10 | 14 | * @package twentig |
| 11 | 15 | */ |
| 12 | 16 | |
| 13 | -// Exit if accessed directly. | |
| 14 | -if ( ! defined( 'ABSPATH' ) ) { | |
| 15 | - exit; | |
| 16 | -} | |
| 17 | +defined( 'ABSPATH' ) || exit; | |
| 17 | 18 | |
| 18 | 19 | /** |
| 19 | 20 | * Setup plugin constants. |
| 20 | 21 | */ |
| 21 | -define( 'TWENTIG_VERSION', '0.5' ); | |
| 22 | -define( 'TWENTIG_PATH', trailingslashit( plugin_dir_path(__FILE__) ) ); | |
| 22 | +define( 'TWENTIG_VERSION', '2.0.5' ); | |
| 23 | +define( 'TWENTIG_PATH', trailingslashit( plugin_dir_path( __FILE__ ) ) ); | |
| 23 | 24 | define( 'TWENTIG_URI', trailingslashit( plugin_dir_url( __FILE__ ) ) ); |
| 24 | 25 | define( 'TWENTIG_ASSETS_URI', TWENTIG_URI . 'dist' ); |
| 25 | 26 | define( 'TWENTIG_PLUGIN_BASE', plugin_basename( __FILE__ ) ); |
| 26 | 27 | |
| @@ -27,4 +28,15 @@ | ||
| 27 | 28 | /** |
| 28 | 29 | * Load the Twentig plugin. |
| 29 | 30 | */ |
| 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' ); | |