load_dependencies(); $this->init_hooks(); } /** * Load plugin dependencies. * * @since 1.0.0 */ private function load_dependencies() { require_once 'includes/class-the7pt-modules.php'; require_once 'includes/class-the7pt-assets.php'; require_once 'includes/class-the7pt-admin.php'; } /** * Define admin hooks. * * @since 1.0.0 */ private function init_hooks() { // Do it after setup theme because some strings used before init hook. add_action( 'after_setup_theme', array( $this, 'load_plugin_textdomain' ), 5 ); add_action( 'plugins_loaded', array( 'The7PT_Modules', 'setup' ) ); add_action( 'after_setup_theme', array( 'The7PT_Assets', 'setup' ), 20 ); add_action( 'plugins_loaded', array( 'The7PT_Admin', 'setup' ) ); } /** * Load plugin text domain. * * @since 1.1.1 */ public function load_plugin_textdomain() { load_plugin_textdomain( 'dt-the7-core', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); } /** * Returns plugin url. With trailing slash. * * @return string */ public function plugin_url() { return plugins_url( '/', __FILE__ ); } /** * Returns plugin path. With trailing slash. * * @return string */ public function plugin_path() { return plugin_dir_path( __FILE__ ); } /** * Returns plugin base name. * * @return string */ public function plugin_basename() { return plugin_basename( __FILE__ ); } /** * Returns plugin version. * * @return string */ public function version() { return $this->version; } } endif; function The7PT() { return The7PT_Core::instance(); } The7PT();