| 1 |
<?php |
| 2 |
|
| 3 |
require_once dirname( __FILE__ ) . '/includes/class-shortcodes-ultimate-activator.php'; |
| 4 |
require_once dirname( __FILE__ ) . '/includes/class-shortcodes-ultimate.php'; |
| 5 |
register_activation_hook( SU_PLUGIN_FILE, array('Shortcodes_Ultimate_Activator', 'activate') ); |
| 6 |
call_user_func( function () { |
| 7 |
// don't run the plugin during activation (after plugins_loaded) |
| 8 |
if ( did_action( 'plugins_loaded' ) ) { |
| 9 |
return; |
| 10 |
} |
| 11 |
add_action( 'init', function () { |
| 12 |
$plugin = new Shortcodes_Ultimate(SU_PLUGIN_FILE, SU_PLUGIN_VERSION, 'shortcodes-ultimate-'); |
| 13 |
do_action( 'su/ready', $plugin ); |
| 14 |
}, 1 ); |
| 15 |
require_once dirname( __FILE__ ) . '/admin/class-shortcodes-ultimate-widget.php'; |
| 16 |
$custom_widget = new Shortcodes_Ultimate_Widget('shortcodes-ultimate-'); |
| 17 |
add_action( 'widgets_init', array($custom_widget, 'register') ); |
| 18 |
} ); |