/** * Constructor. Hooks all interactions into correct areas to start * the class. * * @since 1.0.0 */ public function __construct() { self::$instance = $this; /** Run a hook before the slider is loaded and pass the object */ do_action_ref_array('tgmsp_init', array($this)); /** Run activation hook and make sure the WordPress version supports the plugin */ register_activation_hook(__FILE__, array($this, 'activation')); /** Add theme support for post thumbnails if it doesn't exist */ if (!current_theme_supports('post-thumbnails')) { add_theme_support('post-thumbnails'); } /** Load the plugin */ add_action('init', array($this, 'init')); }