redirects = new C7DBT_Redirects(); $this->brand_kit = new C7DBT_Brand_Kit(); $this->layout = new C7DBT_Shop_Layout(); $this->fonts = new C7DBT_Fonts(); $this->marketing = new C7DBT_Marketing(); $this->redirects->hooks(); $this->brand_kit->hooks(); $this->layout->hooks(); $this->fonts->hooks(); $this->marketing->hooks(); if ( is_admin() ) { $this->admin = new C7DBT_Admin(); $this->admin->hooks(); $this->setup = new C7DBT_Setup(); $this->setup->hooks(); } add_filter( 'plugin_action_links_' . C7DBT_BASENAME, array( $this, 'action_links' ) ); } /** * Plugins list links. * * @param array $links Links. * @return array */ public function action_links( $links ) { $url = admin_url( 'admin.php?page=c7dbt' ); array_unshift( $links, '' . esc_html__( 'Dashboard', '7labs-debug-branding-for-commerce7' ) . '' ); return $links; } /** * Activation. */ public static function activate() { $is_first_install = false === get_option( C7DBT_OPTION_KEY, false ); if ( $is_first_install ) { add_option( C7DBT_OPTION_KEY, C7DBT_Settings::defaults(), '', false ); delete_option( C7DBT_Setup::COMPLETED_KEY ); set_transient( C7DBT_Setup::REDIRECT_TRANSIENT, 1, 5 * MINUTE_IN_SECONDS ); } flush_rewrite_rules(); } /** * Deactivation. */ public static function deactivate() { flush_rewrite_rules(); } }