init(); ( new ACQUIS_Lead_Handler() )->init(); add_action( 'init', array( 'ACQUIS_File_Manager', 'register_post_type' ) ); // A Lead Funnel that has its own delivery email answers for the form it uses, without the form being changed. add_filter( 'acquis_form_email_settings', function ( $settings, $form_id ) { $own = ACQUIS_Funnel_Builder::email_override( $form_id ); return $own ? $own : $settings; }, 10, 2 ); if ( is_admin() ) { ( new ACQUIS_Admin() )->init(); ACQUIS_Addons_Page::init(); ( new ACQUIS_P3_Admin() )->init(); ( new ACQUIS_Funnels_Admin() )->init(); add_action( 'admin_menu', 'acquis_lite_sort_menu', 99 ); } ( new ACQUIS_Shortcode() )->init(); ( new ACQUIS_Form_Shortcode() )->init(); ( new ACQUIS_Download_Controller() )->init(); add_action( 'init', array( 'ACQUIS_Form_Blocks', 'register' ) ); /** * Fired after Lite has fully booted. * The Pro plugin hooks here to load its classes safely. */ // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound do_action( 'acquis_lite_loaded' ); } // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound function acquis_lite_sort_menu() { global $submenu; $parent = 'acquisitionsuite'; if ( empty( $submenu[ $parent ] ) ) return; $order = array( // Lite core 'acquisitionsuite' => 1, 'acquis-funnels' => 2, 'acquisitionsuite-leads' => 3, 'acquis-submissions' => 4, 'acquis-analytics' => 5, 'acquis-form-builder' => 6, 'acquisitionsuite-files' => 7, // Pro CRM 'acquis-lead-scoring' => 8, 'acquis-automation' => 9, 'acquis-tags' => 10, 'acquis-pipeline' => 11, // Pro sequences 'acquis-sequences' => 12, 'acquis-email-queue' => 13, // Pro payments 'acquis-pay-orders' => 14, 'acquis-pay-transactions' => 15, // Settings & misc 'acquisitionsuite-integrations' => 16, 'acquisitionsuite-email-logs' => 17, 'acquis-unsubscribes' => 17, 'acquis-export' => 18, 'acquisitionsuite-settings' => 19, 'acquis-payments-settings' => 20, 'acquisitionsuite-status' => 21, // Add-ons, then License (Pro) — always last 'acquis-addons' => 22, 'acquis-license' => 23, ); usort( $submenu[ $parent ], function ( $a, $b ) use ( $order ) { return ( $order[ $a[2] ] ?? 99 ) - ( $order[ $b[2] ] ?? 99 ); } ); }