'. __('Documentation', 'wpfnl').'', Wpfnl_functions::role_permission_to_allow_wpfunnel( $role_permission ), 'https://getwpfunnels.com/resources/' ); add_submenu_page( WPFNL_MAIN_PAGE_SLUG, __('Edit Funnel', 'wpfnl'), __('Edit Funnel', 'wpfnl'), Wpfnl_functions::role_permission_to_allow_wpfunnel( $role_permission ), WPFNL_EDIT_FUNNEL_SLUG, [$this, 'render_edit_funnel_page'] ); add_submenu_page( WPFNL_MAIN_PAGE_SLUG, __('Request a Feature', 'wpfnl'), ''. __('Request a Feature', 'wpfnl').'', Wpfnl_functions::role_permission_to_allow_wpfunnel( $role_permission ), 'https://getwpfunnels.com/ideas/' ); add_submenu_page( WPFNL_MAIN_PAGE_SLUG, __('Email Builder', 'wpfnl'), __('Email Builder', 'wpfnl'), Wpfnl_functions::role_permission_to_allow_wpfunnel( $role_permission ), 'email-builder', [$this, 'render_email_builder_page'] ); do_action( 'wpfunnels/add_submenu'); if ( !Wpfnl_functions::is_wpfnl_pro_activated() ) { add_submenu_page( WPFNL_MAIN_PAGE_SLUG, __('Go Pro', 'wpfnl'), ' ' . __('Go Pro', 'wpfnl'), Wpfnl_functions::role_permission_to_allow_wpfunnel( $role_permission ), 'https://getwpfunnels.com/pricing/' ); } elseif ( version_compare( WPFNL_PRO_VERSION, '1.2.9' , '<=' ) ) { /** * This will be removed in future, all license * related functionalities will be moved to pro */ add_submenu_page( WPFNL_MAIN_PAGE_SLUG, __('License', 'wpfnl'), __('License', 'wpfnl'), Wpfnl_functions::role_permission_to_allow_wpfunnel( $role_permission ), 'wpf-license', [$this, 'render_license'] ); } } public function render_email_builder_page() { ?>
module_manager->get_admin_modules('funnels')->get_view(); } /** * Render edit funnel page. * * @since 1.0.0 */ public function render_edit_funnel_page() { $funnel_id = filter_input(INPUT_GET, 'id', FILTER_SANITIZE_SPECIAL_CHARS); Wpfnl::$instance->module_manager->get_admin_modules('funnel')->init($funnel_id); Wpfnl::$instance->module_manager->get_admin_modules('funnel')->get_view(); } /** * Render create funnel page * * @since 1.0.0 */ public function render_create_funnel_page() { Wpfnl::$instance->module_manager->get_admin_modules('create-funnel')->get_view(); } /** * Render settings page * * @since 1.0.0 */ public function render_settings_page() { Wpfnl::$instance->module_manager->get_admin_modules('settings')->get_view(); } /** * Render license page for funnel * * @since 2.0.0 */ public function render_license() { require WPFNL_DIR . '/admin/partials/license.php'; } /** * Remove submenu from plugin menu * * @since 1.0.0 */ public function remove_submenu() { remove_submenu_page(WPFNL_MAIN_PAGE_SLUG, 'edit_funnel'); } /** * Remove all notices from funnel window * * @since 2.0.0 */ public function remove_notices_from_funnel_window() { if (empty($_GET['page'])) { return; } if (('edit_funnel' == sanitize_text_field( $_GET['page'] ) )) { remove_all_actions( 'admin_notices' ); } if ( 'wp_funnels' == sanitize_text_field( $_GET['page'] ) ) { add_action('admin_footer', array( $this, 'remove_admin_notices' )); } } /** * Force user to visit all steps page * * @since 1.0.0 */ public function disallow_all_step_view() { global $pagenow; if ('edit.php' === $pagenow && isset($_GET['post_type']) && WPFNL_STEPS_POST_TYPE === sanitize_text_field($_GET['post_type'])) { $funnel_link = add_query_arg( [ 'page' => WPFNL_MAIN_PAGE_SLUG, ], admin_url('admin.php') ); wp_safe_redirect( wp_sanitize_redirect( esc_url_raw( $funnel_link ) ) ); exit; } } /** * Redirect user to pro url */ public function redirect_to_pro() { $url = 'https://getwpfunnels.com/pricing/'; wp_safe_redirect( wp_sanitize_redirect( esc_url_raw( $url ) ) ); exit(); } /** * Open with new page when documenation is clicked */ public function doc_link_with_new_page(){ ?> .update-nag, .updated, .error, .is-dismissible, .notice { display: none; } .wpfunnels-notice {display: block;}'; } }